From 5bbfc8eb6ca0e93e0de83834360f6841497e6ff0 Mon Sep 17 00:00:00 2001 From: chnmr0 Date: Tue, 23 Feb 2016 16:50:49 +0000 Subject: [PATCH] =?utf8?q?#36028=20DTXMania/=E3=82=B3=E3=83=BC=E3=83=89?= =?utf8?q?=E5=86=85=E3=81=AE=E3=82=BD=E3=83=BC=E3=82=B9=E3=82=B3=E3=83=BC?= =?utf8?q?=E3=83=89=E3=82=92=E6=95=B4=E5=BD=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: http://svn.osdn.jp/svnroot/dtxmania/trunk@921 16f42ceb-6dc6-49c8-ba94-f2d53467949d --- .../コード/アイテム/CItemBase.cs | 42 +- .../コード/アイテム/CItemInteger.cs | 50 +- .../コード/アイテム/CItemList.cs | 62 +- .../コード/アイテム/CItemThreeState.cs | 76 +- .../コード/アイテム/CItemToggle.cs | 44 +- .../コード/スコア、曲/CBoxDef.cs | 76 +- .../コード/スコア、曲/CDTX.cs | 8 +- .../コード/スコア、曲/CDTXInput.cs | 6 +- .../コード/スコア、曲/CDTXNestedTypes.cs | 46 +- .../コード/スコア、曲/CScoreIni.cs | 1004 ++++----- .../コード/スコア、曲/CSetDef.cs | 104 +- .../コード/スコア、曲/CSong管理.cs | 1304 ++++++------ .../コード/スコア、曲/Cスコア.cs | 48 +- .../スコア、曲/C曲リストノード.cs | 6 +- .../ステージ/01.起動/CStage起動.cs | 64 +- .../ステージ/02.タイトル/CActEnumSongs.cs | 84 +- .../ステージ/02.タイトル/CEnumSongs.cs | 240 +-- .../02.タイトル/CStageタイトル.cs | 194 +- .../04.コンフィグ/CActConfigKeyAssign.cs | 332 +-- .../04.コンフィグ/CActConfigList.cs | 1493 ++++++------- .../04.コンフィグ/CStageコンフィグ.cs | 332 +-- .../05.選曲/CActSelectArtistComment.cs | 118 +- .../05.選曲/CActSelectInformation.cs | 64 +- .../ステージ/05.選曲/CActSelectPopupMenu.cs | 224 +- .../05.選曲/CActSelectPreimageパネル.cs | 218 +- .../ステージ/05.選曲/CActSelectPresound.cs | 46 +- .../05.選曲/CActSelectQuickConfig.cs | 382 ++-- .../05.選曲/CActSelectShowCurrentPosition.cs | 36 +- .../CActSelectステータスパネル.cs | 310 +-- .../05.選曲/CActSelect演奏履歴パネル.cs | 58 +- .../ステージ/05.選曲/CActSortSongs.cs | 62 +- .../ステージ/05.選曲/CStage選曲.cs | 467 ++--- .../06.曲読み込み/CStage曲読み込み.cs | 2 +- .../ステージ/07.演奏/CAct演奏AVI.cs | 80 +- .../ステージ/07.演奏/CAct演奏BGA.cs | 258 +-- .../07.演奏/CAct演奏Combo共通.cs | 284 +-- .../07.演奏/CAct演奏Danger共通.cs | 12 +- .../ステージ/07.演奏/CAct演奏RGB共通.cs | 24 +- .../07.演奏/CAct演奏WailingBonus共通.cs | 16 +- .../07.演奏/CAct演奏ゲージ共通.cs | 84 +- .../07.演奏/CAct演奏スクロール速度.cs | 38 +- .../07.演奏/CAct演奏スコア共通.cs | 62 +- .../07.演奏/CAct演奏ステージ失敗.cs | 62 +- .../CAct演奏ステータスパネル共通.cs | 26 +- .../07.演奏/CAct演奏チップファイアGB.cs | 92 +- .../07.演奏/CAct演奏パネル文字列.cs | 74 +- .../CAct演奏レーンフラッシュGB共通.cs | 40 +- .../07.演奏/CAct演奏判定文字列共通.cs | 100 +- .../07.演奏/CAct演奏演奏情報.cs | 26 +- .../ステージ/07.演奏/CInvisibleChip.cs | 72 +- .../07.演奏/CStage演奏画面共通.cs | 2 +- .../C演奏判定ライン座標共通.cs | 174 +- .../ギター画面/CAct演奏GuitarDanger.cs | 34 +- .../ギター画面/CAct演奏GuitarRGB.cs | 58 +- .../CAct演奏GuitarWailingBonus.cs | 88 +- .../ギター画面/CAct演奏Guitarゲージ.cs | 148 +- .../ギター画面/CAct演奏Guitarコンボ.cs | 22 +- .../ギター画面/CAct演奏Guitarスコア.cs | 56 +- .../CAct演奏Guitarステータスパネル.cs | 60 +- .../CAct演奏Guitarチップファイア.cs | 20 +- .../CAct演奏GuitarレーンフラッシュGB.cs | 32 +- .../CAct演奏Guitar判定文字列.cs | 186 +- .../ドラム画面/CAct演奏DrumsDanger.cs | 48 +- .../ドラム画面/CAct演奏DrumsRGB.cs | 44 +- .../ドラム画面/CAct演奏DrumsWailingBonus.cs | 92 +- .../ドラム画面/CAct演奏Drumsグラフ.cs | 330 +-- .../ドラム画面/CAct演奏Drumsゲージ.cs | 156 +- .../ドラム画面/CAct演奏DrumsコンボDGB.cs | 36 +- .../ドラム画面/CAct演奏Drumsスコア.cs | 120 +- .../CAct演奏Drumsステータスパネル.cs | 36 +- .../CAct演奏DrumsチップファイアD.cs | 414 ++-- .../CAct演奏DrumsチップファイアGB.cs | 18 +- .../ドラム画面/CAct演奏Drumsパッド.cs | 86 +- .../CAct演奏DrumsレーンフラッシュD.cs | 100 +- .../CAct演奏DrumsレーンフラッシュGB.cs | 32 +- .../CAct演奏Drums判定文字列.cs | 272 +-- .../ドラム画面/CStage演奏ドラム画面.cs | 2 +- .../ステージ/08.結果/CActResultImage.cs | 142 +- .../08.結果/CActResultParameterPanel.cs | 292 +-- .../ステージ/08.結果/CActResultRank.cs | 92 +- .../ステージ/08.結果/CActResultSongBar.cs | 80 +- .../ステージ/08.結果/CStage結果.cs | 665 +++--- .../ステージ/09.終了/CStage終了.cs | 28 +- .../ステージ/10.ChangeSkin/CStageChangeSkin.cs | 18 +- .../コード/ステージ/CActDFPFont.cs | 446 ++-- .../コード/ステージ/CActFIFOBlack.cs | 22 +- .../コード/ステージ/CActFIFOWhite.cs | 20 +- .../コード/ステージ/CActLVLNFont.cs | 2 +- .../ステージ/CActオプションパネル.cs | 78 +- .../コード/ステージ/CDTXVmode.cs | 124 +- .../コード/ステージ/CStage.cs | 2 +- .../コード/プラグイン/CPluginHost.cs | 18 +- .../コード/プラグイン/IPluginActivity.cs | 18 +- .../コード/プラグイン/IPluginHost.cs | 6 +- .../コード/全体/CActFlushGPU.cs | 16 +- .../コード/全体/CConfigIni.cs | 2186 ++++++++++---------- .../コード/全体/CDTXVersion.cs | 82 +- .../コード/全体/CPad.cs | 100 +- .../コード/全体/CPreviewMagnifier.cs | 46 +- .../コード/全体/CPrivateFastFont.cs | 69 +- .../コード/全体/CPrivateFont.cs | 138 +- .../コード/全体/CSkin.cs | 346 ++-- .../コード/全体/C定数.cs | 702 +++---- .../コード/全体/C文字コンソール.cs | 50 +- .../コード/全体/Program.cs | 138 +- 105 files changed, 8793 insertions(+), 8751 deletions(-) diff --git a/DTXManiaプロジェクト/コード/アイテム/CItemBase.cs b/DTXManiaプロジェクト/コード/アイテム/CItemBase.cs index 0c0956b1..1a5a0d30 100644 --- a/DTXManiaプロジェクト/コード/アイテム/CItemBase.cs +++ b/DTXManiaプロジェクト/コード/アイテム/CItemBase.cs @@ -42,35 +42,39 @@ namespace DTXMania this.str項目名 = ""; this.str説明文 = ""; } - public CItemBase( string str項目名 ) + public CItemBase(string str項目名) : this() { - this.t初期化( str項目名 ); + this.t初期化(str項目名); } public CItemBase(string str項目名, string str説明文jp) - : this() { + : this() + { this.t初期化(str項目名, str説明文jp); } - public CItemBase(string str項目名, string str説明文jp, string str説明文en) - : this() { + public CItemBase(string str項目名, string str説明文jp, string str説明文en) + : this() + { this.t初期化(str項目名, str説明文jp, str説明文en); } public CItemBase(string str項目名, Eパネル種別 eパネル種別) : this() { - this.t初期化( str項目名, eパネル種別 ); + this.t初期化(str項目名, eパネル種別); } public CItemBase(string str項目名, Eパネル種別 eパネル種別, string str説明文jp) - : this() { + : this() + { this.t初期化(str項目名, eパネル種別, str説明文jp); } public CItemBase(string str項目名, Eパネル種別 eパネル種別, string str説明文jp, string str説明文en) - : this() { + : this() + { this.t初期化(str項目名, eパネル種別, str説明文jp, str説明文en); } - + // メソッド;子クラスで実装する public virtual void tEnter押下() @@ -82,25 +86,29 @@ namespace DTXMania public virtual void t項目値を前へ移動() { } - public virtual void t初期化( string str項目名 ) + public virtual void t初期化(string str項目名) { - this.t初期化( str項目名, Eパネル種別.通常 ); + this.t初期化(str項目名, Eパネル種別.通常); } - public virtual void t初期化(string str項目名, string str説明文jp) { + public virtual void t初期化(string str項目名, string str説明文jp) + { this.t初期化(str項目名, Eパネル種別.通常, str説明文jp, str説明文jp); } - public virtual void t初期化(string str項目名, string str説明文jp, string str説明文en) { + public virtual void t初期化(string str項目名, string str説明文jp, string str説明文en) + { this.t初期化(str項目名, Eパネル種別.通常, str説明文jp, str説明文en); } - public virtual void t初期化( string str項目名, Eパネル種別 eパネル種別 ) + public virtual void t初期化(string str項目名, Eパネル種別 eパネル種別) { this.t初期化(str項目名, eパネル種別, "", ""); } - public virtual void t初期化(string str項目名, Eパネル種別 eパネル種別, string str説明文jp) { + public virtual void t初期化(string str項目名, Eパネル種別 eパネル種別, string str説明文jp) + { this.t初期化(str項目名, eパネル種別, str説明文jp, str説明文jp); } - public virtual void t初期化(string str項目名, Eパネル種別 eパネル種別, string str説明文jp, string str説明文en) { + public virtual void t初期化(string str項目名, Eパネル種別 eパネル種別, string str説明文jp, string str説明文en) + { this.str項目名 = str項目名; this.eパネル種別 = eパネル種別; this.str説明文 = (CultureInfo.CurrentCulture.TwoLetterISOLanguageName == "ja") ? str説明文jp : str説明文en; @@ -113,7 +121,7 @@ namespace DTXMania { return 0; } - public virtual void SetIndex( int index ) + public virtual void SetIndex(int index) { } } diff --git a/DTXManiaプロジェクト/コード/アイテム/CItemInteger.cs b/DTXManiaプロジェクト/コード/アイテム/CItemInteger.cs index 0622820b..a4c207d2 100644 --- a/DTXManiaプロジェクト/コード/アイテム/CItemInteger.cs +++ b/DTXManiaプロジェクト/コード/アイテム/CItemInteger.cs @@ -25,32 +25,36 @@ namespace DTXMania this.n現在の値 = 0; this.b値がフォーカスされている = false; } - public CItemInteger( string str項目名, int n最小値, int n最大値, int n初期値 ) + public CItemInteger(string str項目名, int n最小値, int n最大値, int n初期値) : this() { - this.t初期化( str項目名, n最小値, n最大値, n初期値 ); + this.t初期化(str項目名, n最小値, n最大値, n初期値); } public CItemInteger(string str項目名, int n最小値, int n最大値, int n初期値, string str説明文jp) - : this() { + : this() + { this.t初期化(str項目名, n最小値, n最大値, n初期値, str説明文jp); } public CItemInteger(string str項目名, int n最小値, int n最大値, int n初期値, string str説明文jp, string str説明文en) - : this() { + : this() + { this.t初期化(str項目名, n最小値, n最大値, n初期値, str説明文jp, str説明文en); } - - public CItemInteger( string str項目名, int n最小値, int n最大値, int n初期値, CItemBase.Eパネル種別 eパネル種別 ) + + public CItemInteger(string str項目名, int n最小値, int n最大値, int n初期値, CItemBase.Eパネル種別 eパネル種別) : this() { - this.t初期化( str項目名, n最小値, n最大値, n初期値, eパネル種別 ); + this.t初期化(str項目名, n最小値, n最大値, n初期値, eパネル種別); } public CItemInteger(string str項目名, int n最小値, int n最大値, int n初期値, CItemBase.Eパネル種別 eパネル種別, string str説明文jp) - : this() { + : this() + { this.t初期化(str項目名, n最小値, n最大値, n初期値, eパネル種別, str説明文jp); } public CItemInteger(string str項目名, int n最小値, int n最大値, int n初期値, CItemBase.Eパネル種別 eパネル種別, string str説明文jp, string str説明文en) - : this() { + : this() + { this.t初期化(str項目名, n最小値, n最大値, n初期値, eパネル種別, str説明文jp, str説明文en); } @@ -63,38 +67,42 @@ namespace DTXMania } public override void t項目値を次へ移動() { - if( ++this.n現在の値 > this.n最大値 ) + if (++this.n現在の値 > this.n最大値) { this.n現在の値 = this.n最大値; } } public override void t項目値を前へ移動() { - if( --this.n現在の値 < this.n最小値 ) + if (--this.n現在の値 < this.n最小値) { this.n現在の値 = this.n最小値; } } - public void t初期化( string str項目名, int n最小値, int n最大値, int n初期値 ) + public void t初期化(string str項目名, int n最小値, int n最大値, int n初期値) { - this.t初期化( str項目名, n最小値, n最大値, n初期値, CItemBase.Eパネル種別.通常, "", "" ); + this.t初期化(str項目名, n最小値, n最大値, n初期値, CItemBase.Eパネル種別.通常, "", ""); } - public void t初期化(string str項目名, int n最小値, int n最大値, int n初期値, string str説明文jp) { + public void t初期化(string str項目名, int n最小値, int n最大値, int n初期値, string str説明文jp) + { this.t初期化(str項目名, n最小値, n最大値, n初期値, CItemBase.Eパネル種別.通常, str説明文jp, str説明文jp); } - public void t初期化(string str項目名, int n最小値, int n最大値, int n初期値, string str説明文jp, string str説明文en) { + public void t初期化(string str項目名, int n最小値, int n最大値, int n初期値, string str説明文jp, string str説明文en) + { this.t初期化(str項目名, n最小値, n最大値, n初期値, CItemBase.Eパネル種別.通常, str説明文jp, str説明文en); } - - public void t初期化( string str項目名, int n最小値, int n最大値, int n初期値, CItemBase.Eパネル種別 eパネル種別 ) + + public void t初期化(string str項目名, int n最小値, int n最大値, int n初期値, CItemBase.Eパネル種別 eパネル種別) { - this.t初期化( str項目名, n最小値, n最大値, n初期値, eパネル種別, "", "" ); + this.t初期化(str項目名, n最小値, n最大値, n初期値, eパネル種別, "", ""); } - public void t初期化(string str項目名, int n最小値, int n最大値, int n初期値, CItemBase.Eパネル種別 eパネル種別, string str説明文jp) { + public void t初期化(string str項目名, int n最小値, int n最大値, int n初期値, CItemBase.Eパネル種別 eパネル種別, string str説明文jp) + { this.t初期化(str項目名, n最小値, n最大値, n初期値, eパネル種別, str説明文jp, str説明文jp); } - public void t初期化(string str項目名, int n最小値, int n最大値, int n初期値, CItemBase.Eパネル種別 eパネル種別, string str説明文jp, string str説明文en) { + public void t初期化(string str項目名, int n最小値, int n最大値, int n初期値, CItemBase.Eパネル種別 eパネル種別, string str説明文jp, string str説明文en) + { base.t初期化(str項目名, eパネル種別, str説明文jp, str説明文en); this.n最小値 = n最小値; this.n最大値 = n最大値; @@ -109,7 +117,7 @@ namespace DTXMania { return this.n現在の値; } - public override void SetIndex( int index ) + public override void SetIndex(int index) { this.n現在の値 = index; } diff --git a/DTXManiaプロジェクト/コード/アイテム/CItemList.cs b/DTXManiaプロジェクト/コード/アイテム/CItemList.cs index 5414983f..3b2c92b2 100644 --- a/DTXManiaプロジェクト/コード/アイテム/CItemList.cs +++ b/DTXManiaプロジェクト/コード/アイテム/CItemList.cs @@ -23,27 +23,29 @@ namespace DTXMania this.n現在選択されている項目番号 = 0; this.list項目値 = new List(); } - public CItemList( string str項目名 ) + public CItemList(string str項目名) : this() { - this.t初期化( str項目名 ); + this.t初期化(str項目名); } - public CItemList( string str項目名, CItemBase.Eパネル種別 eパネル種別 ) + public CItemList(string str項目名, CItemBase.Eパネル種別 eパネル種別) : this() { - this.t初期化( str項目名, eパネル種別 ); + this.t初期化(str項目名, eパネル種別); } - public CItemList( string str項目名, CItemBase.Eパネル種別 eパネル種別, int n初期インデックス値, params string[] arg項目リスト ) + public CItemList(string str項目名, CItemBase.Eパネル種別 eパネル種別, int n初期インデックス値, params string[] arg項目リスト) : this() { - this.t初期化( str項目名, eパネル種別, n初期インデックス値, arg項目リスト ); + this.t初期化(str項目名, eパネル種別, n初期インデックス値, arg項目リスト); } public CItemList(string str項目名, CItemBase.Eパネル種別 eパネル種別, int n初期インデックス値, string str説明文jp, params string[] arg項目リスト) - : this() { + : this() + { this.t初期化(str項目名, eパネル種別, n初期インデックス値, str説明文jp, arg項目リスト); } public CItemList(string str項目名, CItemBase.Eパネル種別 eパネル種別, int n初期インデックス値, string str説明文jp, string str説明文en, params string[] arg項目リスト) - : this() { + : this() + { this.t初期化(str項目名, eパネル種別, n初期インデックス値, str説明文jp, str説明文en, arg項目リスト); } @@ -56,47 +58,50 @@ namespace DTXMania } public override void t項目値を次へ移動() { - if( ++this.n現在選択されている項目番号 >= this.list項目値.Count ) + if (++this.n現在選択されている項目番号 >= this.list項目値.Count) { this.n現在選択されている項目番号 = 0; } } public override void t項目値を前へ移動() { - if( --this.n現在選択されている項目番号 < 0 ) + if (--this.n現在選択されている項目番号 < 0) { this.n現在選択されている項目番号 = this.list項目値.Count - 1; } } - public override void t初期化( string str項目名, CItemBase.Eパネル種別 eパネル種別 ) + public override void t初期化(string str項目名, CItemBase.Eパネル種別 eパネル種別) { - base.t初期化( str項目名, eパネル種別 ); + base.t初期化(str項目名, eパネル種別); this.n現在選択されている項目番号 = 0; this.list項目値.Clear(); } - public void t初期化( string str項目名, CItemBase.Eパネル種別 eパネル種別, int n初期インデックス値, params string[] arg項目リスト ) + public void t初期化(string str項目名, CItemBase.Eパネル種別 eパネル種別, int n初期インデックス値, params string[] arg項目リスト) { - this.t初期化(str項目名, eパネル種別, n初期インデックス値, "", "",arg項目リスト); + this.t初期化(str項目名, eパネル種別, n初期インデックス値, "", "", arg項目リスト); } - public void t初期化(string str項目名, CItemBase.Eパネル種別 eパネル種別, int n初期インデックス値, string str説明文jp, params string[] arg項目リスト) { + public void t初期化(string str項目名, CItemBase.Eパネル種別 eパネル種別, int n初期インデックス値, string str説明文jp, params string[] arg項目リスト) + { this.t初期化(str項目名, eパネル種別, n初期インデックス値, str説明文jp, str説明文jp, arg項目リスト); } - public void t初期化(string str項目名, CItemBase.Eパネル種別 eパネル種別, int n初期インデックス値, string str説明文jp, string str説明文en, params string[] arg項目リスト) { + public void t初期化(string str項目名, CItemBase.Eパネル種別 eパネル種別, int n初期インデックス値, string str説明文jp, string str説明文en, params string[] arg項目リスト) + { base.t初期化(str項目名, eパネル種別, str説明文jp, str説明文en); this.n現在選択されている項目番号 = n初期インデックス値; - foreach (string str in arg項目リスト) { + foreach (string str in arg項目リスト) + { this.list項目値.Add(str); } } public override object obj現在値() { - return this.list項目値[ n現在選択されている項目番号 ]; + return this.list項目値[n現在選択されている項目番号]; } public override int GetIndex() { return n現在選択されている項目番号; } - public override void SetIndex( int index ) + public override void SetIndex(int index) { n現在選択されている項目番号 = index; } @@ -119,29 +124,30 @@ namespace DTXMania this.n現在選択されている項目番号 = 0; this.list項目値 = new List(); } - public CSwitchItemList( string str項目名 ) + public CSwitchItemList(string str項目名) : this() { - this.t初期化( str項目名 ); + this.t初期化(str項目名); } - public CSwitchItemList( string str項目名, CItemBase.Eパネル種別 eパネル種別 ) + public CSwitchItemList(string str項目名, CItemBase.Eパネル種別 eパネル種別) : this() { - this.t初期化( str項目名, eパネル種別 ); + this.t初期化(str項目名, eパネル種別); } - public CSwitchItemList( string str項目名, CItemBase.Eパネル種別 eパネル種別, int n初期インデックス値, params string[] arg項目リスト ) + public CSwitchItemList(string str項目名, CItemBase.Eパネル種別 eパネル種別, int n初期インデックス値, params string[] arg項目リスト) : this() { - this.t初期化( str項目名, eパネル種別, n初期インデックス値, arg項目リスト ); + this.t初期化(str項目名, eパネル種別, n初期インデックス値, arg項目リスト); } public CSwitchItemList(string str項目名, CItemBase.Eパネル種別 eパネル種別, int n初期インデックス値, string str説明文jp, params string[] arg項目リスト) - : this() { + : this() + { this.t初期化(str項目名, eパネル種別, n初期インデックス値, str説明文jp, arg項目リスト); } - public CSwitchItemList( string str項目名, CItemBase.Eパネル種別 eパネル種別, int n初期インデックス値, string str説明文jp, string str説明文en, params string[] arg項目リスト ) + public CSwitchItemList(string str項目名, CItemBase.Eパネル種別 eパネル種別, int n初期インデックス値, string str説明文jp, string str説明文en, params string[] arg項目リスト) : this() { - this.t初期化( str項目名, eパネル種別, n初期インデックス値, str説明文jp, str説明文en, arg項目リスト ); + this.t初期化(str項目名, eパネル種別, n初期インデックス値, str説明文jp, str説明文en, arg項目リスト); } public override void tEnter押下() diff --git a/DTXManiaプロジェクト/コード/アイテム/CItemThreeState.cs b/DTXManiaプロジェクト/コード/アイテム/CItemThreeState.cs index 172bb6fe..32448b1f 100644 --- a/DTXManiaプロジェクト/コード/アイテム/CItemThreeState.cs +++ b/DTXManiaプロジェクト/コード/アイテム/CItemThreeState.cs @@ -27,31 +27,35 @@ namespace DTXMania base.e種別 = CItemBase.E種別.ONorOFFor不定スリーステート; this.e現在の状態 = E状態.不定; } - public CItemThreeState( string str項目名, E状態 e初期状態 ) + public CItemThreeState(string str項目名, E状態 e初期状態) : this() { - this.t初期化( str項目名, e初期状態 ); + this.t初期化(str項目名, e初期状態); } public CItemThreeState(string str項目名, E状態 e初期状態, string str説明文jp) - : this() { + : this() + { this.t初期化(str項目名, e初期状態, str説明文jp, str説明文jp); } public CItemThreeState(string str項目名, E状態 e初期状態, string str説明文jp, string str説明文en) - : this() { + : this() + { this.t初期化(str項目名, e初期状態, str説明文jp, str説明文en); } - public CItemThreeState( string str項目名, E状態 e初期状態, CItemBase.Eパネル種別 eパネル種別 ) + public CItemThreeState(string str項目名, E状態 e初期状態, CItemBase.Eパネル種別 eパネル種別) : this() { - this.t初期化( str項目名, e初期状態, eパネル種別 ); + this.t初期化(str項目名, e初期状態, eパネル種別); } public CItemThreeState(string str項目名, E状態 e初期状態, CItemBase.Eパネル種別 eパネル種別, string str説明文jp) - : this() { + : this() + { this.t初期化(str項目名, e初期状態, eパネル種別, str説明文jp, str説明文jp); } public CItemThreeState(string str項目名, E状態 e初期状態, CItemBase.Eパネル種別 eパネル種別, string str説明文jp, string str説明文en) - : this() { + : this() + { this.t初期化(str項目名, e初期状態, eパネル種別, str説明文jp, str説明文en); } @@ -64,7 +68,7 @@ namespace DTXMania } public override void t項目値を次へ移動() { - switch( this.e現在の状態 ) + switch (this.e現在の状態) { case E状態.ON: this.e現在の状態 = E状態.OFF; @@ -81,7 +85,7 @@ namespace DTXMania } public override void t項目値を前へ移動() { - switch( this.e現在の状態 ) + switch (this.e現在の状態) { case E状態.ON: this.e現在の状態 = E状態.OFF; @@ -96,31 +100,35 @@ namespace DTXMania return; } } - public void t初期化( string str項目名, E状態 e初期状態 ) + public void t初期化(string str項目名, E状態 e初期状態) { - this.t初期化( str項目名, e初期状態, CItemBase.Eパネル種別.通常 ); + this.t初期化(str項目名, e初期状態, CItemBase.Eパネル種別.通常); } - public void t初期化(string str項目名, E状態 e初期状態, string str説明文jp) { + public void t初期化(string str項目名, E状態 e初期状態, string str説明文jp) + { this.t初期化(str項目名, e初期状態, CItemBase.Eパネル種別.通常, str説明文jp, str説明文jp); } - public void t初期化(string str項目名, E状態 e初期状態, string str説明文jp, string str説明文en) { + public void t初期化(string str項目名, E状態 e初期状態, string str説明文jp, string str説明文en) + { this.t初期化(str項目名, e初期状態, CItemBase.Eパネル種別.通常, str説明文jp, str説明文en); } - public void t初期化( string str項目名, E状態 e初期状態, CItemBase.Eパネル種別 eパネル種別 ) + public void t初期化(string str項目名, E状態 e初期状態, CItemBase.Eパネル種別 eパネル種別) { this.t初期化(str項目名, e初期状態, CItemBase.Eパネル種別.通常, "", ""); } - public void t初期化(string str項目名, E状態 e初期状態, CItemBase.Eパネル種別 eパネル種別, string str説明文jp) { + public void t初期化(string str項目名, E状態 e初期状態, CItemBase.Eパネル種別 eパネル種別, string str説明文jp) + { this.t初期化(str項目名, e初期状態, CItemBase.Eパネル種別.通常, str説明文jp, str説明文jp); } - public void t初期化(string str項目名, E状態 e初期状態, CItemBase.Eパネル種別 eパネル種別, string str説明文jp, string str説明文en) { + public void t初期化(string str項目名, E状態 e初期状態, CItemBase.Eパネル種別 eパネル種別, string str説明文jp, string str説明文en) + { base.t初期化(str項目名, eパネル種別, str説明文jp, str説明文en); this.e現在の状態 = e初期状態; } public override object obj現在値() { - if ( this.e現在の状態 == E状態.不定 ) + if (this.e現在の状態 == E状態.不定) { return "- -"; } @@ -133,22 +141,22 @@ namespace DTXMania { return (int)this.e現在の状態; } - public override void SetIndex( int index ) - { - switch (index ) - { - case 0: - this.e現在の状態 = E状態.ON; - break; - case 1: - this.e現在の状態 = E状態.OFF; - break; - case 2: - this.e現在の状態 = E状態.不定; - break; - default: - throw new ArgumentOutOfRangeException(); - } + public override void SetIndex(int index) + { + switch (index) + { + case 0: + this.e現在の状態 = E状態.ON; + break; + case 1: + this.e現在の状態 = E状態.OFF; + break; + case 2: + this.e現在の状態 = E状態.不定; + break; + default: + throw new ArgumentOutOfRangeException(); + } } } } diff --git a/DTXManiaプロジェクト/コード/アイテム/CItemToggle.cs b/DTXManiaプロジェクト/コード/アイテム/CItemToggle.cs index fbe66173..e2f73529 100644 --- a/DTXManiaプロジェクト/コード/アイテム/CItemToggle.cs +++ b/DTXManiaプロジェクト/コード/アイテム/CItemToggle.cs @@ -13,7 +13,7 @@ namespace DTXMania public bool bON; - + // コンストラクタ public CItemToggle() @@ -21,30 +21,34 @@ namespace DTXMania base.e種別 = CItemBase.E種別.ONorOFFトグル; this.bON = false; } - public CItemToggle( string str項目名, bool b初期状態 ) + public CItemToggle(string str項目名, bool b初期状態) : this() { - this.t初期化( str項目名, b初期状態 ); + this.t初期化(str項目名, b初期状態); } public CItemToggle(string str項目名, bool b初期状態, string str説明文jp) - : this() { + : this() + { this.t初期化(str項目名, b初期状態, str説明文jp); } public CItemToggle(string str項目名, bool b初期状態, string str説明文jp, string str説明文en) - : this() { + : this() + { this.t初期化(str項目名, b初期状態, str説明文jp, str説明文en); } public CItemToggle(string str項目名, bool b初期状態, CItemBase.Eパネル種別 eパネル種別) : this() { - this.t初期化( str項目名, b初期状態, eパネル種別 ); + this.t初期化(str項目名, b初期状態, eパネル種別); } public CItemToggle(string str項目名, bool b初期状態, CItemBase.Eパネル種別 eパネル種別, string str説明文jp) - : this() { + : this() + { this.t初期化(str項目名, b初期状態, eパネル種別, str説明文jp); } public CItemToggle(string str項目名, bool b初期状態, CItemBase.Eパネル種別 eパネル種別, string str説明文jp, string str説明文en) - : this() { + : this() + { this.t初期化(str項目名, b初期状態, eパネル種別, str説明文jp, str説明文en); } @@ -63,14 +67,16 @@ namespace DTXMania { this.t項目値を次へ移動(); } - public void t初期化( string str項目名, bool b初期状態 ) + public void t初期化(string str項目名, bool b初期状態) { - this.t初期化( str項目名, b初期状態, CItemBase.Eパネル種別.通常 ); + this.t初期化(str項目名, b初期状態, CItemBase.Eパネル種別.通常); } - public void t初期化(string str項目名, bool b初期状態, string str説明文jp) { + public void t初期化(string str項目名, bool b初期状態, string str説明文jp) + { this.t初期化(str項目名, b初期状態, CItemBase.Eパネル種別.通常, str説明文jp, str説明文jp); } - public void t初期化(string str項目名, bool b初期状態, string str説明文jp, string str説明文en) { + public void t初期化(string str項目名, bool b初期状態, string str説明文jp, string str説明文en) + { this.t初期化(str項目名, b初期状態, CItemBase.Eパネル種別.通常, str説明文jp, str説明文en); } @@ -78,24 +84,26 @@ namespace DTXMania { this.t初期化(str項目名, b初期状態, eパネル種別, "", ""); } - public void t初期化(string str項目名, bool b初期状態, CItemBase.Eパネル種別 eパネル種別, string str説明文jp) { + public void t初期化(string str項目名, bool b初期状態, CItemBase.Eパネル種別 eパネル種別, string str説明文jp) + { this.t初期化(str項目名, b初期状態, eパネル種別, str説明文jp, str説明文jp); } - public void t初期化(string str項目名, bool b初期状態, CItemBase.Eパネル種別 eパネル種別, string str説明文jp, string str説明文en) { + public void t初期化(string str項目名, bool b初期状態, CItemBase.Eパネル種別 eパネル種別, string str説明文jp, string str説明文en) + { base.t初期化(str項目名, eパネル種別, str説明文jp, str説明文en); this.bON = b初期状態; } public override object obj現在値() { - return ( this.bON ) ? "ON" : "OFF"; + return (this.bON) ? "ON" : "OFF"; } public override int GetIndex() { - return ( this.bON ) ? 1 : 0; + return (this.bON) ? 1 : 0; } - public override void SetIndex( int index ) + public override void SetIndex(int index) { - switch ( index ) + switch (index) { case 0: this.bON = false; diff --git a/DTXManiaプロジェクト/コード/スコア、曲/CBoxDef.cs b/DTXManiaプロジェクト/コード/スコア、曲/CBoxDef.cs index 9e35a596..f2206477 100644 --- a/DTXManiaプロジェクト/コード/スコア、曲/CBoxDef.cs +++ b/DTXManiaプロジェクト/コード/スコア、曲/CBoxDef.cs @@ -35,109 +35,109 @@ namespace DTXMania this.Preimage = ""; this.Premovie = ""; this.Presound = ""; - this.Color = ColorTranslator.FromHtml( "White" ); + this.Color = ColorTranslator.FromHtml("White"); this.PerfectRange = -1; this.GreatRange = -1; this.GoodRange = -1; this.PoorRange = -1; this.SkinPath = ""; } - public CBoxDef( string boxdefファイル名 ) + public CBoxDef(string boxdefファイル名) : this() { - this.t読み込み( boxdefファイル名 ); + this.t読み込み(boxdefファイル名); } // メソッド - public void t読み込み( string boxdefファイル名 ) + public void t読み込み(string boxdefファイル名) { - StreamReader reader = new StreamReader( boxdefファイル名, Encoding.GetEncoding( "Shift_JIS" ) ); + StreamReader reader = new StreamReader(boxdefファイル名, Encoding.GetEncoding("Shift_JIS")); string str = null; - while( ( str = reader.ReadLine() ) != null ) + while ((str = reader.ReadLine()) != null) { - if( str.Length != 0 ) + if (str.Length != 0) { try { char[] ignoreCharsWoColon = new char[] { ' ', '\t' }; - str = str.TrimStart( ignoreCharsWoColon ); - if( ( str[ 0 ] == '#' ) && ( str[ 0 ] != ';' ) ) + str = str.TrimStart(ignoreCharsWoColon); + if ((str[0] == '#') && (str[0] != ';')) { - if( str.IndexOf( ';' ) != -1 ) + if (str.IndexOf(';') != -1) { - str = str.Substring( 0, str.IndexOf( ';' ) ); + str = str.Substring(0, str.IndexOf(';')); } char[] ignoreChars = new char[] { ':', ' ', '\t' }; - - if ( str.StartsWith( "#TITLE", StringComparison.OrdinalIgnoreCase ) ) + + if (str.StartsWith("#TITLE", StringComparison.OrdinalIgnoreCase)) { - this.Title = str.Substring( 6 ).Trim( ignoreChars ); + this.Title = str.Substring(6).Trim(ignoreChars); } - else if( str.StartsWith( "#ARTIST", StringComparison.OrdinalIgnoreCase ) ) + else if (str.StartsWith("#ARTIST", StringComparison.OrdinalIgnoreCase)) { - this.Artist = str.Substring( 7 ).Trim( ignoreChars ); + this.Artist = str.Substring(7).Trim(ignoreChars); } - else if( str.StartsWith( "#COMMENT", StringComparison.OrdinalIgnoreCase ) ) + else if (str.StartsWith("#COMMENT", StringComparison.OrdinalIgnoreCase)) { - this.Comment = str.Substring( 8 ).Trim( ignoreChars ); + this.Comment = str.Substring(8).Trim(ignoreChars); } - else if( str.StartsWith( "#GENRE", StringComparison.OrdinalIgnoreCase ) ) + else if (str.StartsWith("#GENRE", StringComparison.OrdinalIgnoreCase)) { - this.Genre = str.Substring( 6 ).Trim( ignoreChars ); + this.Genre = str.Substring(6).Trim(ignoreChars); } - else if( str.StartsWith( "#PREVIEW", StringComparison.OrdinalIgnoreCase ) ) + else if (str.StartsWith("#PREVIEW", StringComparison.OrdinalIgnoreCase)) { - this.Presound = str.Substring( 8 ).Trim( ignoreChars ); + this.Presound = str.Substring(8).Trim(ignoreChars); } - else if( str.StartsWith( "#PREIMAGE", StringComparison.OrdinalIgnoreCase ) ) + else if (str.StartsWith("#PREIMAGE", StringComparison.OrdinalIgnoreCase)) { - this.Preimage = str.Substring( 9 ).Trim( ignoreChars ); + this.Preimage = str.Substring(9).Trim(ignoreChars); } - else if( str.StartsWith( "#PREMOVIE", StringComparison.OrdinalIgnoreCase ) ) + else if (str.StartsWith("#PREMOVIE", StringComparison.OrdinalIgnoreCase)) { - this.Premovie = str.Substring( 9 ).Trim( ignoreChars ); + this.Premovie = str.Substring(9).Trim(ignoreChars); } - else if ( str.StartsWith( "#SKINPATH100", StringComparison.OrdinalIgnoreCase ) ) + else if (str.StartsWith("#SKINPATH100", StringComparison.OrdinalIgnoreCase)) { - this.SkinPath = str.Substring( 12 ).Trim( ignoreChars ); + this.SkinPath = str.Substring(12).Trim(ignoreChars); } - else if ( str.StartsWith( "#FONTCOLOR", StringComparison.OrdinalIgnoreCase ) ) + else if (str.StartsWith("#FONTCOLOR", StringComparison.OrdinalIgnoreCase)) { - this.Color = ColorTranslator.FromHtml( str.Substring( 10 ).Trim( ignoreChars ) ); + this.Color = ColorTranslator.FromHtml(str.Substring(10).Trim(ignoreChars)); } - else if( str.StartsWith( "#PERFECTRANGE", StringComparison.OrdinalIgnoreCase ) ) + else if (str.StartsWith("#PERFECTRANGE", StringComparison.OrdinalIgnoreCase)) { int range = 0; - if ( int.TryParse( str.Substring( 13 ).Trim( ignoreChars ), out range ) && ( range >= 0 ) ) + if (int.TryParse(str.Substring(13).Trim(ignoreChars), out range) && (range >= 0)) { this.PerfectRange = range; } } - else if( str.StartsWith( "#GREATRANGE", StringComparison.OrdinalIgnoreCase ) ) + else if (str.StartsWith("#GREATRANGE", StringComparison.OrdinalIgnoreCase)) { int range = 0; - if ( int.TryParse( str.Substring( 11 ).Trim( ignoreChars ), out range ) && ( range >= 0 ) ) + if (int.TryParse(str.Substring(11).Trim(ignoreChars), out range) && (range >= 0)) { this.GreatRange = range; } } - else if( str.StartsWith( "#GOODRANGE", StringComparison.OrdinalIgnoreCase ) ) + else if (str.StartsWith("#GOODRANGE", StringComparison.OrdinalIgnoreCase)) { int range = 0; - if ( int.TryParse( str.Substring( 10 ).Trim( ignoreChars ), out range ) && ( range >= 0 ) ) + if (int.TryParse(str.Substring(10).Trim(ignoreChars), out range) && (range >= 0)) { this.GoodRange = range; } } - else if( str.StartsWith( "#POORRANGE", StringComparison.OrdinalIgnoreCase ) ) + else if (str.StartsWith("#POORRANGE", StringComparison.OrdinalIgnoreCase)) { int range = 0; - if ( int.TryParse( str.Substring( 10 ).Trim( ignoreChars ), out range ) && ( range >= 0 ) ) + if (int.TryParse(str.Substring(10).Trim(ignoreChars), out range) && (range >= 0)) { this.PoorRange = range; } diff --git a/DTXManiaプロジェクト/コード/スコア、曲/CDTX.cs b/DTXManiaプロジェクト/コード/スコア、曲/CDTX.cs index 7266810d..fd3643e7 100644 --- a/DTXManiaプロジェクト/コード/スコア、曲/CDTX.cs +++ b/DTXManiaプロジェクト/コード/スコア、曲/CDTX.cs @@ -730,7 +730,7 @@ namespace DTXMania n小節番号 = chip.n発声位置 / 384; seed = CDTXMania.app.Random.Next(6); } - + chip.RandomizeRGB(eRandom, seed, bOpenChip); // #23546 2010.10.28 yyagi fixed (bチップがある.Bass→bチップがある.OpenBass) // Label_02C4: @@ -1014,7 +1014,7 @@ namespace DTXMania //DebugOut_CChipList( listRemoveMixerChannel ); //listRemoveTiming.RemoveAt( index ); } - CChip c = new CChip(n新RemoveMixer位置,listRemoveTiming[index].n整数値, listRemoveTiming[index].n整数値_内部番号, Ech定義.MixerRemove,n新RemoveMixer時刻ms,false);// mixer削除時刻を更新(遅延)する + CChip c = new CChip(n新RemoveMixer位置, listRemoveTiming[index].n整数値, listRemoveTiming[index].n整数値_内部番号, Ech定義.MixerRemove, n新RemoveMixer時刻ms, false);// mixer削除時刻を更新(遅延)する listRemoveTiming[index] = c; //listRemoveTiming[ index ].n発声時刻ms = n新RemoveMixer時刻ms; // mixer削除時刻を更新(遅延)する //listRemoveTiming[ index ].n発声位置 = n新RemoveMixer位置; @@ -1023,7 +1023,7 @@ namespace DTXMania } else // 過去に同じチップを発音していないor { // 発音していたが既にmixer削除確定していたなら - CChip c = new CChip(n新RemoveMixer位置,pChip.n整数値,pChip.n整数値_内部番号,Ech定義.MixerRemove,n新RemoveMixer時刻ms,false);// 新しくmixer削除候補として追加する + CChip c = new CChip(n新RemoveMixer位置, pChip.n整数値, pChip.n整数値_内部番号, Ech定義.MixerRemove, n新RemoveMixer時刻ms, false);// 新しくmixer削除候補として追加する //Debug.WriteLine( "Add new chip to listRemoveMixerTiming: " ); //Debug.WriteLine( "ch=" + c.nチャンネル番号.ToString( "x2" ) + ", nWAV番号=" + c.n整数値 + ", time=" + c.n発声時刻ms + ", lasttime=" + listChip[ listChip.Count - 1 ].n発声時刻ms ); listRemoveTiming.Add(c); @@ -1117,7 +1117,7 @@ namespace DTXMania /// public void SwapGuitarBassInfos() // #24063 2011.1.24 yyagi ギターとベースの譜面情報入替 { - foreach(CChip chip in listChip) + foreach (CChip chip in listChip) { chip.SwapGB(); } diff --git a/DTXManiaプロジェクト/コード/スコア、曲/CDTXInput.cs b/DTXManiaプロジェクト/コード/スコア、曲/CDTXInput.cs index 83c5c715..faa6df3e 100644 --- a/DTXManiaプロジェクト/コード/スコア、曲/CDTXInput.cs +++ b/DTXManiaプロジェクト/コード/スコア、曲/CDTXInput.cs @@ -327,7 +327,7 @@ namespace DTXMania } if (((tickBeat + n発声位置_C1_同一小節内) % 384) != 0) { - CChip chip = new CChip(tick384 + (tickBeat + n発声位置_C1_同一小節内), 36*36-1, Ech定義.BeatLine); + CChip chip = new CChip(tick384 + (tickBeat + n発声位置_C1_同一小節内), 36 * 36 - 1, Ech定義.BeatLine); this.listChip.Add(chip); } } @@ -1933,7 +1933,7 @@ namespace DTXMania //----------------- if (this.n無限管理BPM[zz] == -zz) // 初期状態では n無限管理BPM[zz] = -zz である。この場合、#BPMzz がまだ出現していないことを意味する。 { - foreach(CChip chip in listChip) // これまでに出てきたチップのうち、該当する(BPM値が未設定の)BPMチップの値を変更する(仕組み上、必ず後方参照となる)。 + foreach (CChip chip in listChip) // これまでに出てきたチップのうち、該当する(BPM値が未設定の)BPMチップの値を変更する(仕組み上、必ず後方参照となる)。 { chip.AdjustInfiniteManageIntInternalIndex(chip.bBPMチップである, zz, this.n内部番号BPM1to); } @@ -2320,7 +2320,7 @@ namespace DTXMania //----------------- if (this.n無限管理WAV[zz] == -zz) // 初期状態では n無限管理WAV[zz] = -zz である。この場合、#WAVzz がまだ出現していないことを意味する。 { - foreach(CChip chip in listChip) // これまでに出てきたチップのうち、該当する(内部番号が未設定の)WAVチップの値を変更する(仕組み上、必ず後方参照となる)。 + foreach (CChip chip in listChip) // これまでに出てきたチップのうち、該当する(内部番号が未設定の)WAVチップの値を変更する(仕組み上、必ず後方参照となる)。 { chip.AdjustInfiniteManageIntInternalIndex(chip.bWAVを使うチャンネルである, zz, n内部番号WAV1to); } diff --git a/DTXManiaプロジェクト/コード/スコア、曲/CDTXNestedTypes.cs b/DTXManiaプロジェクト/コード/スコア、曲/CDTXNestedTypes.cs index 50baba91..2ee3fad8 100644 --- a/DTXManiaプロジェクト/コード/スコア、曲/CDTXNestedTypes.cs +++ b/DTXManiaプロジェクト/コード/スコア、曲/CDTXNestedTypes.cs @@ -129,15 +129,15 @@ namespace DTXMania public override string ToString() { 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", - 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番号)); + 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番号)); } } public class CBGA @@ -151,11 +151,11 @@ namespace DTXMania public override string ToString() { return string.Format("CBGA{0}, BMP:{1}, 画像側左上座標:{2}x{3}, 画像側右下座標:{4}x{5}, 表示座標:{6}x{7}", - 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); + 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); } } public class CBGAPAN @@ -173,15 +173,15 @@ namespace DTXMania public override string ToString() { 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", - 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番号)); + 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番号)); } } public class CBMP : CBMPbase, IDisposable diff --git a/DTXManiaプロジェクト/コード/スコア、曲/CScoreIni.cs b/DTXManiaプロジェクト/コード/スコア、曲/CScoreIni.cs index ea03fc07..429c9bdf 100644 --- a/DTXManiaプロジェクト/コード/スコア、曲/CScoreIni.cs +++ b/DTXManiaプロジェクト/コード/スコア、曲/CScoreIni.cs @@ -17,7 +17,7 @@ namespace DTXMania // [File] セクション public STファイル stファイル; - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] public struct STファイル { public string Title; @@ -25,12 +25,12 @@ namespace DTXMania public string Hash; public int PlayCountDrums; public int PlayCountGuitar; - public int PlayCountBass; - // #23596 10.11.16 add ikanick-----/ - public int ClearCountDrums; - public int ClearCountGuitar; - public int ClearCountBass; - // #24459 2011.2.24 yyagi----------/ + public int PlayCountBass; + // #23596 10.11.16 add ikanick-----/ + public int ClearCountDrums; + public int ClearCountGuitar; + public int ClearCountBass; + // #24459 2011.2.24 yyagi----------/ public STDGBVALUE BestRank; // --------------------------------/ public int HistoryCount; @@ -40,23 +40,23 @@ namespace DTXMania // 演奏記録セクション(9種類) public STセクション stセクション; - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] public struct STセクション { - public CScoreIni.C演奏記録 HiScoreDrums; - public CScoreIni.C演奏記録 HiSkillDrums; + public CScoreIni.C演奏記録 HiScoreDrums; + public CScoreIni.C演奏記録 HiSkillDrums; public CScoreIni.C演奏記録 HiScoreGuitar; - public CScoreIni.C演奏記録 HiSkillGuitar; + public CScoreIni.C演奏記録 HiSkillGuitar; public CScoreIni.C演奏記録 HiScoreBass; - public CScoreIni.C演奏記録 HiSkillBass; - public CScoreIni.C演奏記録 LastPlayDrums; // #23595 2011.1.9 ikanick - public CScoreIni.C演奏記録 LastPlayGuitar; // - public CScoreIni.C演奏記録 LastPlayBass; // - public CScoreIni.C演奏記録 this[ int index ] + public CScoreIni.C演奏記録 HiSkillBass; + public CScoreIni.C演奏記録 LastPlayDrums; // #23595 2011.1.9 ikanick + public CScoreIni.C演奏記録 LastPlayGuitar; // + public CScoreIni.C演奏記録 LastPlayBass; // + public CScoreIni.C演奏記録 this[int index] { get { - switch( index ) + switch (index) { case 0: return this.HiScoreDrums; @@ -73,25 +73,25 @@ namespace DTXMania case 4: return this.HiScoreBass; - case 5: - return this.HiSkillBass; + case 5: + return this.HiSkillBass; - // #23595 2011.1.9 ikanick - case 6: - return this.LastPlayDrums; + // #23595 2011.1.9 ikanick + case 6: + return this.LastPlayDrums; - case 7: - return this.LastPlayGuitar; + case 7: + return this.LastPlayGuitar; - case 8: - return this.LastPlayBass; - //------------ + case 8: + return this.LastPlayBass; + //------------ } throw new IndexOutOfRangeException(); } set { - switch( index ) + switch (index) { case 0: this.HiScoreDrums = value; @@ -111,24 +111,24 @@ namespace DTXMania case 4: this.HiScoreBass = value; - return; + return; - case 5: - this.HiSkillBass = value; - return; - // #23595 2011.1.9 ikanick - case 6: - this.LastPlayDrums = value; - return; + case 5: + this.HiSkillBass = value; + return; + // #23595 2011.1.9 ikanick + case 6: + this.LastPlayDrums = value; + return; - case 7: - this.LastPlayGuitar = value; - return; + case 7: + this.LastPlayGuitar = value; + return; - case 8: - this.LastPlayBass = value; - return; - //------------------ + case 8: + this.LastPlayBass = value; + return; + //------------------ } throw new IndexOutOfRangeException(); } @@ -299,7 +299,7 @@ namespace DTXMania { get { - return ( ( this.n最大コンボ数 > 0 ) && ( this.n最大コンボ数 == ( this.nPerfect数 + this.nGreat数 + this.nGood数 + this.nPoor数 + this.nMiss数 ) ) ); + return ((this.n最大コンボ数 > 0) && (this.n最大コンボ数 == (this.nPerfect数 + this.nGreat数 + this.nGood数 + this.nPoor数 + this.nMiss数))); } } @@ -484,7 +484,7 @@ namespace DTXMania /// public string iniファイル名 { - get; + get; private set; } @@ -500,30 +500,30 @@ namespace DTXMania stファイル.Name = ""; stファイル.Hash = ""; stファイル.History = new string[] { "", "", "", "", "" }; - stファイル.BestRank.Drums = (int)ERANK.UNKNOWN; // #24459 2011.2.24 yyagi + stファイル.BestRank.Drums = (int)ERANK.UNKNOWN; // #24459 2011.2.24 yyagi stファイル.BestRank.Guitar = (int)ERANK.UNKNOWN; // - stファイル.BestRank.Bass = (int)ERANK.UNKNOWN; // - + stファイル.BestRank.Bass = (int)ERANK.UNKNOWN; // + this.stセクション = new STセクション(); stセクション.HiScoreDrums = new C演奏記録(); stセクション.HiSkillDrums = new C演奏記録(); stセクション.HiScoreGuitar = new C演奏記録(); - stセクション.HiSkillGuitar = new C演奏記録(); - stセクション.HiScoreBass = new C演奏記録(); - stセクション.HiSkillBass = new C演奏記録(); - stセクション.LastPlayDrums = new C演奏記録(); - stセクション.LastPlayGuitar = new C演奏記録(); - stセクション.LastPlayBass = new C演奏記録(); + stセクション.HiSkillGuitar = new C演奏記録(); + stセクション.HiScoreBass = new C演奏記録(); + stセクション.HiSkillBass = new C演奏記録(); + stセクション.LastPlayDrums = new C演奏記録(); + stセクション.LastPlayGuitar = new C演奏記録(); + stセクション.LastPlayBass = new C演奏記録(); } /// /// 初期化後にiniファイルを読み込むコンストラクタ。 /// 読み込んだiniに不正値があれば、それが含まれるセクションをリセットする。 /// - public CScoreIni( string str読み込むiniファイル ) + public CScoreIni(string str読み込むiniファイル) : this() { - this.t読み込み( str読み込むiniファイル ); + this.t読み込み(str読み込むiniファイル); this.t全演奏記録セクションの整合性をチェックし不整合があればリセットする(); } @@ -536,22 +536,22 @@ namespace DTXMania /// /// 判定するセクション。 /// 正当である(整合性がある)場合は true。 - public bool b整合性がある( Eセクション種別 eセクション ) + public bool b整合性がある(Eセクション種別 eセクション) { return true; // オープンソース化に伴い、整合性チェックを無効化。(2010.10.21) } - + /// /// 指定されたファイルの内容から MD5 値を求め、それを16進数に変換した文字列を返す。 /// /// MD5 を求めるファイル名。 /// 算出結果の MD5 を16進数で並べた文字列。 - public static string tファイルのMD5を求めて返す( string ファイル名 ) + public static string tファイルのMD5を求めて返す(string ファイル名) { byte[] buffer = null; - FileStream stream = new FileStream( ファイル名, FileMode.Open, FileAccess.Read ); - buffer = new byte[ stream.Length ]; - stream.Read( buffer, 0, (int) stream.Length ); + FileStream stream = new FileStream(ファイル名, FileMode.Open, FileAccess.Read); + buffer = new byte[stream.Length]; + stream.Read(buffer, 0, (int)stream.Length); stream.Close(); StringBuilder builder = new StringBuilder(0x21); { @@ -562,25 +562,25 @@ namespace DTXMania } return builder.ToString(); } - + /// /// 指定された .score.ini を読み込む。内容の真偽は判定しない。 /// /// 読み込む .score.ini ファイルを指定します(絶対パスが安全)。 - public void t読み込み( string iniファイル名 ) + public void t読み込み(string iniファイル名) { - this.iniファイルのあるフォルダ名 = Path.GetDirectoryName( iniファイル名 ); - this.iniファイル名 = Path.GetFileName( iniファイル名 ); + this.iniファイルのあるフォルダ名 = Path.GetDirectoryName(iniファイル名); + this.iniファイル名 = Path.GetFileName(iniファイル名); Eセクション種別 section = Eセクション種別.Unknown; - if( File.Exists( iniファイル名 ) ) + if (File.Exists(iniファイル名)) { string str; - StreamReader reader = new StreamReader( iniファイル名, Encoding.GetEncoding( "Shift_JIS" ) ); - while( ( str = reader.ReadLine() ) != null ) + StreamReader reader = new StreamReader(iniファイル名, Encoding.GetEncoding("Shift_JIS")); + while ((str = reader.ReadLine()) != null) { - str = str.Replace( '\t', ' ' ).TrimStart( new char[] { '\t', ' ' } ); - if( ( str.Length != 0 ) && ( str[ 0 ] != ';' ) ) + str = str.Replace('\t', ' ').TrimStart(new char[] { '\t', ' ' }); + if ((str.Length != 0) && (str[0] != ';')) { try { @@ -588,57 +588,57 @@ namespace DTXMania string para; C演奏記録 c演奏記録; #region [ section ] - if ( str[ 0 ] == '[' ) + if (str[0] == '[') { - StringBuilder builder = new StringBuilder( 0x20 ); + StringBuilder builder = new StringBuilder(0x20); int num = 1; - while( ( num < str.Length ) && ( str[ num ] != ']' ) ) + while ((num < str.Length) && (str[num] != ']')) { - builder.Append( str[ num++ ] ); + builder.Append(str[num++]); } string str2 = builder.ToString(); - if( str2.Equals( "File" ) ) + if (str2.Equals("File")) { section = Eセクション種別.File; } - else if( str2.Equals( "HiScore.Drums" ) ) + else if (str2.Equals("HiScore.Drums")) { section = Eセクション種別.HiScoreDrums; } - else if( str2.Equals( "HiSkill.Drums" ) ) + else if (str2.Equals("HiSkill.Drums")) { section = Eセクション種別.HiSkillDrums; } - else if( str2.Equals( "HiScore.Guitar" ) ) + else if (str2.Equals("HiScore.Guitar")) { section = Eセクション種別.HiScoreGuitar; } - else if( str2.Equals( "HiSkill.Guitar" ) ) + else if (str2.Equals("HiSkill.Guitar")) { section = Eセクション種別.HiSkillGuitar; } - else if( str2.Equals( "HiScore.Bass" ) ) + else if (str2.Equals("HiScore.Bass")) { section = Eセクション種別.HiScoreBass; - } - else if (str2.Equals("HiSkill.Bass")) - { - section = Eセクション種別.HiSkillBass; - } - // #23595 2011.1.9 ikanick - else if (str2.Equals("LastPlay.Drums")) - { - section = Eセクション種別.LastPlayDrums; - } - else if (str2.Equals("LastPlay.Guitar")) - { - section = Eセクション種別.LastPlayGuitar; - } - else if (str2.Equals("LastPlay.Bass")) - { - section = Eセクション種別.LastPlayBass; - } - //---------------------------------------------------- + } + else if (str2.Equals("HiSkill.Bass")) + { + section = Eセクション種別.HiSkillBass; + } + // #23595 2011.1.9 ikanick + else if (str2.Equals("LastPlay.Drums")) + { + section = Eセクション種別.LastPlayDrums; + } + else if (str2.Equals("LastPlay.Guitar")) + { + section = Eセクション種別.LastPlayGuitar; + } + else if (str2.Equals("LastPlay.Bass")) + { + section = Eセクション種別.LastPlayBass; + } + //---------------------------------------------------- else { section = Eセクション種別.Unknown; @@ -647,16 +647,16 @@ namespace DTXMania #endregion else { - string[] strArray = str.Split( new char[] { '=' } ); - if( strArray.Length == 2 ) + string[] strArray = str.Split(new char[] { '=' }); + if (strArray.Length == 2) { - item = strArray[ 0 ].Trim(); - para = strArray[ 1 ].Trim(); - switch( section ) + item = strArray[0].Trim(); + para = strArray[1].Trim(); + switch (section) { case Eセクション種別.File: { - if( !item.Equals( "Title" ) ) + if (!item.Equals("Title")) { goto Label_01C7; } @@ -668,17 +668,17 @@ namespace DTXMania case Eセクション種別.HiScoreGuitar: case Eセクション種別.HiSkillGuitar: case Eセクション種別.HiScoreBass: - case Eセクション種別.HiSkillBass: - case Eセクション種別.LastPlayDrums:// #23595 2011.1.9 ikanick - case Eセクション種別.LastPlayGuitar: - case Eセクション種別.LastPlayBass: + case Eセクション種別.HiSkillBass: + case Eセクション種別.LastPlayDrums:// #23595 2011.1.9 ikanick + case Eセクション種別.LastPlayGuitar: + case Eセクション種別.LastPlayBass: { - c演奏記録 = this.stセクション[ (int) section ]; - if( !item.Equals( "Score" ) ) + c演奏記録 = this.stセクション[(int)section]; + if (!item.Equals("Score")) { goto Label_03B9; } - c演奏記録.nスコア = long.Parse( para ); + c演奏記録.nスコア = long.Parse(para); continue; } } @@ -687,283 +687,283 @@ namespace DTXMania continue; #region [ File section ] Label_01C7: - if( item.Equals( "Name" ) ) + if (item.Equals("Name")) { this.stファイル.Name = para; } - else if( item.Equals( "Hash" ) ) + else if (item.Equals("Hash")) { this.stファイル.Hash = para; } - else if( item.Equals( "PlayCountDrums" ) ) + else if (item.Equals("PlayCountDrums")) { - this.stファイル.PlayCountDrums = C変換.n値を文字列から取得して範囲内に丸めて返す( para, 0, 99999999, 0 ); + this.stファイル.PlayCountDrums = C変換.n値を文字列から取得して範囲内に丸めて返す(para, 0, 99999999, 0); } - else if( item.Equals( "PlayCountGuitars" ) )// #23596 11.2.5 changed ikanick + else if (item.Equals("PlayCountGuitars"))// #23596 11.2.5 changed ikanick { - this.stファイル.PlayCountGuitar = C変換.n値を文字列から取得して範囲内に丸めて返す( para, 0, 99999999, 0 ); + this.stファイル.PlayCountGuitar = C変換.n値を文字列から取得して範囲内に丸めて返す(para, 0, 99999999, 0); } - else if( item.Equals( "PlayCountBass" ) ) + else if (item.Equals("PlayCountBass")) { - this.stファイル.PlayCountBass = C変換.n値を文字列から取得して範囲内に丸めて返す( para, 0, 99999999, 0 ); - } - // #23596 10.11.16 add ikanick------------------------------------/ - else if (item.Equals("ClearCountDrums")) - { - this.stファイル.ClearCountDrums = C変換.n値を文字列から取得して範囲内に丸めて返す(para, 0, 99999999, 0); - } - else if (item.Equals("ClearCountGuitars"))// #23596 11.2.5 changed ikanick - { - this.stファイル.ClearCountGuitar = C変換.n値を文字列から取得して範囲内に丸めて返す(para, 0, 99999999, 0); - } - else if (item.Equals("ClearCountBass")) - { - this.stファイル.ClearCountBass = C変換.n値を文字列から取得して範囲内に丸めて返す(para, 0, 99999999, 0); - } - // #24459 2011.2.24 yyagi-----------------------------------------/ - else if ( item.Equals( "BestRankDrums" ) ) + this.stファイル.PlayCountBass = C変換.n値を文字列から取得して範囲内に丸めて返す(para, 0, 99999999, 0); + } + // #23596 10.11.16 add ikanick------------------------------------/ + else if (item.Equals("ClearCountDrums")) { - this.stファイル.BestRank.Drums = C変換.n値を文字列から取得して範囲内に丸めて返す( para, (int) ERANK.SS, (int) ERANK.E, (int) ERANK.UNKNOWN ); + this.stファイル.ClearCountDrums = C変換.n値を文字列から取得して範囲内に丸めて返す(para, 0, 99999999, 0); } - else if ( item.Equals( "BestRankGuitar" ) ) + else if (item.Equals("ClearCountGuitars"))// #23596 11.2.5 changed ikanick { - this.stファイル.BestRank.Guitar = C変換.n値を文字列から取得して範囲内に丸めて返す( para, (int) ERANK.SS, (int) ERANK.E, (int) ERANK.UNKNOWN ); + this.stファイル.ClearCountGuitar = C変換.n値を文字列から取得して範囲内に丸めて返す(para, 0, 99999999, 0); } - else if ( item.Equals( "BestRankBass" ) ) + else if (item.Equals("ClearCountBass")) { - this.stファイル.BestRank.Bass = C変換.n値を文字列から取得して範囲内に丸めて返す( para, (int) ERANK.SS, (int) ERANK.E, (int) ERANK.UNKNOWN ); + this.stファイル.ClearCountBass = C変換.n値を文字列から取得して範囲内に丸めて返す(para, 0, 99999999, 0); + } + // #24459 2011.2.24 yyagi-----------------------------------------/ + else if (item.Equals("BestRankDrums")) + { + this.stファイル.BestRank.Drums = C変換.n値を文字列から取得して範囲内に丸めて返す(para, (int)ERANK.SS, (int)ERANK.E, (int)ERANK.UNKNOWN); + } + else if (item.Equals("BestRankGuitar")) + { + this.stファイル.BestRank.Guitar = C変換.n値を文字列から取得して範囲内に丸めて返す(para, (int)ERANK.SS, (int)ERANK.E, (int)ERANK.UNKNOWN); + } + else if (item.Equals("BestRankBass")) + { + this.stファイル.BestRank.Bass = C変換.n値を文字列から取得して範囲内に丸めて返す(para, (int)ERANK.SS, (int)ERANK.E, (int)ERANK.UNKNOWN); } //----------------------------------------------------------------/ - else if ( item.Equals( "History0" ) ) + else if (item.Equals("History0")) { - this.stファイル.History[ 0 ] = para; + this.stファイル.History[0] = para; } - else if( item.Equals( "History1" ) ) + else if (item.Equals("History1")) { - this.stファイル.History[ 1 ] = para; + this.stファイル.History[1] = para; } - else if( item.Equals( "History2" ) ) + else if (item.Equals("History2")) { - this.stファイル.History[ 2 ] = para; + this.stファイル.History[2] = para; } - else if( item.Equals( "History3" ) ) + else if (item.Equals("History3")) { - this.stファイル.History[ 3 ] = para; + this.stファイル.History[3] = para; } - else if( item.Equals( "History4" ) ) + else if (item.Equals("History4")) { - this.stファイル.History[ 4 ] = para; + this.stファイル.History[4] = para; } - else if( item.Equals( "HistoryCount" ) ) + else if (item.Equals("HistoryCount")) { - this.stファイル.HistoryCount = C変換.n値を文字列から取得して範囲内に丸めて返す( para, 0, 99999999, 0 ); + this.stファイル.HistoryCount = C変換.n値を文字列から取得して範囲内に丸めて返す(para, 0, 99999999, 0); } - else if( item.Equals( "BGMAdjust" ) ) + else if (item.Equals("BGMAdjust")) { - this.stファイル.BGMAdjust = C変換.n値を文字列から取得して返す( para, 0 ); + this.stファイル.BGMAdjust = C変換.n値を文字列から取得して返す(para, 0); } continue; #endregion #region [ Score section ] Label_03B9: - if( item.Equals( "PlaySkill" ) ) + if (item.Equals("PlaySkill")) { - c演奏記録.db演奏型スキル値 = (double) decimal.Parse( para ); + c演奏記録.db演奏型スキル値 = (double)decimal.Parse(para); } - else if( item.Equals( "Skill" ) ) + else if (item.Equals("Skill")) { - c演奏記録.dbゲーム型スキル値 = (double) decimal.Parse( para ); + c演奏記録.dbゲーム型スキル値 = (double)decimal.Parse(para); } - else if( item.Equals( "Perfect" ) ) + else if (item.Equals("Perfect")) { - c演奏記録.nPerfect数 = int.Parse( para ); + c演奏記録.nPerfect数 = int.Parse(para); } - else if( item.Equals( "Great" ) ) + else if (item.Equals("Great")) { - c演奏記録.nGreat数 = int.Parse( para ); + c演奏記録.nGreat数 = int.Parse(para); } - else if( item.Equals( "Good" ) ) + else if (item.Equals("Good")) { - c演奏記録.nGood数 = int.Parse( para ); + c演奏記録.nGood数 = int.Parse(para); } - else if( item.Equals( "Poor" ) ) + else if (item.Equals("Poor")) { - c演奏記録.nPoor数 = int.Parse( para ); + c演奏記録.nPoor数 = int.Parse(para); } - else if( item.Equals( "Miss" ) ) + else if (item.Equals("Miss")) { - c演奏記録.nMiss数 = int.Parse( para ); + c演奏記録.nMiss数 = int.Parse(para); } - else if( item.Equals( "MaxCombo" ) ) + else if (item.Equals("MaxCombo")) { - c演奏記録.n最大コンボ数 = int.Parse( para ); + c演奏記録.n最大コンボ数 = int.Parse(para); } - else if( item.Equals( "TotalChips" ) ) + else if (item.Equals("TotalChips")) { - c演奏記録.n全チップ数 = int.Parse( para ); + c演奏記録.n全チップ数 = int.Parse(para); } - else if( item.Equals( "AutoPlay" ) ) + else if (item.Equals("AutoPlay")) { // LCなし LCあり CYとRDが別 Gt/Bs autolane/pick - if( para.Length == 9 || para.Length == 10 || para.Length == 11 || para.Length == 21 ) + if (para.Length == 9 || para.Length == 10 || para.Length == 11 || para.Length == 21) { - for( int i = 0; i < para.Length; i++ ) + for (int i = 0; i < para.Length; i++) { - c演奏記録.bAutoPlay[ i ] = this.ONorOFF( para[ i ] ); + c演奏記録.bAutoPlay[i] = this.ONorOFF(para[i]); } } } - else if ( item.Equals("GBFlip" ) ) + else if (item.Equals("GBFlip")) { - c演奏記録.bギターとベースを入れ替えた = C変換.bONorOFF( para[0] ); + c演奏記録.bギターとベースを入れ替えた = C変換.bONorOFF(para[0]); } - else if ( item.Equals( "Risky" ) ) + else if (item.Equals("Risky")) { - c演奏記録.nRisky = int.Parse( para ); + c演奏記録.nRisky = int.Parse(para); } - else if ( item.Equals( "TightDrums" ) ) + else if (item.Equals("TightDrums")) { - c演奏記録.bTight = C変換.bONorOFF( para[ 0 ] ); + c演奏記録.bTight = C変換.bONorOFF(para[0]); } - else if ( item.Equals( "SuddenDrums" ) ) + else if (item.Equals("SuddenDrums")) { - c演奏記録.bSudden.Drums = C変換.bONorOFF( para[ 0 ] ); + c演奏記録.bSudden.Drums = C変換.bONorOFF(para[0]); } - else if ( item.Equals( "SuddenGuitar" ) ) + else if (item.Equals("SuddenGuitar")) { - c演奏記録.bSudden.Guitar = C変換.bONorOFF( para[ 0 ] ); + c演奏記録.bSudden.Guitar = C変換.bONorOFF(para[0]); } - else if ( item.Equals( "SuddenBass" ) ) + else if (item.Equals("SuddenBass")) { - c演奏記録.bSudden.Bass = C変換.bONorOFF( para[ 0 ] ); + c演奏記録.bSudden.Bass = C変換.bONorOFF(para[0]); } - else if ( item.Equals( "HiddenDrums" ) ) + else if (item.Equals("HiddenDrums")) { - c演奏記録.bHidden.Drums = C変換.bONorOFF( para[ 0 ] ); + c演奏記録.bHidden.Drums = C変換.bONorOFF(para[0]); } - else if ( item.Equals( "HiddenGuitar" ) ) + else if (item.Equals("HiddenGuitar")) { - c演奏記録.bHidden.Guitar = C変換.bONorOFF( para[ 0 ] ); + c演奏記録.bHidden.Guitar = C変換.bONorOFF(para[0]); } - else if ( item.Equals( "HiddenBass" ) ) + else if (item.Equals("HiddenBass")) { - c演奏記録.bHidden.Bass = C変換.bONorOFF( para[ 0 ] ); + c演奏記録.bHidden.Bass = C変換.bONorOFF(para[0]); } - else if ( item.Equals( "InvisibleDrums" ) ) + else if (item.Equals("InvisibleDrums")) { - c演奏記録.eInvisible.Drums = (EInvisible) int.Parse( para ); + c演奏記録.eInvisible.Drums = (EInvisible)int.Parse(para); } - else if ( item.Equals( "InvisibleGuitar" ) ) + else if (item.Equals("InvisibleGuitar")) { - c演奏記録.eInvisible.Guitar = (EInvisible) int.Parse( para ); + c演奏記録.eInvisible.Guitar = (EInvisible)int.Parse(para); } - else if ( item.Equals( "InvisibleBass" ) ) + else if (item.Equals("InvisibleBass")) { - c演奏記録.eInvisible.Bass = (EInvisible) int.Parse( para ); + c演奏記録.eInvisible.Bass = (EInvisible)int.Parse(para); } - else if ( item.Equals( "ReverseDrums" ) ) + else if (item.Equals("ReverseDrums")) { - c演奏記録.bReverse.Drums = C変換.bONorOFF( para[ 0 ] ); + c演奏記録.bReverse.Drums = C変換.bONorOFF(para[0]); } - else if ( item.Equals( "ReverseGuitar" ) ) + else if (item.Equals("ReverseGuitar")) { - c演奏記録.bReverse.Guitar = C変換.bONorOFF( para[ 0 ] ); + c演奏記録.bReverse.Guitar = C変換.bONorOFF(para[0]); } - else if ( item.Equals( "ReverseBass" ) ) + else if (item.Equals("ReverseBass")) { - c演奏記録.bReverse.Bass = C変換.bONorOFF( para[ 0 ] ); + c演奏記録.bReverse.Bass = C変換.bONorOFF(para[0]); } #endregion else { #region [ RandomGuitar ] - if ( item.Equals( "RandomGuitar" ) ) + if (item.Equals("RandomGuitar")) { - switch ( int.Parse( para ) ) + switch (int.Parse(para)) { - case (int) Eランダムモード.OFF: + case (int)Eランダムモード.OFF: { c演奏記録.eRandom.Guitar = Eランダムモード.OFF; continue; } - case (int) Eランダムモード.RANDOM: + case (int)Eランダムモード.RANDOM: { c演奏記録.eRandom.Guitar = Eランダムモード.RANDOM; continue; } - case (int) Eランダムモード.SUPERRANDOM: + case (int)Eランダムモード.SUPERRANDOM: { c演奏記録.eRandom.Guitar = Eランダムモード.SUPERRANDOM; continue; } - case (int) Eランダムモード.HYPERRANDOM: // #25452 2011.6.20 yyagi + case (int)Eランダムモード.HYPERRANDOM: // #25452 2011.6.20 yyagi { c演奏記録.eRandom.Guitar = Eランダムモード.SUPERRANDOM; continue; } } - throw new Exception( "RandomGuitar の値が無効です。" ); + throw new Exception("RandomGuitar の値が無効です。"); } #endregion #region [ RandomBass ] - if ( item.Equals( "RandomBass" ) ) + if (item.Equals("RandomBass")) { - switch ( int.Parse( para ) ) + switch (int.Parse(para)) { - case (int) Eランダムモード.OFF: + case (int)Eランダムモード.OFF: { c演奏記録.eRandom.Bass = Eランダムモード.OFF; continue; } - case (int) Eランダムモード.RANDOM: + case (int)Eランダムモード.RANDOM: { c演奏記録.eRandom.Bass = Eランダムモード.RANDOM; continue; } - case (int) Eランダムモード.SUPERRANDOM: + case (int)Eランダムモード.SUPERRANDOM: { c演奏記録.eRandom.Bass = Eランダムモード.SUPERRANDOM; continue; } - case (int) Eランダムモード.HYPERRANDOM: // #25452 2011.6.20 yyagi + case (int)Eランダムモード.HYPERRANDOM: // #25452 2011.6.20 yyagi { c演奏記録.eRandom.Bass = Eランダムモード.SUPERRANDOM; continue; } } - throw new Exception( "RandomBass の値が無効です。" ); + throw new Exception("RandomBass の値が無効です。"); } #endregion #region [ LightGuitar ] - if ( item.Equals( "LightGuitar" ) ) + if (item.Equals("LightGuitar")) { - c演奏記録.bLight.Guitar = C変換.bONorOFF( para[ 0 ] ); + c演奏記録.bLight.Guitar = C変換.bONorOFF(para[0]); } #endregion #region [ LightBass ] - else if ( item.Equals( "LightBass" ) ) + else if (item.Equals("LightBass")) { - c演奏記録.bLight.Bass = C変換.bONorOFF( para[ 0 ] ); + c演奏記録.bLight.Bass = C変換.bONorOFF(para[0]); } #endregion #region [ LeftGuitar ] - else if ( item.Equals( "LeftGuitar" ) ) + else if (item.Equals("LeftGuitar")) { - c演奏記録.bLeft.Guitar = C変換.bONorOFF( para[ 0 ] ); + c演奏記録.bLeft.Guitar = C変換.bONorOFF(para[0]); } #endregion #region [ LeftBass ] - else if ( item.Equals( "LeftBass" ) ) + else if (item.Equals("LeftBass")) { - c演奏記録.bLeft.Bass = C変換.bONorOFF( para[ 0 ] ); + c演奏記録.bLeft.Bass = C変換.bONorOFF(para[0]); } #endregion else { #region [ Dark ] - if ( item.Equals( "Dark" ) ) + if (item.Equals("Dark")) { - switch ( int.Parse( para ) ) + switch (int.Parse(para)) { case 0: { @@ -981,44 +981,44 @@ namespace DTXMania continue; } } - throw new Exception( "Dark の値が無効です。" ); + throw new Exception("Dark の値が無効です。"); } #endregion #region [ ScrollSpeedDrums ] - if ( item.Equals( "ScrollSpeedDrums" ) ) + if (item.Equals("ScrollSpeedDrums")) { - c演奏記録.f譜面スクロール速度.Drums = (float) decimal.Parse( para ); + c演奏記録.f譜面スクロール速度.Drums = (float)decimal.Parse(para); } #endregion #region [ ScrollSpeedGuitar ] - else if ( item.Equals( "ScrollSpeedGuitar" ) ) + else if (item.Equals("ScrollSpeedGuitar")) { - c演奏記録.f譜面スクロール速度.Guitar = (float) decimal.Parse( para ); + c演奏記録.f譜面スクロール速度.Guitar = (float)decimal.Parse(para); } #endregion #region [ ScrollSpeedBass ] - else if ( item.Equals( "ScrollSpeedBass" ) ) + else if (item.Equals("ScrollSpeedBass")) { - c演奏記録.f譜面スクロール速度.Bass = (float) decimal.Parse( para ); + c演奏記録.f譜面スクロール速度.Bass = (float)decimal.Parse(para); } #endregion #region [ PlaySpeed ] - else if ( item.Equals( "PlaySpeed" ) ) + else if (item.Equals("PlaySpeed")) { - string[] strArray2 = para.Split( new char[] { '/' } ); - if ( strArray2.Length == 2 ) + string[] strArray2 = para.Split(new char[] { '/' }); + if (strArray2.Length == 2) { - c演奏記録.n演奏速度分子 = int.Parse( strArray2[ 0 ] ); - c演奏記録.n演奏速度分母 = int.Parse( strArray2[ 1 ] ); + c演奏記録.n演奏速度分子 = int.Parse(strArray2[0]); + c演奏記録.n演奏速度分母 = int.Parse(strArray2[1]); } } #endregion else { #region [ HHGroup ] - if ( item.Equals( "HHGroup" ) ) + if (item.Equals("HHGroup")) { - switch ( int.Parse( para ) ) + switch (int.Parse(para)) { case 0: { @@ -1041,13 +1041,13 @@ namespace DTXMania continue; } } - throw new Exception( "HHGroup の値が無効です。" ); + throw new Exception("HHGroup の値が無効です。"); } #endregion #region [ FTGroup ] - if ( item.Equals( "FTGroup" ) ) + if (item.Equals("FTGroup")) { - switch ( int.Parse( para ) ) + switch (int.Parse(para)) { case 0: { @@ -1060,13 +1060,13 @@ namespace DTXMania continue; } } - throw new Exception( "FTGroup の値が無効です。" ); + throw new Exception("FTGroup の値が無効です。"); } #endregion #region [ CYGroup ] - if ( item.Equals( "CYGroup" ) ) + if (item.Equals("CYGroup")) { - switch ( int.Parse( para ) ) + switch (int.Parse(para)) { case 0: { @@ -1079,13 +1079,13 @@ namespace DTXMania continue; } } - throw new Exception( "CYGroup の値が無効です。" ); + throw new Exception("CYGroup の値が無効です。"); } #endregion #region [ HitSoundPriorityHH ] - if ( item.Equals( "HitSoundPriorityHH" ) ) + if (item.Equals("HitSoundPriorityHH")) { - switch ( int.Parse( para ) ) + switch (int.Parse(para)) { case 0: { @@ -1098,13 +1098,13 @@ namespace DTXMania continue; } } - throw new Exception( "HitSoundPriorityHH の値が無効です。" ); + throw new Exception("HitSoundPriorityHH の値が無効です。"); } #endregion #region [ HitSoundPriorityFT ] - if ( item.Equals( "HitSoundPriorityFT" ) ) + if (item.Equals("HitSoundPriorityFT")) { - switch ( int.Parse( para ) ) + switch (int.Parse(para)) { case 0: { @@ -1117,13 +1117,13 @@ namespace DTXMania continue; } } - throw new Exception( "HitSoundPriorityFT の値が無効です。" ); + throw new Exception("HitSoundPriorityFT の値が無効です。"); } #endregion #region [ HitSoundPriorityCY ] - if ( item.Equals( "HitSoundPriorityCY" ) ) + if (item.Equals("HitSoundPriorityCY")) { - switch ( int.Parse( para ) ) + switch (int.Parse(para)) { case 0: { @@ -1136,33 +1136,33 @@ namespace DTXMania continue; } } - throw new Exception( "HitSoundPriorityCY の値が無効です。" ); + throw new Exception("HitSoundPriorityCY の値が無効です。"); } #endregion #region [ Guitar ] - if ( item.Equals( "Guitar" ) ) + if (item.Equals("Guitar")) { - c演奏記録.bGuitar有効 = C変換.bONorOFF( para[ 0 ] ); + c演奏記録.bGuitar有効 = C変換.bONorOFF(para[0]); } #endregion #region [ Drums ] - else if ( item.Equals( "Drums" ) ) + else if (item.Equals("Drums")) { - c演奏記録.bDrums有効 = C変換.bONorOFF( para[ 0 ] ); + c演奏記録.bDrums有効 = C変換.bONorOFF(para[0]); } #endregion #region [ StageFailed ] - else if ( item.Equals( "StageFailed" ) ) + else if (item.Equals("StageFailed")) { - c演奏記録.bSTAGEFAILED有効 = C変換.bONorOFF( para[ 0 ] ); + c演奏記録.bSTAGEFAILED有効 = C変換.bONorOFF(para[0]); } #endregion else { #region [ DamageLevel ] - if ( item.Equals( "DamageLevel" ) ) + if (item.Equals("DamageLevel")) { - switch ( int.Parse( para ) ) + switch (int.Parse(para)) { case 0: { @@ -1180,56 +1180,56 @@ namespace DTXMania continue; } } - throw new Exception( "DamageLevel の値が無効です。" ); + throw new Exception("DamageLevel の値が無効です。"); } #endregion - if ( item.Equals( "UseKeyboard" ) ) + if (item.Equals("UseKeyboard")) { - c演奏記録.b演奏にキーボードを使用した = C変換.bONorOFF( para[ 0 ] ); + c演奏記録.b演奏にキーボードを使用した = C変換.bONorOFF(para[0]); } - else if ( item.Equals( "UseMIDIIN" ) ) + else if (item.Equals("UseMIDIIN")) { - c演奏記録.b演奏にMIDI入力を使用した = C変換.bONorOFF( para[ 0 ] ); + c演奏記録.b演奏にMIDI入力を使用した = C変換.bONorOFF(para[0]); } - else if ( item.Equals( "UseJoypad" ) ) + else if (item.Equals("UseJoypad")) { - c演奏記録.b演奏にジョイパッドを使用した = C変換.bONorOFF( para[ 0 ] ); + c演奏記録.b演奏にジョイパッドを使用した = C変換.bONorOFF(para[0]); } - else if ( item.Equals( "UseMouse" ) ) + else if (item.Equals("UseMouse")) { - c演奏記録.b演奏にマウスを使用した = C変換.bONorOFF( para[ 0 ] ); + c演奏記録.b演奏にマウスを使用した = C変換.bONorOFF(para[0]); } - else if ( item.Equals( "PerfectRange" ) ) + else if (item.Equals("PerfectRange")) { - c演奏記録.nPerfectになる範囲ms = int.Parse( para ); + c演奏記録.nPerfectになる範囲ms = int.Parse(para); } - else if ( item.Equals( "GreatRange" ) ) + else if (item.Equals("GreatRange")) { - c演奏記録.nGreatになる範囲ms = int.Parse( para ); + c演奏記録.nGreatになる範囲ms = int.Parse(para); } - else if ( item.Equals( "GoodRange" ) ) + else if (item.Equals("GoodRange")) { - c演奏記録.nGoodになる範囲ms = int.Parse( para ); + c演奏記録.nGoodになる範囲ms = int.Parse(para); } - else if ( item.Equals( "PoorRange" ) ) + else if (item.Equals("PoorRange")) { - c演奏記録.nPoorになる範囲ms = int.Parse( para ); + c演奏記録.nPoorになる範囲ms = int.Parse(para); } - else if ( item.Equals( "DTXManiaVersion" ) ) + else if (item.Equals("DTXManiaVersion")) { c演奏記録.strDTXManiaのバージョン = para; } - else if ( item.Equals( "DateTime" ) ) + else if (item.Equals("DateTime")) { c演奏記録.最終更新日時 = para; } - else if ( item.Equals( "Hash" ) ) + else if (item.Equals("Hash")) { c演奏記録.Hash = para; } - else if ( item.Equals( "9LaneMode" ) ) + else if (item.Equals("9LaneMode")) { - c演奏記録.レーン9モード = C変換.bONorOFF( para[ 0 ] ); + c演奏記録.レーン9モード = C変換.bONorOFF(para[0]); } } } @@ -1237,9 +1237,9 @@ namespace DTXMania } continue; } - catch( Exception exception ) + catch (Exception exception) { - Trace.TraceError( "{0}読み込みを中断します。({1})", exception.Message, iniファイル名 ); + Trace.TraceError("{0}読み込みを中断します。({1})", exception.Message, iniファイル名); break; } } @@ -1248,194 +1248,194 @@ namespace DTXMania } } - internal void tヒストリを追加する( string str追加文字列 ) + internal void tヒストリを追加する(string str追加文字列) { this.stファイル.HistoryCount++; - for( int i = 3; i >= 0; i-- ) - this.stファイル.History[ i + 1 ] = this.stファイル.History[ i ]; + for (int i = 3; i >= 0; i--) + this.stファイル.History[i + 1] = this.stファイル.History[i]; DateTime now = DateTime.Now; - this.stファイル.History[ 0 ] = string.Format( "{0:0}.{1:D2}/{2}/{3} {4}", this.stファイル.HistoryCount, now.Year % 100, now.Month, now.Day, str追加文字列 ); + this.stファイル.History[0] = string.Format("{0:0}.{1:D2}/{2}/{3} {4}", this.stファイル.HistoryCount, now.Year % 100, now.Month, now.Day, str追加文字列); } - internal void t書き出し( string iniファイル名 ) + internal void t書き出し(string iniファイル名) { - this.iniファイルのあるフォルダ名 = Path.GetDirectoryName( iniファイル名 ); - this.iniファイル名 = Path.GetFileName( iniファイル名 ); + this.iniファイルのあるフォルダ名 = Path.GetDirectoryName(iniファイル名); + this.iniファイル名 = Path.GetFileName(iniファイル名); - StreamWriter writer = new StreamWriter( iniファイル名, false, Encoding.GetEncoding( "utf-16" ) ); - writer.WriteLine( "[File]" ); - writer.WriteLine( "Title={0}", this.stファイル.Title ); - writer.WriteLine( "Name={0}", this.stファイル.Name ); - writer.WriteLine( "Hash={0}", this.stファイル.Hash ); - writer.WriteLine( "PlayCountDrums={0}", this.stファイル.PlayCountDrums ); - writer.WriteLine( "PlayCountGuitars={0}", this.stファイル.PlayCountGuitar ); - writer.WriteLine( "PlayCountBass={0}", this.stファイル.PlayCountBass ); - writer.WriteLine( "ClearCountDrums={0}", this.stファイル.ClearCountDrums ); // #23596 10.11.16 add ikanick - writer.WriteLine( "ClearCountGuitars={0}", this.stファイル.ClearCountGuitar ); // - writer.WriteLine( "ClearCountBass={0}", this.stファイル.ClearCountBass ); // - writer.WriteLine( "BestRankDrums={0}", this.stファイル.BestRank.Drums ); // #24459 2011.2.24 yyagi - writer.WriteLine( "BestRankGuitar={0}", this.stファイル.BestRank.Guitar ); // - writer.WriteLine( "BestRankBass={0}", this.stファイル.BestRank.Bass ); // - writer.WriteLine( "HistoryCount={0}", this.stファイル.HistoryCount ); - writer.WriteLine( "History0={0}", this.stファイル.History[ 0 ] ); - writer.WriteLine( "History1={0}", this.stファイル.History[ 1 ] ); - writer.WriteLine( "History2={0}", this.stファイル.History[ 2 ] ); - writer.WriteLine( "History3={0}", this.stファイル.History[ 3 ] ); - writer.WriteLine( "History4={0}", this.stファイル.History[ 4 ] ); - writer.WriteLine( "BGMAdjust={0}", this.stファイル.BGMAdjust ); + StreamWriter writer = new StreamWriter(iniファイル名, false, Encoding.GetEncoding("utf-16")); + writer.WriteLine("[File]"); + writer.WriteLine("Title={0}", this.stファイル.Title); + writer.WriteLine("Name={0}", this.stファイル.Name); + writer.WriteLine("Hash={0}", this.stファイル.Hash); + writer.WriteLine("PlayCountDrums={0}", this.stファイル.PlayCountDrums); + writer.WriteLine("PlayCountGuitars={0}", this.stファイル.PlayCountGuitar); + writer.WriteLine("PlayCountBass={0}", this.stファイル.PlayCountBass); + writer.WriteLine("ClearCountDrums={0}", this.stファイル.ClearCountDrums); // #23596 10.11.16 add ikanick + writer.WriteLine("ClearCountGuitars={0}", this.stファイル.ClearCountGuitar); // + writer.WriteLine("ClearCountBass={0}", this.stファイル.ClearCountBass); // + writer.WriteLine("BestRankDrums={0}", this.stファイル.BestRank.Drums); // #24459 2011.2.24 yyagi + writer.WriteLine("BestRankGuitar={0}", this.stファイル.BestRank.Guitar); // + writer.WriteLine("BestRankBass={0}", this.stファイル.BestRank.Bass); // + writer.WriteLine("HistoryCount={0}", this.stファイル.HistoryCount); + writer.WriteLine("History0={0}", this.stファイル.History[0]); + writer.WriteLine("History1={0}", this.stファイル.History[1]); + writer.WriteLine("History2={0}", this.stファイル.History[2]); + writer.WriteLine("History3={0}", this.stファイル.History[3]); + writer.WriteLine("History4={0}", this.stファイル.History[4]); + writer.WriteLine("BGMAdjust={0}", this.stファイル.BGMAdjust); writer.WriteLine(); - for( int i = 0; i < 9; i++ ) + for (int i = 0; i < 9; i++) { - string[] strArray = { "HiScore.Drums", "HiSkill.Drums", "HiScore.Guitar", "HiSkill.Guitar", "HiScore.Bass", "HiSkill.Bass", "LastPlay.Drums", "LastPlay.Guitar", "LastPlay.Bass" }; - writer.WriteLine( "[{0}]", strArray[ i ] ); - writer.WriteLine( "Score={0}", this.stセクション[ i ].nスコア ); - writer.WriteLine( "PlaySkill={0}", this.stセクション[ i ].db演奏型スキル値 ); - writer.WriteLine( "Skill={0}", this.stセクション[ i ].dbゲーム型スキル値 ); - writer.WriteLine( "Perfect={0}", this.stセクション[ i ].nPerfect数 ); - writer.WriteLine( "Great={0}", this.stセクション[ i ].nGreat数 ); - writer.WriteLine( "Good={0}", this.stセクション[ i ].nGood数 ); - writer.WriteLine( "Poor={0}", this.stセクション[ i ].nPoor数 ); - writer.WriteLine( "Miss={0}", this.stセクション[ i ].nMiss数 ); - writer.WriteLine( "MaxCombo={0}", this.stセクション[ i ].n最大コンボ数 ); - writer.WriteLine( "TotalChips={0}", this.stセクション[ i ].n全チップ数 ); - writer.Write( "AutoPlay=" ); - for ( int j = 0; j < (int) Eレーン.MAX; j++ ) + string[] strArray = { "HiScore.Drums", "HiSkill.Drums", "HiScore.Guitar", "HiSkill.Guitar", "HiScore.Bass", "HiSkill.Bass", "LastPlay.Drums", "LastPlay.Guitar", "LastPlay.Bass" }; + writer.WriteLine("[{0}]", strArray[i]); + writer.WriteLine("Score={0}", this.stセクション[i].nスコア); + writer.WriteLine("PlaySkill={0}", this.stセクション[i].db演奏型スキル値); + writer.WriteLine("Skill={0}", this.stセクション[i].dbゲーム型スキル値); + writer.WriteLine("Perfect={0}", this.stセクション[i].nPerfect数); + writer.WriteLine("Great={0}", this.stセクション[i].nGreat数); + writer.WriteLine("Good={0}", this.stセクション[i].nGood数); + writer.WriteLine("Poor={0}", this.stセクション[i].nPoor数); + writer.WriteLine("Miss={0}", this.stセクション[i].nMiss数); + writer.WriteLine("MaxCombo={0}", this.stセクション[i].n最大コンボ数); + writer.WriteLine("TotalChips={0}", this.stセクション[i].n全チップ数); + writer.Write("AutoPlay="); + for (int j = 0; j < (int)Eレーン.MAX; j++) { - writer.Write( this.stセクション[ i ].bAutoPlay[ j ] ? 1 : 0 ); + writer.Write(this.stセクション[i].bAutoPlay[j] ? 1 : 0); } writer.WriteLine(); - writer.WriteLine( "GBFlip={0}", this.stセクション[i].bギターとベースを入れ替えた ? 1 : 0); - writer.WriteLine( "Risky={0}", this.stセクション[ i ].nRisky ); - writer.WriteLine( "SuddenDrums={0}", this.stセクション[ i ].bSudden.Drums ? 1 : 0 ); - writer.WriteLine( "SuddenGuitar={0}", this.stセクション[ i ].bSudden.Guitar ? 1 : 0 ); - writer.WriteLine( "SuddenBass={0}", this.stセクション[ i ].bSudden.Bass ? 1 : 0 ); - writer.WriteLine( "HiddenDrums={0}", this.stセクション[ i ].bHidden.Drums ? 1 : 0 ); - writer.WriteLine( "HiddenGuitar={0}", this.stセクション[ i ].bHidden.Guitar ? 1 : 0 ); - writer.WriteLine( "HiddenBass={0}", this.stセクション[ i ].bHidden.Bass ? 1 : 0 ); - writer.WriteLine( "InvisibleDrums={0}", (int) this.stセクション[ i ].eInvisible.Drums ); - writer.WriteLine( "InvisibleGuitar={0}", (int) this.stセクション[ i ].eInvisible.Guitar ); - writer.WriteLine( "InvisibleBass={0}", (int) this.stセクション[ i ].eInvisible.Bass ); - writer.WriteLine( "ReverseDrums={0}", this.stセクション[ i ].bReverse.Drums ? 1 : 0 ); - writer.WriteLine( "ReverseGuitar={0}", this.stセクション[ i ].bReverse.Guitar ? 1 : 0 ); - writer.WriteLine( "ReverseBass={0}", this.stセクション[ i ].bReverse.Bass ? 1 : 0 ); - writer.WriteLine( "TightDrums={0}", this.stセクション[ i ].bTight ? 1 : 0 ); - writer.WriteLine( "RandomGuitar={0}", (int) this.stセクション[ i ].eRandom.Guitar ); - writer.WriteLine( "RandomBass={0}", (int) this.stセクション[ i ].eRandom.Bass ); - writer.WriteLine( "LightGuitar={0}", this.stセクション[ i ].bLight.Guitar ? 1 : 0 ); - writer.WriteLine( "LightBass={0}", this.stセクション[ i ].bLight.Bass ? 1 : 0 ); - writer.WriteLine( "LeftGuitar={0}", this.stセクション[ i ].bLeft.Guitar ? 1 : 0 ); - writer.WriteLine( "LeftBass={0}", this.stセクション[ i ].bLeft.Bass ? 1 : 0 ); - writer.WriteLine( "Dark={0}", (int) this.stセクション[ i ].eDark ); - writer.WriteLine( "ScrollSpeedDrums={0}", this.stセクション[ i ].f譜面スクロール速度.Drums ); - writer.WriteLine( "ScrollSpeedGuitar={0}", this.stセクション[ i ].f譜面スクロール速度.Guitar ); - writer.WriteLine( "ScrollSpeedBass={0}", this.stセクション[ i ].f譜面スクロール速度.Bass ); - writer.WriteLine( "PlaySpeed={0}/{1}", this.stセクション[ i ].n演奏速度分子, this.stセクション[ i ].n演奏速度分母 ); - writer.WriteLine( "HHGroup={0}", (int) this.stセクション[ i ].eHHGroup ); - writer.WriteLine( "FTGroup={0}", (int) this.stセクション[ i ].eFTGroup ); - writer.WriteLine( "CYGroup={0}", (int) this.stセクション[ i ].eCYGroup ); - writer.WriteLine( "HitSoundPriorityHH={0}", (int) this.stセクション[ i ].eHitSoundPriorityHH ); - writer.WriteLine( "HitSoundPriorityFT={0}", (int) this.stセクション[ i ].eHitSoundPriorityFT ); - writer.WriteLine( "HitSoundPriorityCY={0}", (int) this.stセクション[ i ].eHitSoundPriorityCY ); - writer.WriteLine( "Guitar={0}", this.stセクション[ i ].bGuitar有効 ? 1 : 0 ); - writer.WriteLine( "Drums={0}", this.stセクション[ i ].bDrums有効 ? 1 : 0 ); - writer.WriteLine( "StageFailed={0}", this.stセクション[ i ].bSTAGEFAILED有効 ? 1 : 0 ); - writer.WriteLine( "DamageLevel={0}", (int) this.stセクション[ i ].eダメージレベル ); - writer.WriteLine( "UseKeyboard={0}", this.stセクション[ i ].b演奏にキーボードを使用した ? 1 : 0 ); - writer.WriteLine( "UseMIDIIN={0}", this.stセクション[ i ].b演奏にMIDI入力を使用した ? 1 : 0 ); - writer.WriteLine( "UseJoypad={0}", this.stセクション[ i ].b演奏にジョイパッドを使用した ? 1 : 0 ); - writer.WriteLine( "UseMouse={0}", this.stセクション[ i ].b演奏にマウスを使用した ? 1 : 0 ); - writer.WriteLine( "PerfectRange={0}", this.stセクション[ i ].nPerfectになる範囲ms ); - writer.WriteLine( "GreatRange={0}", this.stセクション[ i ].nGreatになる範囲ms ); - writer.WriteLine( "GoodRange={0}", this.stセクション[ i ].nGoodになる範囲ms ); - writer.WriteLine( "PoorRange={0}", this.stセクション[ i ].nPoorになる範囲ms ); - writer.WriteLine( "DTXManiaVersion={0}", this.stセクション[ i ].strDTXManiaのバージョン ); - writer.WriteLine( "DateTime={0}", this.stセクション[ i ].最終更新日時 ); - writer.WriteLine( "Hash={0}", this.stセクション[ i ].Hash ); + writer.WriteLine("GBFlip={0}", this.stセクション[i].bギターとベースを入れ替えた ? 1 : 0); + writer.WriteLine("Risky={0}", this.stセクション[i].nRisky); + writer.WriteLine("SuddenDrums={0}", this.stセクション[i].bSudden.Drums ? 1 : 0); + writer.WriteLine("SuddenGuitar={0}", this.stセクション[i].bSudden.Guitar ? 1 : 0); + writer.WriteLine("SuddenBass={0}", this.stセクション[i].bSudden.Bass ? 1 : 0); + writer.WriteLine("HiddenDrums={0}", this.stセクション[i].bHidden.Drums ? 1 : 0); + writer.WriteLine("HiddenGuitar={0}", this.stセクション[i].bHidden.Guitar ? 1 : 0); + writer.WriteLine("HiddenBass={0}", this.stセクション[i].bHidden.Bass ? 1 : 0); + writer.WriteLine("InvisibleDrums={0}", (int)this.stセクション[i].eInvisible.Drums); + writer.WriteLine("InvisibleGuitar={0}", (int)this.stセクション[i].eInvisible.Guitar); + writer.WriteLine("InvisibleBass={0}", (int)this.stセクション[i].eInvisible.Bass); + writer.WriteLine("ReverseDrums={0}", this.stセクション[i].bReverse.Drums ? 1 : 0); + writer.WriteLine("ReverseGuitar={0}", this.stセクション[i].bReverse.Guitar ? 1 : 0); + writer.WriteLine("ReverseBass={0}", this.stセクション[i].bReverse.Bass ? 1 : 0); + writer.WriteLine("TightDrums={0}", this.stセクション[i].bTight ? 1 : 0); + writer.WriteLine("RandomGuitar={0}", (int)this.stセクション[i].eRandom.Guitar); + writer.WriteLine("RandomBass={0}", (int)this.stセクション[i].eRandom.Bass); + writer.WriteLine("LightGuitar={0}", this.stセクション[i].bLight.Guitar ? 1 : 0); + writer.WriteLine("LightBass={0}", this.stセクション[i].bLight.Bass ? 1 : 0); + writer.WriteLine("LeftGuitar={0}", this.stセクション[i].bLeft.Guitar ? 1 : 0); + writer.WriteLine("LeftBass={0}", this.stセクション[i].bLeft.Bass ? 1 : 0); + writer.WriteLine("Dark={0}", (int)this.stセクション[i].eDark); + writer.WriteLine("ScrollSpeedDrums={0}", this.stセクション[i].f譜面スクロール速度.Drums); + writer.WriteLine("ScrollSpeedGuitar={0}", this.stセクション[i].f譜面スクロール速度.Guitar); + writer.WriteLine("ScrollSpeedBass={0}", this.stセクション[i].f譜面スクロール速度.Bass); + writer.WriteLine("PlaySpeed={0}/{1}", this.stセクション[i].n演奏速度分子, this.stセクション[i].n演奏速度分母); + writer.WriteLine("HHGroup={0}", (int)this.stセクション[i].eHHGroup); + writer.WriteLine("FTGroup={0}", (int)this.stセクション[i].eFTGroup); + writer.WriteLine("CYGroup={0}", (int)this.stセクション[i].eCYGroup); + writer.WriteLine("HitSoundPriorityHH={0}", (int)this.stセクション[i].eHitSoundPriorityHH); + writer.WriteLine("HitSoundPriorityFT={0}", (int)this.stセクション[i].eHitSoundPriorityFT); + writer.WriteLine("HitSoundPriorityCY={0}", (int)this.stセクション[i].eHitSoundPriorityCY); + writer.WriteLine("Guitar={0}", this.stセクション[i].bGuitar有効 ? 1 : 0); + writer.WriteLine("Drums={0}", this.stセクション[i].bDrums有効 ? 1 : 0); + writer.WriteLine("StageFailed={0}", this.stセクション[i].bSTAGEFAILED有効 ? 1 : 0); + writer.WriteLine("DamageLevel={0}", (int)this.stセクション[i].eダメージレベル); + writer.WriteLine("UseKeyboard={0}", this.stセクション[i].b演奏にキーボードを使用した ? 1 : 0); + writer.WriteLine("UseMIDIIN={0}", this.stセクション[i].b演奏にMIDI入力を使用した ? 1 : 0); + writer.WriteLine("UseJoypad={0}", this.stセクション[i].b演奏にジョイパッドを使用した ? 1 : 0); + writer.WriteLine("UseMouse={0}", this.stセクション[i].b演奏にマウスを使用した ? 1 : 0); + writer.WriteLine("PerfectRange={0}", this.stセクション[i].nPerfectになる範囲ms); + writer.WriteLine("GreatRange={0}", this.stセクション[i].nGreatになる範囲ms); + writer.WriteLine("GoodRange={0}", this.stセクション[i].nGoodになる範囲ms); + writer.WriteLine("PoorRange={0}", this.stセクション[i].nPoorになる範囲ms); + writer.WriteLine("DTXManiaVersion={0}", this.stセクション[i].strDTXManiaのバージョン); + writer.WriteLine("DateTime={0}", this.stセクション[i].最終更新日時); + writer.WriteLine("Hash={0}", this.stセクション[i].Hash); } writer.Close(); } internal void t全演奏記録セクションの整合性をチェックし不整合があればリセットする() { - for( int i = 0; i < 9; i++ ) + for (int i = 0; i < 9; i++) { - if( !this.b整合性がある( (Eセクション種別) i ) ) - this.stセクション[ i ] = new C演奏記録(); + if (!this.b整合性がある((Eセクション種別)i)) + this.stセクション[i] = new C演奏記録(); } } - internal static int tランク値を計算して返す( C演奏記録 part ) + internal static int tランク値を計算して返す(C演奏記録 part) { - if( part.b演奏にMIDI入力を使用した || part.b演奏にキーボードを使用した || part.b演奏にジョイパッドを使用した || part.b演奏にマウスを使用した ) // 2010.9.11 + if (part.b演奏にMIDI入力を使用した || part.b演奏にキーボードを使用した || part.b演奏にジョイパッドを使用した || part.b演奏にマウスを使用した) // 2010.9.11 { int nTotal = part.nPerfect数 + part.nGreat数 + part.nGood数 + part.nPoor数 + part.nMiss数; - return tランク値を計算して返す( nTotal, part.nPerfect数, part.nGreat数, part.nGood数, part.nPoor数, part.nMiss数 ); + return tランク値を計算して返す(nTotal, part.nPerfect数, part.nGreat数, part.nGood数, part.nPoor数, part.nMiss数); } return (int)ERANK.UNKNOWN; } - internal static int tランク値を計算して返す( int nTotal, int nPerfect, int nGreat, int nGood, int nPoor, int nMiss ) + internal static int tランク値を計算して返す(int nTotal, int nPerfect, int nGreat, int nGood, int nPoor, int nMiss) { - if( nTotal <= 0 ) + if (nTotal <= 0) return (int)ERANK.UNKNOWN; //int nRank = (int)ERANK.E; - int nAuto = nTotal - ( nPerfect + nGreat + nGood + nPoor + nMiss ); - if( nTotal == nAuto ) + int nAuto = nTotal - (nPerfect + nGreat + nGood + nPoor + nMiss); + if (nTotal == nAuto) { return (int)ERANK.SS; } - double dRate = ( (double) ( nPerfect + nGreat ) ) / ( (double) ( nTotal - nAuto ) ); - if( dRate == 1.0 ) + double dRate = ((double)(nPerfect + nGreat)) / ((double)(nTotal - nAuto)); + if (dRate == 1.0) { return (int)ERANK.SS; } - if( dRate >= 0.95 ) + if (dRate >= 0.95) { return (int)ERANK.S; } - if( dRate >= 0.9 ) + if (dRate >= 0.9) { return (int)ERANK.A; } - if( dRate >= 0.85 ) + if (dRate >= 0.85) { return (int)ERANK.B; } - if( dRate >= 0.8 ) + if (dRate >= 0.8) { return (int)ERANK.C; } - if( dRate >= 0.7 ) + if (dRate >= 0.7) { return (int)ERANK.D; } return (int)ERANK.E; } - internal static double tゲーム型スキルを計算して返す( int nLevel, int nTotal, int nPerfect, int nCombo, E楽器パート inst, STAUTOPLAY bAutoPlay ) + internal static double tゲーム型スキルを計算して返す(int nLevel, int nTotal, int nPerfect, int nCombo, E楽器パート inst, STAUTOPLAY bAutoPlay) { double ret; - if( ( nTotal == 0 ) || ( ( nPerfect == 0 ) && ( nCombo == 0 ) ) ) + if ((nTotal == 0) || ((nPerfect == 0) && (nCombo == 0))) ret = 0.0; - ret = ( ( nLevel * ( ( nPerfect * 0.8 + nCombo * 0.2 ) / ( (double) nTotal ) ) ) / 2.0 ); - ret *= dbCalcReviseValForDrGtBsAutoLanes( inst, bAutoPlay ); + ret = ((nLevel * ((nPerfect * 0.8 + nCombo * 0.2) / ((double)nTotal))) / 2.0); + ret *= dbCalcReviseValForDrGtBsAutoLanes(inst, bAutoPlay); return ret; } - internal static double t演奏型スキルを計算して返す( int nTotal, int nPerfect, int nGreat, int nGood, int nPoor, int nMiss, E楽器パート inst, STAUTOPLAY bAutoPlay) + internal static double t演奏型スキルを計算して返す(int nTotal, int nPerfect, int nGreat, int nGood, int nPoor, int nMiss, E楽器パート inst, STAUTOPLAY bAutoPlay) { - if( nTotal == 0 ) + if (nTotal == 0) return 0.0; - int nAuto = nTotal - ( nPerfect + nGreat + nGood + nPoor + nMiss ); - double y = ( ( nPerfect * 1.0 + nGreat * 0.8 + nGood * 0.5 + nPoor * 0.2 + nMiss * 0.0 + nAuto * 0.0 ) * 100.0 ) / ( (double) nTotal ); - double ret = ( 100.0 * ( ( Math.Pow( 1.03, y ) - 1.0 ) / ( Math.Pow( 1.03, 100.0 ) - 1.0 ) ) ); + int nAuto = nTotal - (nPerfect + nGreat + nGood + nPoor + nMiss); + double y = ((nPerfect * 1.0 + nGreat * 0.8 + nGood * 0.5 + nPoor * 0.2 + nMiss * 0.0 + nAuto * 0.0) * 100.0) / ((double)nTotal); + double ret = (100.0 * ((Math.Pow(1.03, y) - 1.0) / (Math.Pow(1.03, 100.0) - 1.0))); - ret *= dbCalcReviseValForDrGtBsAutoLanes( inst, bAutoPlay ); - return ret; + ret *= dbCalcReviseValForDrGtBsAutoLanes(inst, bAutoPlay); + return ret; } - internal static double dbCalcReviseValForDrGtBsAutoLanes( E楽器パート inst, STAUTOPLAY bAutoPlay ) // #28607 2012.6.7 yyagi + internal static double dbCalcReviseValForDrGtBsAutoLanes(E楽器パート inst, STAUTOPLAY bAutoPlay) // #28607 2012.6.7 yyagi { double ret = 1.0; - switch ( inst ) + switch (inst) { #region [ Unknown ] case E楽器パート.UNKNOWN: @@ -1443,10 +1443,10 @@ namespace DTXMania #endregion #region [ Drums ] case E楽器パート.DRUMS: - if ( !CDTXMania.app.ConfigIni.bドラムが全部オートプレイである ) + if (!CDTXMania.app.ConfigIni.bドラムが全部オートプレイである) { #region [ Auto BD ] - if ( bAutoPlay.BD ) + if (bAutoPlay.BD) { ret /= 2; } @@ -1456,58 +1456,58 @@ namespace DTXMania #endregion #region [ Guitar ] case E楽器パート.GUITAR: - if ( !CDTXMania.app.ConfigIni.bギターが全部オートプレイである ) + if (!CDTXMania.app.ConfigIni.bギターが全部オートプレイである) { #region [ Auto Pick ] - if ( bAutoPlay.GtPick ) + if (bAutoPlay.GtPick) { ret /= 2; // AutoPick時、達成率を1/2にする } #endregion #region [ Auto Neck ] int nAutoLanes = 0; - if ( bAutoPlay.GtR ) + if (bAutoPlay.GtR) { nAutoLanes++; } - if ( bAutoPlay.GtG ) + if (bAutoPlay.GtG) { nAutoLanes++; } - if ( bAutoPlay.GtB ) + if (bAutoPlay.GtB) { nAutoLanes++; } - ret /= Math.Sqrt( nAutoLanes + 1 ); + ret /= Math.Sqrt(nAutoLanes + 1); #endregion } break; #endregion #region [ Bass ] case E楽器パート.BASS: - if ( !CDTXMania.app.ConfigIni.bベースが全部オートプレイである ) + if (!CDTXMania.app.ConfigIni.bベースが全部オートプレイである) { #region [ Auto Pick ] - if ( bAutoPlay.BsPick ) + if (bAutoPlay.BsPick) { ret /= 2; // AutoPick時、達成率を1/2にする } #endregion #region [ Auto lanes ] int nAutoLanes = 0; - if ( bAutoPlay.BsR ) + if (bAutoPlay.BsR) { nAutoLanes++; } - if ( bAutoPlay.BsG ) + if (bAutoPlay.BsG) { nAutoLanes++; } - if ( bAutoPlay.BsB ) + if (bAutoPlay.BsB) { nAutoLanes++; } - ret /= Math.Sqrt( nAutoLanes + 1 ); + ret /= Math.Sqrt(nAutoLanes + 1); #endregion } break; @@ -1515,68 +1515,68 @@ namespace DTXMania } return ret; } - internal static string t演奏セクションのMD5を求めて返す( C演奏記録 cc ) + internal static string t演奏セクションのMD5を求めて返す(C演奏記録 cc) { StringBuilder builder = new StringBuilder(); - builder.Append( cc.nスコア.ToString() ); - builder.Append( cc.dbゲーム型スキル値.ToString( ".000000" ) ); - builder.Append( cc.db演奏型スキル値.ToString( ".000000" ) ); - builder.Append( cc.nPerfect数 ); - builder.Append( cc.nGreat数 ); - builder.Append( cc.nGood数 ); - builder.Append( cc.nPoor数 ); - builder.Append( cc.nMiss数 ); - builder.Append( cc.n最大コンボ数 ); - builder.Append( cc.n全チップ数 ); - for( int i = 0; i < 10; i++ ) - builder.Append( boolToChar( cc.bAutoPlay[ i ] ) ); - builder.Append( boolToChar( cc.bTight ) ); - builder.Append( boolToChar( cc.bSudden.Drums ) ); - builder.Append( boolToChar( cc.bSudden.Guitar ) ); - builder.Append( boolToChar( cc.bSudden.Bass ) ); - builder.Append( boolToChar( cc.bHidden.Drums ) ); - builder.Append( boolToChar( cc.bHidden.Guitar ) ); - builder.Append( boolToChar( cc.bHidden.Bass ) ); - builder.Append( (int) cc.eInvisible.Drums ); - builder.Append( (int) cc.eInvisible.Guitar ); - builder.Append( (int) cc.eInvisible.Bass ); - builder.Append( boolToChar( cc.bReverse.Drums ) ); - builder.Append( boolToChar( cc.bReverse.Guitar ) ); - builder.Append( boolToChar( cc.bReverse.Bass ) ); - builder.Append( (int) cc.eRandom.Guitar ); - builder.Append( (int) cc.eRandom.Bass ); - builder.Append( boolToChar( cc.bLight.Guitar ) ); - builder.Append( boolToChar( cc.bLight.Bass ) ); - builder.Append( boolToChar( cc.bLeft.Guitar ) ); - builder.Append( boolToChar( cc.bLeft.Bass ) ); - builder.Append( (int) cc.eDark ); - builder.Append( cc.f譜面スクロール速度.Drums.ToString( ".000000" ) ); - builder.Append( cc.f譜面スクロール速度.Guitar.ToString( ".000000" ) ); - builder.Append( cc.f譜面スクロール速度.Bass.ToString( ".000000" ) ); - builder.Append( cc.n演奏速度分子 ); - builder.Append( cc.n演奏速度分母 ); - builder.Append( (int) cc.eHHGroup ); - builder.Append( (int) cc.eFTGroup ); - builder.Append( (int) cc.eCYGroup ); - builder.Append( (int) cc.eHitSoundPriorityHH ); - builder.Append( (int) cc.eHitSoundPriorityFT ); - builder.Append( (int) cc.eHitSoundPriorityCY ); - builder.Append( boolToChar( cc.bGuitar有効 ) ); - builder.Append( boolToChar( cc.bDrums有効 ) ); - builder.Append( boolToChar( cc.bSTAGEFAILED有効 ) ); - builder.Append( (int) cc.eダメージレベル ); - builder.Append( boolToChar( cc.b演奏にキーボードを使用した ) ); - builder.Append( boolToChar( cc.b演奏にMIDI入力を使用した ) ); - builder.Append( boolToChar( cc.b演奏にジョイパッドを使用した ) ); - builder.Append( boolToChar( cc.b演奏にマウスを使用した ) ); - builder.Append( cc.nPerfectになる範囲ms ); - builder.Append( cc.nGreatになる範囲ms ); - builder.Append( cc.nGoodになる範囲ms ); - builder.Append( cc.nPoorになる範囲ms ); - builder.Append( cc.strDTXManiaのバージョン ); - builder.Append( cc.最終更新日時 ); + builder.Append(cc.nスコア.ToString()); + builder.Append(cc.dbゲーム型スキル値.ToString(".000000")); + builder.Append(cc.db演奏型スキル値.ToString(".000000")); + builder.Append(cc.nPerfect数); + builder.Append(cc.nGreat数); + builder.Append(cc.nGood数); + builder.Append(cc.nPoor数); + builder.Append(cc.nMiss数); + builder.Append(cc.n最大コンボ数); + builder.Append(cc.n全チップ数); + for (int i = 0; i < 10; i++) + builder.Append(boolToChar(cc.bAutoPlay[i])); + builder.Append(boolToChar(cc.bTight)); + builder.Append(boolToChar(cc.bSudden.Drums)); + builder.Append(boolToChar(cc.bSudden.Guitar)); + builder.Append(boolToChar(cc.bSudden.Bass)); + builder.Append(boolToChar(cc.bHidden.Drums)); + builder.Append(boolToChar(cc.bHidden.Guitar)); + builder.Append(boolToChar(cc.bHidden.Bass)); + builder.Append((int)cc.eInvisible.Drums); + builder.Append((int)cc.eInvisible.Guitar); + builder.Append((int)cc.eInvisible.Bass); + builder.Append(boolToChar(cc.bReverse.Drums)); + builder.Append(boolToChar(cc.bReverse.Guitar)); + builder.Append(boolToChar(cc.bReverse.Bass)); + builder.Append((int)cc.eRandom.Guitar); + builder.Append((int)cc.eRandom.Bass); + builder.Append(boolToChar(cc.bLight.Guitar)); + builder.Append(boolToChar(cc.bLight.Bass)); + builder.Append(boolToChar(cc.bLeft.Guitar)); + builder.Append(boolToChar(cc.bLeft.Bass)); + builder.Append((int)cc.eDark); + builder.Append(cc.f譜面スクロール速度.Drums.ToString(".000000")); + builder.Append(cc.f譜面スクロール速度.Guitar.ToString(".000000")); + builder.Append(cc.f譜面スクロール速度.Bass.ToString(".000000")); + builder.Append(cc.n演奏速度分子); + builder.Append(cc.n演奏速度分母); + builder.Append((int)cc.eHHGroup); + builder.Append((int)cc.eFTGroup); + builder.Append((int)cc.eCYGroup); + builder.Append((int)cc.eHitSoundPriorityHH); + builder.Append((int)cc.eHitSoundPriorityFT); + builder.Append((int)cc.eHitSoundPriorityCY); + builder.Append(boolToChar(cc.bGuitar有効)); + builder.Append(boolToChar(cc.bDrums有効)); + builder.Append(boolToChar(cc.bSTAGEFAILED有効)); + builder.Append((int)cc.eダメージレベル); + builder.Append(boolToChar(cc.b演奏にキーボードを使用した)); + builder.Append(boolToChar(cc.b演奏にMIDI入力を使用した)); + builder.Append(boolToChar(cc.b演奏にジョイパッドを使用した)); + builder.Append(boolToChar(cc.b演奏にマウスを使用した)); + builder.Append(cc.nPerfectになる範囲ms); + builder.Append(cc.nGreatになる範囲ms); + builder.Append(cc.nGoodになる範囲ms); + builder.Append(cc.nPoorになる範囲ms); + builder.Append(cc.strDTXManiaのバージョン); + builder.Append(cc.最終更新日時); - byte[] bytes = Encoding.GetEncoding( "utf-16" ).GetBytes( builder.ToString() ); + byte[] bytes = Encoding.GetEncoding("utf-16").GetBytes(builder.ToString()); StringBuilder builder2 = new StringBuilder(0x21); { MD5CryptoServiceProvider m = new MD5CryptoServiceProvider(); @@ -1586,34 +1586,34 @@ namespace DTXMania } return builder2.ToString(); } - internal static void t更新条件を取得する( out bool bDrumsを更新する, out bool bGuitarを更新する, out bool bBassを更新する ) + internal static void t更新条件を取得する(out bool bDrumsを更新する, out bool bGuitarを更新する, out bool bBassを更新する) { - bDrumsを更新する = CDTXMania.app.ConfigIni.bDrums有効 && CDTXMania.app.DTX.bチップがある.Drums && !CDTXMania.app.ConfigIni.bドラムが全部オートプレイである; + bDrumsを更新する = CDTXMania.app.ConfigIni.bDrums有効 && CDTXMania.app.DTX.bチップがある.Drums && !CDTXMania.app.ConfigIni.bドラムが全部オートプレイである; bGuitarを更新する = CDTXMania.app.ConfigIni.bGuitar有効 && CDTXMania.app.DTX.bチップがある.Guitar && !CDTXMania.app.ConfigIni.bギターが全部オートプレイである; - bBassを更新する = CDTXMania.app.ConfigIni.bGuitar有効 && CDTXMania.app.DTX.bチップがある.Bass && !CDTXMania.app.ConfigIni.bベースが全部オートプレイである; + bBassを更新する = CDTXMania.app.ConfigIni.bGuitar有効 && CDTXMania.app.DTX.bチップがある.Bass && !CDTXMania.app.ConfigIni.bベースが全部オートプレイである; } - internal static int t総合ランク値を計算して返す( C演奏記録 Drums, C演奏記録 Guitar, C演奏記録 Bass ) + internal static int t総合ランク値を計算して返す(C演奏記録 Drums, C演奏記録 Guitar, C演奏記録 Bass) { - int nTotal = Drums.n全チップ数 + Guitar.n全チップ数 + Bass.n全チップ数; + int nTotal = Drums.n全チップ数 + Guitar.n全チップ数 + Bass.n全チップ数; int nPerfect = Drums.nPerfect数_Auto含まない + Guitar.nPerfect数_Auto含まない + Bass.nPerfect数_Auto含まない; // #24569 2011.3.1 yyagi: to calculate result rank without AUTO chips - int nGreat = Drums.nGreat数_Auto含まない + Guitar.nGreat数_Auto含まない + Bass.nGreat数_Auto含まない; // - int nGood = Drums.nGood数_Auto含まない + Guitar.nGood数_Auto含まない + Bass.nGood数_Auto含まない; // - int nPoor = Drums.nPoor数_Auto含まない + Guitar.nPoor数_Auto含まない + Bass.nPoor数_Auto含まない; // - int nMiss = Drums.nMiss数_Auto含まない + Guitar.nMiss数_Auto含まない + Bass.nMiss数_Auto含まない; // - return tランク値を計算して返す( nTotal, nPerfect, nGreat, nGood, nPoor, nMiss ); + int nGreat = Drums.nGreat数_Auto含まない + Guitar.nGreat数_Auto含まない + Bass.nGreat数_Auto含まない; // + int nGood = Drums.nGood数_Auto含まない + Guitar.nGood数_Auto含まない + Bass.nGood数_Auto含まない; // + int nPoor = Drums.nPoor数_Auto含まない + Guitar.nPoor数_Auto含まない + Bass.nPoor数_Auto含まない; // + int nMiss = Drums.nMiss数_Auto含まない + Guitar.nMiss数_Auto含まない + Bass.nMiss数_Auto含まない; // + return tランク値を計算して返す(nTotal, nPerfect, nGreat, nGood, nPoor, nMiss); } // その他 #region [ private ] //----------------- - private bool ONorOFF( char c ) + private bool ONorOFF(char c) { - return ( c != '0' ); + return (c != '0'); } - private static char boolToChar( bool b ) + private static char boolToChar(bool b) { - if( !b ) + if (!b) { return '0'; } diff --git a/DTXManiaプロジェクト/コード/スコア、曲/CSetDef.cs b/DTXManiaプロジェクト/コード/スコア、曲/CSetDef.cs index fc55e0cf..2d8085e5 100644 --- a/DTXManiaプロジェクト/コード/スコア、曲/CSetDef.cs +++ b/DTXManiaプロジェクト/コード/スコア、曲/CSetDef.cs @@ -101,10 +101,10 @@ namespace DTXMania #region [ private ] //----------------- - private string[] _file = new string[ 5 ]; + private string[] _file = new string[5]; private Color _fontcolor = Color.White; private string _genre = ""; - private string[] _label = new string[ 5 ]; + private string[] _label = new string[5]; private string _title = ""; //----------------- #endregion @@ -117,96 +117,96 @@ namespace DTXMania { this.blocks = new List(); } - public CSetDef( string setdefファイル名 ) + public CSetDef(string setdefファイル名) : this() { - this.t読み込み( setdefファイル名 ); + this.t読み込み(setdefファイル名); } // メソッド - public void t読み込み( string setdefファイル名 ) + public void t読み込み(string setdefファイル名) { - var reader = new StreamReader( setdefファイル名, Encoding.GetEncoding( "Shift_JIS" ) ); + var reader = new StreamReader(setdefファイル名, Encoding.GetEncoding("Shift_JIS")); CBlock block = new CBlock(); string str = null; - while( ( str = reader.ReadLine() ) != null ) + while ((str = reader.ReadLine()) != null) { - if( str.Length != 0 ) + if (str.Length != 0) { try { - str = str.TrimStart( new char[] { ' ', '\t' } ); - if( ( str.Length > 0 ) && ( str[ 0 ] == '#' ) && ( str[ 0 ] != ';' ) ) + str = str.TrimStart(new char[] { ' ', '\t' }); + if ((str.Length > 0) && (str[0] == '#') && (str[0] != ';')) { - if( str.IndexOf( ';' ) != -1 ) + if (str.IndexOf(';') != -1) { - str = str.Substring( 0, str.IndexOf( ';' ) ); + str = str.Substring(0, str.IndexOf(';')); } - if( str.StartsWith( "#TITLE", StringComparison.OrdinalIgnoreCase ) ) + if (str.StartsWith("#TITLE", StringComparison.OrdinalIgnoreCase)) { - if( block.b使用中 ) + if (block.b使用中) { - this.tFILEの指定があるのにLxLABELが省略されているときはデフォルトの名前をセットする( block ); - this.tLxLABELの指定があるのにFILEが省略されているときはなかったものとする( block ); - this.blocks.Add( block ); + this.tFILEの指定があるのにLxLABELが省略されているときはデフォルトの名前をセットする(block); + this.tLxLABELの指定があるのにFILEが省略されているときはなかったものとする(block); + this.blocks.Add(block); block = new CBlock(); } - block.Title = str.Substring( 6 ).TrimStart( new char[] { ':', ' ', '\t' } ); + block.Title = str.Substring(6).TrimStart(new char[] { ':', ' ', '\t' }); } - else if( str.StartsWith( "#FONTCOLOR", StringComparison.OrdinalIgnoreCase ) ) + else if (str.StartsWith("#FONTCOLOR", StringComparison.OrdinalIgnoreCase)) { - block.FontColor = ColorTranslator.FromHtml( "#" + str.Substring( 10 ).Trim( new char[] { ':', '#', ' ', '\t' } ) ); + block.FontColor = ColorTranslator.FromHtml("#" + str.Substring(10).Trim(new char[] { ':', '#', ' ', '\t' })); } - else if( str.StartsWith( "#L1FILE", StringComparison.OrdinalIgnoreCase ) ) + else if (str.StartsWith("#L1FILE", StringComparison.OrdinalIgnoreCase)) { - block.File[ 0 ] = str.Substring( 7 ).Trim( new char[] { ':', ' ', '\t' } ); + block.File[0] = str.Substring(7).Trim(new char[] { ':', ' ', '\t' }); block.b使用中 = true; // #28937 2012.7.7 yyagi; "get" accessor is called for T[] property. So b使用中 is not modified to set the property. I need to update it myself. } - else if( str.StartsWith( "#L2FILE", StringComparison.OrdinalIgnoreCase ) ) + else if (str.StartsWith("#L2FILE", StringComparison.OrdinalIgnoreCase)) { - block.File[ 1 ] = str.Substring( 7 ).Trim( new char[] { ':', ' ', '\t' } ); + block.File[1] = str.Substring(7).Trim(new char[] { ':', ' ', '\t' }); block.b使用中 = true; // #28937 2012.7.7 yyagi; "get" accessor is called for T[] property. So b使用中 is not modified to set the property. I need to update it myself. } - else if( str.StartsWith( "#L3FILE", StringComparison.OrdinalIgnoreCase ) ) + else if (str.StartsWith("#L3FILE", StringComparison.OrdinalIgnoreCase)) { - block.File[ 2 ] = str.Substring( 7 ).Trim( new char[] { ':', ' ', '\t' } ); + block.File[2] = str.Substring(7).Trim(new char[] { ':', ' ', '\t' }); block.b使用中 = true; // #28937 2012.7.7 yyagi; "get" accessor is called for T[] property. So b使用中 is not modified to set the property. I need to update it myself. } - else if( str.StartsWith( "#L4FILE", StringComparison.OrdinalIgnoreCase ) ) + else if (str.StartsWith("#L4FILE", StringComparison.OrdinalIgnoreCase)) { - block.File[ 3 ] = str.Substring( 7 ).Trim( new char[] { ':', ' ', '\t' } ); + block.File[3] = str.Substring(7).Trim(new char[] { ':', ' ', '\t' }); block.b使用中 = true; // #28937 2012.7.7 yyagi; "get" accessor is called for T[] property. So b使用中 is not modified to set the property. I need to update it myself. } - else if( str.StartsWith( "#L5FILE", StringComparison.OrdinalIgnoreCase ) ) + else if (str.StartsWith("#L5FILE", StringComparison.OrdinalIgnoreCase)) { - block.File[ 4 ] = str.Substring( 7 ).Trim( new char[] { ':', ' ', '\t' } ); + block.File[4] = str.Substring(7).Trim(new char[] { ':', ' ', '\t' }); block.b使用中 = true; // #28937 2012.7.7 yyagi; "get" accessor is called for T[] property. So b使用中 is not modified to set the property. I need to update it myself. } - else if( str.StartsWith( "#L1LABEL", StringComparison.OrdinalIgnoreCase ) ) + else if (str.StartsWith("#L1LABEL", StringComparison.OrdinalIgnoreCase)) { - block.Label[ 0 ] = str.Substring( 8 ).Trim( new char[] { ':', ' ', '\t' } ); + block.Label[0] = str.Substring(8).Trim(new char[] { ':', ' ', '\t' }); block.b使用中 = true; // #28937 2012.7.7 yyagi; "get" accessor is called for T[] property. So b使用中 is not modified to set the property. I need to update it myself. } - else if( str.StartsWith( "#L2LABEL", StringComparison.OrdinalIgnoreCase ) ) + else if (str.StartsWith("#L2LABEL", StringComparison.OrdinalIgnoreCase)) { - block.Label[ 1 ] = str.Substring( 8 ).Trim( new char[] { ':', ' ', '\t' } ); + block.Label[1] = str.Substring(8).Trim(new char[] { ':', ' ', '\t' }); block.b使用中 = true; // #28937 2012.7.7 yyagi; "get" accessor is called for T[] property. So b使用中 is not modified to set the property. I need to update it myself. } - else if( str.StartsWith( "#L3LABEL", StringComparison.OrdinalIgnoreCase ) ) + else if (str.StartsWith("#L3LABEL", StringComparison.OrdinalIgnoreCase)) { - block.Label[ 2 ] = str.Substring( 8 ).Trim( new char[] { ':', ' ', '\t' } ); + block.Label[2] = str.Substring(8).Trim(new char[] { ':', ' ', '\t' }); block.b使用中 = true; // #28937 2012.7.7 yyagi; "get" accessor is called for T[] property. So b使用中 is not modified to set the property. I need to update it myself. } - else if( str.StartsWith( "#L4LABEL", StringComparison.OrdinalIgnoreCase ) ) + else if (str.StartsWith("#L4LABEL", StringComparison.OrdinalIgnoreCase)) { - block.Label[ 3 ] = str.Substring( 8 ).Trim( new char[] { ':', ' ', '\t' } ); + block.Label[3] = str.Substring(8).Trim(new char[] { ':', ' ', '\t' }); block.b使用中 = true; // #28937 2012.7.7 yyagi; "get" accessor is called for T[] property. So b使用中 is not modified to set the property. I need to update it myself. } - else if( str.StartsWith( "#L5LABEL", StringComparison.OrdinalIgnoreCase ) ) + else if (str.StartsWith("#L5LABEL", StringComparison.OrdinalIgnoreCase)) { - block.Label[ 4 ] = str.Substring( 8 ).Trim( new char[] { ':', ' ', '\t' } ); + block.Label[4] = str.Substring(8).Trim(new char[] { ':', ' ', '\t' }); block.b使用中 = true; // #28937 2012.7.7 yyagi; "get" accessor is called for T[] property. So b使用中 is not modified to set the property. I need to update it myself. } } @@ -219,11 +219,11 @@ namespace DTXMania } } reader.Close(); - if( block.b使用中 ) + if (block.b使用中) { - this.tFILEの指定があるのにLxLABELが省略されているときはデフォルトの名前をセットする( block ); - this.tLxLABELの指定があるのにFILEが省略されているときはなかったものとする( block ); - this.blocks.Add( block ); + this.tFILEの指定があるのにLxLABELが省略されているときはデフォルトの名前をセットする(block); + this.tLxLABELの指定があるのにFILEが省略されているときはなかったものとする(block); + this.blocks.Add(block); } } @@ -232,24 +232,24 @@ namespace DTXMania #region [ private ] //----------------- - private void tFILEの指定があるのにLxLABELが省略されているときはデフォルトの名前をセットする( CBlock block ) + private void tFILEの指定があるのにLxLABELが省略されているときはデフォルトの名前をセットする(CBlock block) { string[] strArray = new string[] { "BASIC", "ADVANCED", "EXTREME", "HYPER", "ULTIMATE" }; - for( int i = 0; i < 5; i++ ) + for (int i = 0; i < 5; i++) { - if( ( ( block.File[ i ] != null ) && ( block.File[ i ].Length > 0 ) ) && string.IsNullOrEmpty( block.Label[ i ] ) ) + if (((block.File[i] != null) && (block.File[i].Length > 0)) && string.IsNullOrEmpty(block.Label[i])) { - block.Label[ i ] = strArray[ i ]; + block.Label[i] = strArray[i]; } } } - private void tLxLABELの指定があるのにFILEが省略されているときはなかったものとする( CBlock block ) + private void tLxLABELの指定があるのにFILEが省略されているときはなかったものとする(CBlock block) { - for( int i = 0; i < 5; i++ ) + for (int i = 0; i < 5; i++) { - if( ( ( block.Label[ i ] != null ) && ( block.Label[ i ].Length > 0 ) ) && string.IsNullOrEmpty( block.File[ i ] ) ) + if (((block.Label[i] != null) && (block.Label[i].Length > 0)) && string.IsNullOrEmpty(block.File[i])) { - block.Label[ i ] = ""; + block.Label[i] = ""; } } } diff --git a/DTXManiaプロジェクト/コード/スコア、曲/CSong管理.cs b/DTXManiaプロジェクト/コード/スコア、曲/CSong管理.cs index 50237257..e5f8acda 100644 --- a/DTXManiaプロジェクト/コード/スコア、曲/CSong管理.cs +++ b/DTXManiaプロジェクト/コード/スコア、曲/CSong管理.cs @@ -16,32 +16,32 @@ namespace DTXMania public int nSongsDBから取得できたスコア数 { - get; - set; + get; + set; } public int nSongsDBへ出力できたスコア数 { get; set; } - public int nスコアキャッシュから反映できたスコア数 + public int nスコアキャッシュから反映できたスコア数 { get; - set; + set; } public int nファイルから反映できたスコア数 { get; set; } - public int n検索されたスコア数 - { + public int n検索されたスコア数 + { get; set; } public int n検索された曲ノード数 { - get; + get; set; } [NonSerialized] @@ -82,7 +82,7 @@ namespace DTXMania this.n検索された曲ノード数 = 0; this.n検索されたスコア数 = 0; this.bIsSuspending = false; // #27060 - this.autoReset = new AutoResetEvent( true ); // #27060 + this.autoReset = new AutoResetEvent(true); // #27060 this.searchCount = 0; } @@ -91,30 +91,30 @@ namespace DTXMania #region [ SongsDB(songs.db) を読み込む ] //----------------- - public void tSongsDBを読み込む( string SongsDBファイル名 ) + public void tSongsDBを読み込む(string SongsDBファイル名) { this.nSongsDBから取得できたスコア数 = 0; - if( File.Exists( SongsDBファイル名 ) ) + if (File.Exists(SongsDBファイル名)) { BinaryReader br = null; try { - br = new BinaryReader( File.OpenRead( SongsDBファイル名 ) ); - if ( !br.ReadString().Equals( SONGSDB_VERSION ) ) + br = new BinaryReader(File.OpenRead(SongsDBファイル名)); + if (!br.ReadString().Equals(SONGSDB_VERSION)) { - throw new InvalidDataException( "ヘッダが異なります。" ); + throw new InvalidDataException("ヘッダが異なります。"); } this.listSongsDB = new List(); - while( true ) + while (true) { try { - Cスコア item = this.tSongsDBからスコアを1つ読み込む( br ); - this.listSongsDB.Add( item ); + Cスコア item = this.tSongsDBからスコアを1つ読み込む(br); + this.listSongsDB.Add(item); this.nSongsDBから取得できたスコア数++; } - catch( EndOfStreamException ) + catch (EndOfStreamException) { break; } @@ -122,7 +122,7 @@ namespace DTXMania } finally { - if( br != null ) + if (br != null) br.Close(); } } @@ -132,38 +132,38 @@ namespace DTXMania #region [ 曲を検索してリストを作成する ] //----------------- - public void t曲を検索してリストを作成する( string str基点フォルダ, bool b子BOXへ再帰する ) + public void t曲を検索してリストを作成する(string str基点フォルダ, bool b子BOXへ再帰する) { - this.t曲を検索してリストを作成する( str基点フォルダ, b子BOXへ再帰する, this.list曲ルート, null ); + this.t曲を検索してリストを作成する(str基点フォルダ, b子BOXへ再帰する, this.list曲ルート, null); } - private void t曲を検索してリストを作成する( string str基点フォルダ, bool b子BOXへ再帰する, List listノードリスト, C曲リストノード node親 ) + private void t曲を検索してリストを作成する(string str基点フォルダ, bool b子BOXへ再帰する, List listノードリスト, C曲リストノード node親) { - if( !str基点フォルダ.EndsWith( @"\" ) ) + if (!str基点フォルダ.EndsWith(@"\")) str基点フォルダ = str基点フォルダ + @"\"; - DirectoryInfo info = new DirectoryInfo( str基点フォルダ ); + DirectoryInfo info = new DirectoryInfo(str基点フォルダ); - if( CDTXMania.app.ConfigIni.bLog曲検索ログ出力 ) - Trace.TraceInformation( "基点フォルダ: " + str基点フォルダ ); + if (CDTXMania.app.ConfigIni.bLog曲検索ログ出力) + Trace.TraceInformation("基点フォルダ: " + str基点フォルダ); #region [ a.フォルダ内に set.def が存在する場合 → set.def からノード作成] //----------------------------- string path = str基点フォルダ + "set.def"; - if( File.Exists( path ) ) + if (File.Exists(path)) { - CSetDef def = new CSetDef( path ); - new FileInfo( path ); - if( CDTXMania.app.ConfigIni.bLog曲検索ログ出力 ) + CSetDef def = new CSetDef(path); + new FileInfo(path); + if (CDTXMania.app.ConfigIni.bLog曲検索ログ出力) { - Trace.TraceInformation( "set.def検出 : {0}", path ); + Trace.TraceInformation("set.def検出 : {0}", path); Trace.Indent(); } try { SlowOrSuspendSearchTask(); // #27060 中断要求があったら、解除要求が来るまで待機, #PREMOVIE再生中は検索負荷を落とす - for( int i = 0; i < def.blocks.Count; i++ ) + for (int i = 0; i < def.blocks.Count; i++) { - CSetDef.CBlock block = def.blocks[ i ]; + CSetDef.CBlock block = def.blocks[i]; C曲リストノード item = new C曲リストノード(); item.eノード種別 = C曲リストノード.Eノード種別.SCORE; item.strタイトル = block.Title; @@ -174,83 +174,83 @@ namespace DTXMania item.pathSetDefの絶対パス = path; item.r親ノード = node親; - item.strBreadcrumbs = ( item.r親ノード == null ) ? + item.strBreadcrumbs = (item.r親ノード == null) ? path + i : item.r親ノード.strBreadcrumbs + " > " + path + i; - for( int j = 0; j < 5; j++ ) + for (int j = 0; j < 5; j++) { - if( !string.IsNullOrEmpty( block.File[ j ] ) ) + if (!string.IsNullOrEmpty(block.File[j])) { - string str2 = str基点フォルダ + block.File[ j ]; - if( File.Exists( str2 ) ) + string str2 = str基点フォルダ + block.File[j]; + if (File.Exists(str2)) { - item.ar難易度ラベル[ j ] = block.Label[ j ]; - item.arスコア[ j ] = new Cスコア(); - item.arスコア[ j ].ファイル情報.ファイルの絶対パス = str2; - item.arスコア[ j ].ファイル情報.フォルダの絶対パス = Path.GetFullPath( Path.GetDirectoryName( str2 ) ) + @"\"; - FileInfo info2 = new FileInfo( str2 ); - item.arスコア[ j ].ファイル情報.ファイルサイズ = info2.Length; - item.arスコア[ j ].ファイル情報.最終更新日時 = info2.LastWriteTime; + item.ar難易度ラベル[j] = block.Label[j]; + item.arスコア[j] = new Cスコア(); + item.arスコア[j].ファイル情報.ファイルの絶対パス = str2; + item.arスコア[j].ファイル情報.フォルダの絶対パス = Path.GetFullPath(Path.GetDirectoryName(str2)) + @"\"; + FileInfo info2 = new FileInfo(str2); + item.arスコア[j].ファイル情報.ファイルサイズ = info2.Length; + item.arスコア[j].ファイル情報.最終更新日時 = info2.LastWriteTime; string str3 = str2 + ".score.ini"; - if( File.Exists( str3 ) ) + if (File.Exists(str3)) { - FileInfo info3 = new FileInfo( str3 ); - item.arスコア[ j ].ScoreIni情報.ファイルサイズ = info3.Length; - item.arスコア[ j ].ScoreIni情報.最終更新日時 = info3.LastWriteTime; + FileInfo info3 = new FileInfo(str3); + item.arスコア[j].ScoreIni情報.ファイルサイズ = info3.Length; + item.arスコア[j].ScoreIni情報.最終更新日時 = info3.LastWriteTime; } item.nスコア数++; this.n検索されたスコア数++; } else { - item.arスコア[ j ] = null; + item.arスコア[j] = null; } } } - if( item.nスコア数 > 0 ) + if (item.nスコア数 > 0) { - listノードリスト.Add( item ); + listノードリスト.Add(item); this.n検索された曲ノード数++; - if( CDTXMania.app.ConfigIni.bLog曲検索ログ出力 ) + if (CDTXMania.app.ConfigIni.bLog曲検索ログ出力) { - StringBuilder builder = new StringBuilder( 0x200 ); - builder.Append( string.Format( "nID#{0:D3}", item.nID ) ); - if( item.r親ノード != null ) + StringBuilder builder = new StringBuilder(0x200); + builder.Append(string.Format("nID#{0:D3}", item.nID)); + if (item.r親ノード != null) { - builder.Append( string.Format( "(in#{0:D3}):", item.r親ノード.nID ) ); + builder.Append(string.Format("(in#{0:D3}):", item.r親ノード.nID)); } else { - builder.Append( "(onRoot):" ); + builder.Append("(onRoot):"); } - if( ( item.strタイトル != null ) && ( item.strタイトル.Length > 0 ) ) + if ((item.strタイトル != null) && (item.strタイトル.Length > 0)) { - builder.Append( " SONG, Title=" + item.strタイトル ); + builder.Append(" SONG, Title=" + item.strタイトル); } - if( ( item.strジャンル != null ) && ( item.strジャンル.Length > 0 ) ) + if ((item.strジャンル != null) && (item.strジャンル.Length > 0)) { - builder.Append( ", Genre=" + item.strジャンル ); + builder.Append(", Genre=" + item.strジャンル); } - if( item.col文字色 != Color.White ) + if (item.col文字色 != Color.White) { - builder.Append( ", FontColor=" + item.col文字色 ); + builder.Append(", FontColor=" + item.col文字色); } - Trace.TraceInformation( builder.ToString() ); + Trace.TraceInformation(builder.ToString()); Trace.Indent(); try { - for( int k = 0; k < 5; k++ ) + for (int k = 0; k < 5; k++) { - if( item.arスコア[ k ] != null ) + if (item.arスコア[k] != null) { - Cスコア cスコア = item.arスコア[ k ]; - builder.Remove( 0, builder.Length ); - builder.Append( string.Format( "ブロック{0}-{1}:", item.SetDefのブロック番号 + 1, k + 1 ) ); - builder.Append( " Label=" + item.ar難易度ラベル[ k ] ); - builder.Append( ", File=" + cスコア.ファイル情報.ファイルの絶対パス ); - builder.Append( ", Size=" + cスコア.ファイル情報.ファイルサイズ ); - builder.Append( ", LastUpdate=" + cスコア.ファイル情報.最終更新日時 ); - Trace.TraceInformation( builder.ToString() ); + Cスコア cスコア = item.arスコア[k]; + builder.Remove(0, builder.Length); + builder.Append(string.Format("ブロック{0}-{1}:", item.SetDefのブロック番号 + 1, k + 1)); + builder.Append(" Label=" + item.ar難易度ラベル[k]); + builder.Append(", File=" + cスコア.ファイル情報.ファイルの絶対パス); + builder.Append(", Size=" + cスコア.ファイル情報.ファイルサイズ); + builder.Append(", LastUpdate=" + cスコア.ファイル情報.最終更新日時); + Trace.TraceInformation(builder.ToString()); } } } @@ -264,7 +264,7 @@ namespace DTXMania } finally { - if( CDTXMania.app.ConfigIni.bLog曲検索ログ出力 ) + if (CDTXMania.app.ConfigIni.bLog曲検索ログ出力) { Trace.Unindent(); } @@ -277,54 +277,54 @@ namespace DTXMania //----------------------------- else { - foreach( FileInfo fileinfo in info.GetFiles() ) + foreach (FileInfo fileinfo in info.GetFiles()) { SlowOrSuspendSearchTask(); // #27060 中断要求があったら、解除要求が来るまで待機, #PREMOVIE再生中は検索負荷を落とす string strExt = fileinfo.Extension.ToLower(); - if( ( strExt.Equals( ".dtx" ) || strExt.Equals( ".gda" ) ) || ( ( strExt.Equals( ".g2d" ) || strExt.Equals( ".bms" ) ) || strExt.Equals( ".bme" ) ) ) + if ((strExt.Equals(".dtx") || strExt.Equals(".gda")) || ((strExt.Equals(".g2d") || strExt.Equals(".bms")) || strExt.Equals(".bme"))) { C曲リストノード c曲リストノード = new C曲リストノード(); c曲リストノード.eノード種別 = C曲リストノード.Eノード種別.SCORE; c曲リストノード.nスコア数 = 1; c曲リストノード.r親ノード = node親; - c曲リストノード.strBreadcrumbs = ( c曲リストノード.r親ノード == null ) ? + c曲リストノード.strBreadcrumbs = (c曲リストノード.r親ノード == null) ? str基点フォルダ + fileinfo.Name : c曲リストノード.r親ノード.strBreadcrumbs + " > " + str基点フォルダ + fileinfo.Name; - c曲リストノード.arスコア[ 0 ] = new Cスコア(); - c曲リストノード.arスコア[ 0 ].ファイル情報.ファイルの絶対パス = str基点フォルダ + fileinfo.Name; - c曲リストノード.arスコア[ 0 ].ファイル情報.フォルダの絶対パス = str基点フォルダ; - c曲リストノード.arスコア[ 0 ].ファイル情報.ファイルサイズ = fileinfo.Length; - c曲リストノード.arスコア[ 0 ].ファイル情報.最終更新日時 = fileinfo.LastWriteTime; - string strFileNameScoreIni = c曲リストノード.arスコア[ 0 ].ファイル情報.ファイルの絶対パス + ".score.ini"; - if( File.Exists( strFileNameScoreIni ) ) + c曲リストノード.arスコア[0] = new Cスコア(); + c曲リストノード.arスコア[0].ファイル情報.ファイルの絶対パス = str基点フォルダ + fileinfo.Name; + c曲リストノード.arスコア[0].ファイル情報.フォルダの絶対パス = str基点フォルダ; + c曲リストノード.arスコア[0].ファイル情報.ファイルサイズ = fileinfo.Length; + c曲リストノード.arスコア[0].ファイル情報.最終更新日時 = fileinfo.LastWriteTime; + string strFileNameScoreIni = c曲リストノード.arスコア[0].ファイル情報.ファイルの絶対パス + ".score.ini"; + if (File.Exists(strFileNameScoreIni)) { - FileInfo infoScoreIni = new FileInfo( strFileNameScoreIni ); - c曲リストノード.arスコア[ 0 ].ScoreIni情報.ファイルサイズ = infoScoreIni.Length; - c曲リストノード.arスコア[ 0 ].ScoreIni情報.最終更新日時 = infoScoreIni.LastWriteTime; + FileInfo infoScoreIni = new FileInfo(strFileNameScoreIni); + c曲リストノード.arスコア[0].ScoreIni情報.ファイルサイズ = infoScoreIni.Length; + c曲リストノード.arスコア[0].ScoreIni情報.最終更新日時 = infoScoreIni.LastWriteTime; } this.n検索されたスコア数++; - listノードリスト.Add( c曲リストノード ); + listノードリスト.Add(c曲リストノード); this.n検索された曲ノード数++; - if( CDTXMania.app.ConfigIni.bLog曲検索ログ出力 ) + if (CDTXMania.app.ConfigIni.bLog曲検索ログ出力) { Trace.Indent(); try { - StringBuilder sb = new StringBuilder( 0x100 ); - sb.Append( string.Format( "nID#{0:D3}", c曲リストノード.nID ) ); - if( c曲リストノード.r親ノード != null ) + StringBuilder sb = new StringBuilder(0x100); + sb.Append(string.Format("nID#{0:D3}", c曲リストノード.nID)); + if (c曲リストノード.r親ノード != null) { - sb.Append( string.Format( "(in#{0:D3}):", c曲リストノード.r親ノード.nID ) ); + sb.Append(string.Format("(in#{0:D3}):", c曲リストノード.r親ノード.nID)); } else { - sb.Append( "(onRoot):" ); + sb.Append("(onRoot):"); } - sb.Append( " SONG, File=" + c曲リストノード.arスコア[ 0 ].ファイル情報.ファイルの絶対パス ); - sb.Append( ", Size=" + c曲リストノード.arスコア[ 0 ].ファイル情報.ファイルサイズ ); - sb.Append( ", LastUpdate=" + c曲リストノード.arスコア[ 0 ].ファイル情報.最終更新日時 ); - Trace.TraceInformation( sb.ToString() ); + sb.Append(" SONG, File=" + c曲リストノード.arスコア[0].ファイル情報.ファイルの絶対パス); + sb.Append(", Size=" + c曲リストノード.arスコア[0].ファイル情報.ファイルサイズ); + sb.Append(", LastUpdate=" + c曲リストノード.arスコア[0].ファイル情報.最終更新日時); + Trace.TraceInformation(sb.ToString()); } finally { @@ -332,7 +332,7 @@ namespace DTXMania } } } - else if( strExt.Equals( ".mid" ) || strExt.Equals( ".smf" )) + else if (strExt.Equals(".mid") || strExt.Equals(".smf")) { // 何もしない } @@ -341,146 +341,146 @@ namespace DTXMania //----------------------------- #endregion - foreach( DirectoryInfo infoDir in info.GetDirectories() ) + foreach (DirectoryInfo infoDir in info.GetDirectories()) { SlowOrSuspendSearchTask(); // #27060 中断要求があったら、解除要求が来るまで待機, #PREMOVIE再生中は検索負荷を落とす #region [ a. "dtxfiles." で始まるフォルダの場合 ] //----------------------------- - if( infoDir.Name.ToLower().StartsWith( "dtxfiles." ) ) + if (infoDir.Name.ToLower().StartsWith("dtxfiles.")) { C曲リストノード c曲リストノード = new C曲リストノード(); c曲リストノード.eノード種別 = C曲リストノード.Eノード種別.BOX; c曲リストノード.bDTXFilesで始まるフォルダ名のBOXである = true; - c曲リストノード.strタイトル = infoDir.Name.Substring( 9 ); + c曲リストノード.strタイトル = infoDir.Name.Substring(9); c曲リストノード.nスコア数 = 1; c曲リストノード.r親ノード = node親; // 一旦、上位BOXのスキン情報をコピー (後でbox.defの記載にて上書きされる場合がある) - c曲リストノード.strSkinPath = ( c曲リストノード.r親ノード == null ) ? + c曲リストノード.strSkinPath = (c曲リストノード.r親ノード == null) ? "" : c曲リストノード.r親ノード.strSkinPath; - c曲リストノード.strBreadcrumbs = ( c曲リストノード.r親ノード == null ) ? + c曲リストノード.strBreadcrumbs = (c曲リストノード.r親ノード == null) ? c曲リストノード.strタイトル : c曲リストノード.r親ノード.strBreadcrumbs + " > " + c曲リストノード.strタイトル; - + c曲リストノード.list子リスト = new List(); - c曲リストノード.arスコア[ 0 ] = new Cスコア(); - c曲リストノード.arスコア[ 0 ].ファイル情報.フォルダの絶対パス = infoDir.FullName + @"\"; - c曲リストノード.arスコア[ 0 ].譜面情報.タイトル = c曲リストノード.strタイトル; - c曲リストノード.arスコア[ 0 ].譜面情報.コメント = + c曲リストノード.arスコア[0] = new Cスコア(); + c曲リストノード.arスコア[0].ファイル情報.フォルダの絶対パス = infoDir.FullName + @"\"; + c曲リストノード.arスコア[0].譜面情報.タイトル = c曲リストノード.strタイトル; + c曲リストノード.arスコア[0].譜面情報.コメント = (CultureInfo.CurrentCulture.TwoLetterISOLanguageName == "ja") ? "BOX に移動します。" : "Enter into the BOX."; listノードリスト.Add(c曲リストノード); - if( File.Exists( infoDir.FullName + @"\box.def" ) ) + if (File.Exists(infoDir.FullName + @"\box.def")) { - CBoxDef boxdef = new CBoxDef( infoDir.FullName + @"\box.def" ); - if( ( boxdef.Title != null ) && ( boxdef.Title.Length > 0 ) ) + CBoxDef boxdef = new CBoxDef(infoDir.FullName + @"\box.def"); + if ((boxdef.Title != null) && (boxdef.Title.Length > 0)) { c曲リストノード.strタイトル = boxdef.Title; } - if( ( boxdef.Genre != null ) && ( boxdef.Genre.Length > 0 ) ) + if ((boxdef.Genre != null) && (boxdef.Genre.Length > 0)) { c曲リストノード.strジャンル = boxdef.Genre; } - if( boxdef.Color != Color.White ) + if (boxdef.Color != Color.White) { c曲リストノード.col文字色 = boxdef.Color; } - if( ( boxdef.Artist != null ) && ( boxdef.Artist.Length > 0 ) ) + if ((boxdef.Artist != null) && (boxdef.Artist.Length > 0)) { - c曲リストノード.arスコア[ 0 ].譜面情報.アーティスト名 = boxdef.Artist; + c曲リストノード.arスコア[0].譜面情報.アーティスト名 = boxdef.Artist; } - if( ( boxdef.Comment != null ) && ( boxdef.Comment.Length > 0 ) ) + if ((boxdef.Comment != null) && (boxdef.Comment.Length > 0)) { - c曲リストノード.arスコア[ 0 ].譜面情報.コメント = boxdef.Comment; + c曲リストノード.arスコア[0].譜面情報.コメント = boxdef.Comment; } - if( ( boxdef.Preimage != null ) && ( boxdef.Preimage.Length > 0 ) ) + if ((boxdef.Preimage != null) && (boxdef.Preimage.Length > 0)) { - c曲リストノード.arスコア[ 0 ].譜面情報.Preimage = boxdef.Preimage; + c曲リストノード.arスコア[0].譜面情報.Preimage = boxdef.Preimage; } - if( ( boxdef.Premovie != null ) && ( boxdef.Premovie.Length > 0 ) ) + if ((boxdef.Premovie != null) && (boxdef.Premovie.Length > 0)) { - c曲リストノード.arスコア[ 0 ].譜面情報.Premovie = boxdef.Premovie; + c曲リストノード.arスコア[0].譜面情報.Premovie = boxdef.Premovie; } - if( ( boxdef.Presound != null ) && ( boxdef.Presound.Length > 0 ) ) + if ((boxdef.Presound != null) && (boxdef.Presound.Length > 0)) { - c曲リストノード.arスコア[ 0 ].譜面情報.Presound = boxdef.Presound; + c曲リストノード.arスコア[0].譜面情報.Presound = boxdef.Presound; } - if ( boxdef.SkinPath != null ) + if (boxdef.SkinPath != null) { - if ( boxdef.SkinPath == "" ) + if (boxdef.SkinPath == "") { // box.defにスキン情報が記載されていないなら、上位BOXのスキン情報をコピー - c曲リストノード.strSkinPath = ( c曲リストノード.r親ノード == null ) ? + c曲リストノード.strSkinPath = (c曲リストノード.r親ノード == null) ? "" : c曲リストノード.r親ノード.strSkinPath; } else { // box.defに記載されているスキン情報をコピー。末尾に必ず\をつけておくこと。 - string s = System.IO.Path.Combine( infoDir.FullName, boxdef.SkinPath ); - if ( s[ s.Length - 1 ] != System.IO.Path.DirectorySeparatorChar ) // フォルダ名末尾に\を必ずつけて、CSkin側と表記を統一する + string s = System.IO.Path.Combine(infoDir.FullName, boxdef.SkinPath); + if (s[s.Length - 1] != System.IO.Path.DirectorySeparatorChar) // フォルダ名末尾に\を必ずつけて、CSkin側と表記を統一する { s += System.IO.Path.DirectorySeparatorChar; } - if ( CDTXMania.app.Skin.bIsValid( s ) ) + if (CDTXMania.app.Skin.bIsValid(s)) { c曲リストノード.strSkinPath = s; } else { - c曲リストノード.strSkinPath = ( c曲リストノード.r親ノード == null ) ? + c曲リストノード.strSkinPath = (c曲リストノード.r親ノード == null) ? "" : c曲リストノード.r親ノード.strSkinPath; } } } - if ( boxdef.PerfectRange >= 0 ) + if (boxdef.PerfectRange >= 0) { c曲リストノード.nPerfect範囲ms = boxdef.PerfectRange; } - if( boxdef.GreatRange >= 0 ) + if (boxdef.GreatRange >= 0) { c曲リストノード.nGreat範囲ms = boxdef.GreatRange; } - if( boxdef.GoodRange >= 0 ) + if (boxdef.GoodRange >= 0) { c曲リストノード.nGood範囲ms = boxdef.GoodRange; } - if( boxdef.PoorRange >= 0 ) + if (boxdef.PoorRange >= 0) { c曲リストノード.nPoor範囲ms = boxdef.PoorRange; } } - if( CDTXMania.app.ConfigIni.bLog曲検索ログ出力 ) + if (CDTXMania.app.ConfigIni.bLog曲検索ログ出力) { Trace.Indent(); try { - StringBuilder sb = new StringBuilder( 0x100 ); - sb.Append( string.Format( "nID#{0:D3}", c曲リストノード.nID ) ); - if( c曲リストノード.r親ノード != null ) + StringBuilder sb = new StringBuilder(0x100); + sb.Append(string.Format("nID#{0:D3}", c曲リストノード.nID)); + if (c曲リストノード.r親ノード != null) { - sb.Append( string.Format( "(in#{0:D3}):", c曲リストノード.r親ノード.nID ) ); + sb.Append(string.Format("(in#{0:D3}):", c曲リストノード.r親ノード.nID)); } else { - sb.Append( "(onRoot):" ); + sb.Append("(onRoot):"); } - sb.Append( " BOX, Title=" + c曲リストノード.strタイトル ); - sb.Append( ", Folder=" + c曲リストノード.arスコア[ 0 ].ファイル情報.フォルダの絶対パス ); - sb.Append( ", Comment=" + c曲リストノード.arスコア[ 0 ].譜面情報.コメント ); - sb.Append( ", SkinPath=" + c曲リストノード.strSkinPath ); - Trace.TraceInformation( sb.ToString() ); + sb.Append(" BOX, Title=" + c曲リストノード.strタイトル); + sb.Append(", Folder=" + c曲リストノード.arスコア[0].ファイル情報.フォルダの絶対パス); + sb.Append(", Comment=" + c曲リストノード.arスコア[0].譜面情報.コメント); + sb.Append(", SkinPath=" + c曲リストノード.strSkinPath); + Trace.TraceInformation(sb.ToString()); } finally { Trace.Unindent(); } } - if( b子BOXへ再帰する ) + if (b子BOXへ再帰する) { - this.t曲を検索してリストを作成する( infoDir.FullName + @"\", b子BOXへ再帰する, c曲リストノード.list子リスト, c曲リストノード ); + this.t曲を検索してリストを作成する(infoDir.FullName + @"\", b子BOXへ再帰する, c曲リストノード.list子リスト, c曲リストノード); } } //----------------------------- @@ -488,9 +488,9 @@ namespace DTXMania #region [ b.box.def を含むフォルダの場合 ] //----------------------------- - else if( File.Exists( infoDir.FullName + @"\box.def" ) ) + else if (File.Exists(infoDir.FullName + @"\box.def")) { - CBoxDef boxdef = new CBoxDef( infoDir.FullName + @"\box.def" ); + CBoxDef boxdef = new CBoxDef(infoDir.FullName + @"\box.def"); C曲リストノード c曲リストノード = new C曲リストノード(); c曲リストノード.eノード種別 = C曲リストノード.Eノード種別.BOX; c曲リストノード.bDTXFilesで始まるフォルダ名のBOXである = false; @@ -498,126 +498,126 @@ namespace DTXMania c曲リストノード.strジャンル = boxdef.Genre; c曲リストノード.col文字色 = boxdef.Color; c曲リストノード.nスコア数 = 1; - c曲リストノード.arスコア[ 0 ] = new Cスコア(); - c曲リストノード.arスコア[ 0 ].ファイル情報.フォルダの絶対パス = infoDir.FullName + @"\"; - c曲リストノード.arスコア[ 0 ].譜面情報.タイトル = boxdef.Title; - c曲リストノード.arスコア[ 0 ].譜面情報.ジャンル = boxdef.Genre; - c曲リストノード.arスコア[ 0 ].譜面情報.アーティスト名 = boxdef.Artist; - c曲リストノード.arスコア[ 0 ].譜面情報.コメント = boxdef.Comment; - c曲リストノード.arスコア[ 0 ].譜面情報.Preimage = boxdef.Preimage; - c曲リストノード.arスコア[ 0 ].譜面情報.Premovie = boxdef.Premovie; - c曲リストノード.arスコア[ 0 ].譜面情報.Presound = boxdef.Presound; + c曲リストノード.arスコア[0] = new Cスコア(); + c曲リストノード.arスコア[0].ファイル情報.フォルダの絶対パス = infoDir.FullName + @"\"; + c曲リストノード.arスコア[0].譜面情報.タイトル = boxdef.Title; + c曲リストノード.arスコア[0].譜面情報.ジャンル = boxdef.Genre; + c曲リストノード.arスコア[0].譜面情報.アーティスト名 = boxdef.Artist; + c曲リストノード.arスコア[0].譜面情報.コメント = boxdef.Comment; + c曲リストノード.arスコア[0].譜面情報.Preimage = boxdef.Preimage; + c曲リストノード.arスコア[0].譜面情報.Premovie = boxdef.Premovie; + c曲リストノード.arスコア[0].譜面情報.Presound = boxdef.Presound; c曲リストノード.r親ノード = node親; - if ( boxdef.SkinPath == "" ) + if (boxdef.SkinPath == "") { // box.defにスキン情報が記載されていないなら、上位BOXのスキン情報をコピー - c曲リストノード.strSkinPath = ( c曲リストノード.r親ノード == null ) ? + c曲リストノード.strSkinPath = (c曲リストノード.r親ノード == null) ? "" : c曲リストノード.r親ノード.strSkinPath; } else { // box.defに記載されているスキン情報をコピー。末尾に必ず\をつけておくこと。 - string s = System.IO.Path.Combine( infoDir.FullName, boxdef.SkinPath ); - if ( s[ s.Length - 1 ] != System.IO.Path.DirectorySeparatorChar ) // フォルダ名末尾に\を必ずつけて、CSkin側と表記を統一する + string s = System.IO.Path.Combine(infoDir.FullName, boxdef.SkinPath); + if (s[s.Length - 1] != System.IO.Path.DirectorySeparatorChar) // フォルダ名末尾に\を必ずつけて、CSkin側と表記を統一する { s += System.IO.Path.DirectorySeparatorChar; } - if ( CDTXMania.app.Skin.bIsValid( s ) ) + if (CDTXMania.app.Skin.bIsValid(s)) { c曲リストノード.strSkinPath = s; } else { - c曲リストノード.strSkinPath = ( c曲リストノード.r親ノード == null ) ? + c曲リストノード.strSkinPath = (c曲リストノード.r親ノード == null) ? "" : c曲リストノード.r親ノード.strSkinPath; } } - c曲リストノード.strBreadcrumbs = ( c曲リストノード.r親ノード == null ) ? + c曲リストノード.strBreadcrumbs = (c曲リストノード.r親ノード == null) ? c曲リストノード.strタイトル : c曲リストノード.r親ノード.strBreadcrumbs + " > " + c曲リストノード.strタイトル; - - + + c曲リストノード.list子リスト = new List(); c曲リストノード.nPerfect範囲ms = boxdef.PerfectRange; c曲リストノード.nGreat範囲ms = boxdef.GreatRange; c曲リストノード.nGood範囲ms = boxdef.GoodRange; c曲リストノード.nPoor範囲ms = boxdef.PoorRange; - listノードリスト.Add( c曲リストノード ); - if( CDTXMania.app.ConfigIni.bLog曲検索ログ出力 ) + listノードリスト.Add(c曲リストノード); + if (CDTXMania.app.ConfigIni.bLog曲検索ログ出力) { - Trace.TraceInformation( "box.def検出 : {0}", infoDir.FullName + @"\box.def" ); + Trace.TraceInformation("box.def検出 : {0}", infoDir.FullName + @"\box.def"); Trace.Indent(); try { - StringBuilder sb = new StringBuilder( 0x400 ); - sb.Append( string.Format( "nID#{0:D3}", c曲リストノード.nID ) ); - if( c曲リストノード.r親ノード != null ) + StringBuilder sb = new StringBuilder(0x400); + sb.Append(string.Format("nID#{0:D3}", c曲リストノード.nID)); + if (c曲リストノード.r親ノード != null) { - sb.Append( string.Format( "(in#{0:D3}):", c曲リストノード.r親ノード.nID ) ); + sb.Append(string.Format("(in#{0:D3}):", c曲リストノード.r親ノード.nID)); } else { - sb.Append( "(onRoot):" ); + sb.Append("(onRoot):"); } - sb.Append( "BOX, Title=" + c曲リストノード.strタイトル ); - if( ( c曲リストノード.strジャンル != null ) && ( c曲リストノード.strジャンル.Length > 0 ) ) + sb.Append("BOX, Title=" + c曲リストノード.strタイトル); + if ((c曲リストノード.strジャンル != null) && (c曲リストノード.strジャンル.Length > 0)) { - sb.Append( ", Genre=" + c曲リストノード.strジャンル ); + sb.Append(", Genre=" + c曲リストノード.strジャンル); } - if( ( c曲リストノード.arスコア[ 0 ].譜面情報.アーティスト名 != null ) && ( c曲リストノード.arスコア[ 0 ].譜面情報.アーティスト名.Length > 0 ) ) + if ((c曲リストノード.arスコア[0].譜面情報.アーティスト名 != null) && (c曲リストノード.arスコア[0].譜面情報.アーティスト名.Length > 0)) { - sb.Append( ", Artist=" + c曲リストノード.arスコア[ 0 ].譜面情報.アーティスト名 ); + sb.Append(", Artist=" + c曲リストノード.arスコア[0].譜面情報.アーティスト名); } - if( ( c曲リストノード.arスコア[ 0 ].譜面情報.コメント != null ) && ( c曲リストノード.arスコア[ 0 ].譜面情報.コメント.Length > 0 ) ) + if ((c曲リストノード.arスコア[0].譜面情報.コメント != null) && (c曲リストノード.arスコア[0].譜面情報.コメント.Length > 0)) { - sb.Append( ", Comment=" + c曲リストノード.arスコア[ 0 ].譜面情報.コメント ); + sb.Append(", Comment=" + c曲リストノード.arスコア[0].譜面情報.コメント); } - if( ( c曲リストノード.arスコア[ 0 ].譜面情報.Preimage != null ) && ( c曲リストノード.arスコア[ 0 ].譜面情報.Preimage.Length > 0 ) ) + if ((c曲リストノード.arスコア[0].譜面情報.Preimage != null) && (c曲リストノード.arスコア[0].譜面情報.Preimage.Length > 0)) { - sb.Append( ", Preimage=" + c曲リストノード.arスコア[ 0 ].譜面情報.Preimage ); + sb.Append(", Preimage=" + c曲リストノード.arスコア[0].譜面情報.Preimage); } - if( ( c曲リストノード.arスコア[ 0 ].譜面情報.Premovie != null ) && ( c曲リストノード.arスコア[ 0 ].譜面情報.Premovie.Length > 0 ) ) + if ((c曲リストノード.arスコア[0].譜面情報.Premovie != null) && (c曲リストノード.arスコア[0].譜面情報.Premovie.Length > 0)) { - sb.Append( ", Premovie=" + c曲リストノード.arスコア[ 0 ].譜面情報.Premovie ); + sb.Append(", Premovie=" + c曲リストノード.arスコア[0].譜面情報.Premovie); } - if( ( c曲リストノード.arスコア[ 0 ].譜面情報.Presound != null ) && ( c曲リストノード.arスコア[ 0 ].譜面情報.Presound.Length > 0 ) ) + if ((c曲リストノード.arスコア[0].譜面情報.Presound != null) && (c曲リストノード.arスコア[0].譜面情報.Presound.Length > 0)) { - sb.Append( ", Presound=" + c曲リストノード.arスコア[ 0 ].譜面情報.Presound ); + sb.Append(", Presound=" + c曲リストノード.arスコア[0].譜面情報.Presound); } - if( c曲リストノード.col文字色 != ColorTranslator.FromHtml( "White" ) ) + if (c曲リストノード.col文字色 != ColorTranslator.FromHtml("White")) { - sb.Append( ", FontColor=" + c曲リストノード.col文字色 ); + sb.Append(", FontColor=" + c曲リストノード.col文字色); } - if( c曲リストノード.nPerfect範囲ms != -1 ) + if (c曲リストノード.nPerfect範囲ms != -1) { - sb.Append( ", Perfect=" + c曲リストノード.nPerfect範囲ms + "ms" ); + sb.Append(", Perfect=" + c曲リストノード.nPerfect範囲ms + "ms"); } - if( c曲リストノード.nGreat範囲ms != -1 ) + if (c曲リストノード.nGreat範囲ms != -1) { - sb.Append( ", Great=" + c曲リストノード.nGreat範囲ms + "ms" ); + sb.Append(", Great=" + c曲リストノード.nGreat範囲ms + "ms"); } - if( c曲リストノード.nGood範囲ms != -1 ) + if (c曲リストノード.nGood範囲ms != -1) { - sb.Append( ", Good=" + c曲リストノード.nGood範囲ms + "ms" ); + sb.Append(", Good=" + c曲リストノード.nGood範囲ms + "ms"); } - if( c曲リストノード.nPoor範囲ms != -1 ) + if (c曲リストノード.nPoor範囲ms != -1) { - sb.Append( ", Poor=" + c曲リストノード.nPoor範囲ms + "ms" ); + sb.Append(", Poor=" + c曲リストノード.nPoor範囲ms + "ms"); } - if ( ( c曲リストノード.strSkinPath != null ) && ( c曲リストノード.strSkinPath.Length > 0 ) ) + if ((c曲リストノード.strSkinPath != null) && (c曲リストノード.strSkinPath.Length > 0)) { - sb.Append( ", SkinPath=" + c曲リストノード.strSkinPath ); + sb.Append(", SkinPath=" + c曲リストノード.strSkinPath); } - Trace.TraceInformation( sb.ToString() ); + Trace.TraceInformation(sb.ToString()); } finally { Trace.Unindent(); } } - if( b子BOXへ再帰する ) + if (b子BOXへ再帰する) { - this.t曲を検索してリストを作成する( infoDir.FullName + @"\", b子BOXへ再帰する, c曲リストノード.list子リスト, c曲リストノード ); + this.t曲を検索してリストを作成する(infoDir.FullName + @"\", b子BOXへ再帰する, c曲リストノード.list子リスト, c曲リストノード); } } //----------------------------- @@ -627,7 +627,7 @@ namespace DTXMania //----------------------------- else { - this.t曲を検索してリストを作成する( infoDir.FullName + @"\", b子BOXへ再帰する, listノードリスト, node親 ); + this.t曲を検索してリストを作成する(infoDir.FullName + @"\", b子BOXへ再帰する, listノードリスト, node親); } //----------------------------- #endregion @@ -640,100 +640,100 @@ namespace DTXMania public void tスコアキャッシュを曲リストに反映する() { this.nスコアキャッシュから反映できたスコア数 = 0; - this.tスコアキャッシュを曲リストに反映する( this.list曲ルート ); + this.tスコアキャッシュを曲リストに反映する(this.list曲ルート); } - private void tスコアキャッシュを曲リストに反映する( List ノードリスト ) + private void tスコアキャッシュを曲リストに反映する(List ノードリスト) { - using( List.Enumerator enumerator = ノードリスト.GetEnumerator() ) + using (List.Enumerator enumerator = ノードリスト.GetEnumerator()) { - while( enumerator.MoveNext() ) + while (enumerator.MoveNext()) { SlowOrSuspendSearchTask(); // #27060 中断要求があったら、解除要求が来るまで待機, #PREMOVIE再生中は検索負荷を落とす C曲リストノード node = enumerator.Current; - if( node.eノード種別 == C曲リストノード.Eノード種別.BOX ) + if (node.eノード種別 == C曲リストノード.Eノード種別.BOX) { - this.tスコアキャッシュを曲リストに反映する( node.list子リスト ); + this.tスコアキャッシュを曲リストに反映する(node.list子リスト); } - else if( ( node.eノード種別 == C曲リストノード.Eノード種別.SCORE ) || ( node.eノード種別 == C曲リストノード.Eノード種別.SCORE_MIDI ) ) + else if ((node.eノード種別 == C曲リストノード.Eノード種別.SCORE) || (node.eノード種別 == C曲リストノード.Eノード種別.SCORE_MIDI)) { Predicate match = null; - for( int lv = 0; lv < 5; lv++ ) + for (int lv = 0; lv < 5; lv++) { - if( node.arスコア[ lv ] != null ) + if (node.arスコア[lv] != null) { - if( match == null ) + if (match == null) { - match = delegate( Cスコア sc ) + match = delegate(Cスコア sc) { return ( - ( sc.ファイル情報.ファイルの絶対パス.Equals( node.arスコア[ lv ].ファイル情報.ファイルの絶対パス ) - && sc.ファイル情報.ファイルサイズ.Equals( node.arスコア[ lv ].ファイル情報.ファイルサイズ ) ) - && ( sc.ファイル情報.最終更新日時.Equals( node.arスコア[ lv ].ファイル情報.最終更新日時 ) - && sc.ScoreIni情報.ファイルサイズ.Equals( node.arスコア[ lv ].ScoreIni情報.ファイルサイズ ) ) ) - && sc.ScoreIni情報.最終更新日時.Equals( node.arスコア[ lv ].ScoreIni情報.最終更新日時 ); + (sc.ファイル情報.ファイルの絶対パス.Equals(node.arスコア[lv].ファイル情報.ファイルの絶対パス) + && sc.ファイル情報.ファイルサイズ.Equals(node.arスコア[lv].ファイル情報.ファイルサイズ)) + && (sc.ファイル情報.最終更新日時.Equals(node.arスコア[lv].ファイル情報.最終更新日時) + && sc.ScoreIni情報.ファイルサイズ.Equals(node.arスコア[lv].ScoreIni情報.ファイルサイズ))) + && sc.ScoreIni情報.最終更新日時.Equals(node.arスコア[lv].ScoreIni情報.最終更新日時); }; } - int nMatched = this.listSongsDB.FindIndex( match ); - if( nMatched == -1 ) + int nMatched = this.listSongsDB.FindIndex(match); + if (nMatched == -1) { -//Trace.TraceInformation( "songs.db に存在しません。({0})", node.arスコア[ lv ].ファイル情報.ファイルの絶対パス ); - if ( CDTXMania.app.ConfigIni.bLog曲検索ログ出力 ) + //Trace.TraceInformation( "songs.db に存在しません。({0})", node.arスコア[ lv ].ファイル情報.ファイルの絶対パス ); + if (CDTXMania.app.ConfigIni.bLog曲検索ログ出力) { - Trace.TraceInformation( "songs.db に存在しません。({0})", node.arスコア[ lv ].ファイル情報.ファイルの絶対パス ); + Trace.TraceInformation("songs.db に存在しません。({0})", node.arスコア[lv].ファイル情報.ファイルの絶対パス); } } else { - node.arスコア[ lv ].譜面情報 = this.listSongsDB[ nMatched ].譜面情報; - node.arスコア[ lv ].bSongDBにキャッシュがあった = true; - if( CDTXMania.app.ConfigIni.bLog曲検索ログ出力 ) + node.arスコア[lv].譜面情報 = this.listSongsDB[nMatched].譜面情報; + node.arスコア[lv].bSongDBにキャッシュがあった = true; + if (CDTXMania.app.ConfigIni.bLog曲検索ログ出力) { - Trace.TraceInformation( "songs.db から転記しました。({0})", node.arスコア[ lv ].ファイル情報.ファイルの絶対パス ); + Trace.TraceInformation("songs.db から転記しました。({0})", node.arスコア[lv].ファイル情報.ファイルの絶対パス); } this.nスコアキャッシュから反映できたスコア数++; - if( node.arスコア[ lv ].ScoreIni情報.最終更新日時 != this.listSongsDB[ nMatched ].ScoreIni情報.最終更新日時 ) + if (node.arスコア[lv].ScoreIni情報.最終更新日時 != this.listSongsDB[nMatched].ScoreIni情報.最終更新日時) { - string strFileNameScoreIni = node.arスコア[ lv ].ファイル情報.ファイルの絶対パス + ".score.ini"; + string strFileNameScoreIni = node.arスコア[lv].ファイル情報.ファイルの絶対パス + ".score.ini"; try { - CScoreIni scoreIni = new CScoreIni( strFileNameScoreIni ); + CScoreIni scoreIni = new CScoreIni(strFileNameScoreIni); scoreIni.t全演奏記録セクションの整合性をチェックし不整合があればリセットする(); - for( int i = 0; i < 3; i++ ) + for (int i = 0; i < 3; i++) { - int nSectionHiSkill = ( i * 2 ) + 1; - if( scoreIni.stセクション[ nSectionHiSkill ].b演奏にMIDI入力を使用した - || scoreIni.stセクション[ nSectionHiSkill ].b演奏にキーボードを使用した - || scoreIni.stセクション[ nSectionHiSkill ].b演奏にジョイパッドを使用した - || scoreIni.stセクション[ nSectionHiSkill ].b演奏にマウスを使用した ) + int nSectionHiSkill = (i * 2) + 1; + if (scoreIni.stセクション[nSectionHiSkill].b演奏にMIDI入力を使用した + || scoreIni.stセクション[nSectionHiSkill].b演奏にキーボードを使用した + || scoreIni.stセクション[nSectionHiSkill].b演奏にジョイパッドを使用した + || scoreIni.stセクション[nSectionHiSkill].b演奏にマウスを使用した) { - node.arスコア[ lv ].譜面情報.最大ランク[ i ] = - (scoreIni.stファイル.BestRank[i] != (int)CScoreIni.ERANK.UNKNOWN)? - (int)scoreIni.stファイル.BestRank[i] : CScoreIni.tランク値を計算して返す( scoreIni.stセクション[ nSectionHiSkill ] ); + node.arスコア[lv].譜面情報.最大ランク[i] = + (scoreIni.stファイル.BestRank[i] != (int)CScoreIni.ERANK.UNKNOWN) ? + (int)scoreIni.stファイル.BestRank[i] : CScoreIni.tランク値を計算して返す(scoreIni.stセクション[nSectionHiSkill]); } else { - node.arスコア[ lv ].譜面情報.最大ランク[ i ] = (int)CScoreIni.ERANK.UNKNOWN; + node.arスコア[lv].譜面情報.最大ランク[i] = (int)CScoreIni.ERANK.UNKNOWN; } - node.arスコア[ lv ].譜面情報.最大スキル[ i ] = scoreIni.stセクション[ nSectionHiSkill ].db演奏型スキル値; - node.arスコア[ lv ].譜面情報.フルコンボ[ i ] = scoreIni.stセクション[ nSectionHiSkill ].bフルコンボである; + node.arスコア[lv].譜面情報.最大スキル[i] = scoreIni.stセクション[nSectionHiSkill].db演奏型スキル値; + node.arスコア[lv].譜面情報.フルコンボ[i] = scoreIni.stセクション[nSectionHiSkill].bフルコンボである; } - node.arスコア[ lv ].譜面情報.演奏回数.Drums = scoreIni.stファイル.PlayCountDrums; - node.arスコア[ lv ].譜面情報.演奏回数.Guitar = scoreIni.stファイル.PlayCountGuitar; - node.arスコア[ lv ].譜面情報.演奏回数.Bass = scoreIni.stファイル.PlayCountBass; - for( int j = 0; j < 5; j++ ) + node.arスコア[lv].譜面情報.演奏回数.Drums = scoreIni.stファイル.PlayCountDrums; + node.arスコア[lv].譜面情報.演奏回数.Guitar = scoreIni.stファイル.PlayCountGuitar; + node.arスコア[lv].譜面情報.演奏回数.Bass = scoreIni.stファイル.PlayCountBass; + for (int j = 0; j < 5; j++) { - node.arスコア[ lv ].譜面情報.演奏履歴[ j ] = scoreIni.stファイル.History[ j ]; + node.arスコア[lv].譜面情報.演奏履歴[j] = scoreIni.stファイル.History[j]; } - if( CDTXMania.app.ConfigIni.bLog曲検索ログ出力 ) + if (CDTXMania.app.ConfigIni.bLog曲検索ログ出力) { - Trace.TraceInformation( "演奏記録ファイルから HiSkill 情報と演奏履歴を取得しました。({0})", strFileNameScoreIni ); + Trace.TraceInformation("演奏記録ファイルから HiSkill 情報と演奏履歴を取得しました。({0})", strFileNameScoreIni); } } catch { - Trace.TraceError( "演奏記録ファイルの読み込みに失敗しました。({0})", strFileNameScoreIni ); + Trace.TraceError("演奏記録ファイルの読み込みに失敗しました。({0})", strFileNameScoreIni); } } } @@ -743,14 +743,14 @@ namespace DTXMania } } } - private Cスコア tSongsDBからスコアを1つ読み込む( BinaryReader br ) + private Cスコア tSongsDBからスコアを1つ読み込む(BinaryReader br) { Cスコア cスコア = new Cスコア(); cスコア.ファイル情報.ファイルの絶対パス = br.ReadString(); cスコア.ファイル情報.フォルダの絶対パス = br.ReadString(); - cスコア.ファイル情報.最終更新日時 = new DateTime( br.ReadInt64() ); + cスコア.ファイル情報.最終更新日時 = new DateTime(br.ReadInt64()); cスコア.ファイル情報.ファイルサイズ = br.ReadInt64(); - cスコア.ScoreIni情報.最終更新日時 = new DateTime( br.ReadInt64() ); + cスコア.ScoreIni情報.最終更新日時 = new DateTime(br.ReadInt64()); cスコア.ScoreIni情報.ファイルサイズ = br.ReadInt64(); cスコア.譜面情報.タイトル = br.ReadString(); cスコア.譜面情報.アーティスト名 = br.ReadString(); @@ -781,11 +781,11 @@ namespace DTXMania cスコア.譜面情報.演奏履歴.行4 = br.ReadString(); cスコア.譜面情報.演奏履歴.行5 = br.ReadString(); cスコア.譜面情報.レベルを非表示にする = br.ReadBoolean(); - cスコア.譜面情報.曲種別 = (EDTX種別) br.ReadInt32(); + cスコア.譜面情報.曲種別 = (EDTX種別)br.ReadInt32(); cスコア.譜面情報.Bpm = br.ReadDouble(); cスコア.譜面情報.Duration = br.ReadInt32(); -//Debug.WriteLine( "songs.db: " + cスコア.ファイル情報.ファイルの絶対パス ); + //Debug.WriteLine( "songs.db: " + cスコア.ファイル情報.ファイルの絶対パス ); return cスコア; } //----------------- @@ -795,84 +795,84 @@ namespace DTXMania public void tSongsDBになかった曲をファイルから読み込んで反映する() { this.nファイルから反映できたスコア数 = 0; - this.tSongsDBになかった曲をファイルから読み込んで反映する( this.list曲ルート ); + this.tSongsDBになかった曲をファイルから読み込んで反映する(this.list曲ルート); } - private void tSongsDBになかった曲をファイルから読み込んで反映する( List ノードリスト ) + private void tSongsDBになかった曲をファイルから読み込んで反映する(List ノードリスト) { - foreach( C曲リストノード c曲リストノード in ノードリスト ) + foreach (C曲リストノード c曲リストノード in ノードリスト) { SlowOrSuspendSearchTask(); // #27060 中断要求があったら、解除要求が来るまで待機, #PREMOVIE再生中は検索負荷を落とす - if( c曲リストノード.eノード種別 == C曲リストノード.Eノード種別.BOX ) + if (c曲リストノード.eノード種別 == C曲リストノード.Eノード種別.BOX) { - this.tSongsDBになかった曲をファイルから読み込んで反映する( c曲リストノード.list子リスト ); + this.tSongsDBになかった曲をファイルから読み込んで反映する(c曲リストノード.list子リスト); } - else if( ( c曲リストノード.eノード種別 == C曲リストノード.Eノード種別.SCORE ) - || ( c曲リストノード.eノード種別 == C曲リストノード.Eノード種別.SCORE_MIDI ) ) + else if ((c曲リストノード.eノード種別 == C曲リストノード.Eノード種別.SCORE) + || (c曲リストノード.eノード種別 == C曲リストノード.Eノード種別.SCORE_MIDI)) { - for( int i = 0; i < 5; i++ ) + for (int i = 0; i < 5; i++) { - if( ( c曲リストノード.arスコア[ i ] != null ) && !c曲リストノード.arスコア[ i ].bSongDBにキャッシュがあった ) + if ((c曲リストノード.arスコア[i] != null) && !c曲リストノード.arスコア[i].bSongDBにキャッシュがあった) { #region [ DTX ファイルのヘッダだけ読み込み、Cスコア.譜面情報 を設定する ] //----------------- - string path = c曲リストノード.arスコア[ i ].ファイル情報.ファイルの絶対パス; - if( File.Exists( path ) ) + string path = c曲リストノード.arスコア[i].ファイル情報.ファイルの絶対パス; + if (File.Exists(path)) { try { - CDTX cdtx = new CDTX( c曲リストノード.arスコア[ i ].ファイル情報.ファイルの絶対パス, true ); - c曲リストノード.arスコア[ i ].譜面情報.タイトル = cdtx.TITLE; - c曲リストノード.arスコア[ i ].譜面情報.アーティスト名 = cdtx.ARTIST; - c曲リストノード.arスコア[ i ].譜面情報.コメント = cdtx.COMMENT; - c曲リストノード.arスコア[ i ].譜面情報.ジャンル = cdtx.GENRE; - c曲リストノード.arスコア[ i ].譜面情報.Preimage = cdtx.PREIMAGE; - c曲リストノード.arスコア[ i ].譜面情報.Premovie = cdtx.PREMOVIE; - c曲リストノード.arスコア[ i ].譜面情報.Presound = cdtx.PREVIEW; - c曲リストノード.arスコア[ i ].譜面情報.Backgound = ( ( cdtx.BACKGROUND != null ) && ( cdtx.BACKGROUND.Length > 0 ) ) ? cdtx.BACKGROUND : cdtx.BACKGROUND_GR; - c曲リストノード.arスコア[ i ].譜面情報.レベル.Drums = cdtx.LEVEL.Drums; - c曲リストノード.arスコア[ i ].譜面情報.レベル.Guitar = cdtx.LEVEL.Guitar; - c曲リストノード.arスコア[ i ].譜面情報.レベル.Bass = cdtx.LEVEL.Bass; - c曲リストノード.arスコア[ i ].譜面情報.レベルを非表示にする = cdtx.HIDDENLEVEL; - c曲リストノード.arスコア[ i ].譜面情報.曲種別 = cdtx.e種別; - c曲リストノード.arスコア[ i ].譜面情報.Bpm = cdtx.BPM; - c曲リストノード.arスコア[ i ].譜面情報.Duration = 0; // (cdtx.listChip == null)? 0 : cdtx.listChip[ cdtx.listChip.Count - 1 ].n発声時刻ms; + CDTX cdtx = new CDTX(c曲リストノード.arスコア[i].ファイル情報.ファイルの絶対パス, true); + c曲リストノード.arスコア[i].譜面情報.タイトル = cdtx.TITLE; + c曲リストノード.arスコア[i].譜面情報.アーティスト名 = cdtx.ARTIST; + c曲リストノード.arスコア[i].譜面情報.コメント = cdtx.COMMENT; + c曲リストノード.arスコア[i].譜面情報.ジャンル = cdtx.GENRE; + c曲リストノード.arスコア[i].譜面情報.Preimage = cdtx.PREIMAGE; + c曲リストノード.arスコア[i].譜面情報.Premovie = cdtx.PREMOVIE; + c曲リストノード.arスコア[i].譜面情報.Presound = cdtx.PREVIEW; + c曲リストノード.arスコア[i].譜面情報.Backgound = ((cdtx.BACKGROUND != null) && (cdtx.BACKGROUND.Length > 0)) ? cdtx.BACKGROUND : cdtx.BACKGROUND_GR; + c曲リストノード.arスコア[i].譜面情報.レベル.Drums = cdtx.LEVEL.Drums; + c曲リストノード.arスコア[i].譜面情報.レベル.Guitar = cdtx.LEVEL.Guitar; + c曲リストノード.arスコア[i].譜面情報.レベル.Bass = cdtx.LEVEL.Bass; + c曲リストノード.arスコア[i].譜面情報.レベルを非表示にする = cdtx.HIDDENLEVEL; + c曲リストノード.arスコア[i].譜面情報.曲種別 = cdtx.e種別; + c曲リストノード.arスコア[i].譜面情報.Bpm = cdtx.BPM; + c曲リストノード.arスコア[i].譜面情報.Duration = 0; // (cdtx.listChip == null)? 0 : cdtx.listChip[ cdtx.listChip.Count - 1 ].n発声時刻ms; this.nファイルから反映できたスコア数++; cdtx.On非活性化(); -//Debug.WriteLine( "★" + this.nファイルから反映できたスコア数 + " " + c曲リストノード.arスコア[ i ].譜面情報.タイトル ); + //Debug.WriteLine( "★" + this.nファイルから反映できたスコア数 + " " + c曲リストノード.arスコア[ i ].譜面情報.タイトル ); #region [ 曲検索ログ出力 ] //----------------- - if( CDTXMania.app.ConfigIni.bLog曲検索ログ出力 ) + if (CDTXMania.app.ConfigIni.bLog曲検索ログ出力) { - StringBuilder sb = new StringBuilder( 0x400 ); - sb.Append( string.Format( "曲データファイルから譜面情報を転記しました。({0})", path ) ); - sb.Append( "(title=" + c曲リストノード.arスコア[ i ].譜面情報.タイトル ); - sb.Append( ", artist=" + c曲リストノード.arスコア[ i ].譜面情報.アーティスト名 ); - sb.Append( ", comment=" + c曲リストノード.arスコア[ i ].譜面情報.コメント ); - sb.Append( ", genre=" + c曲リストノード.arスコア[ i ].譜面情報.ジャンル ); - sb.Append( ", preimage=" + c曲リストノード.arスコア[ i ].譜面情報.Preimage ); - sb.Append( ", premovie=" + c曲リストノード.arスコア[ i ].譜面情報.Premovie ); - sb.Append( ", presound=" + c曲リストノード.arスコア[ i ].譜面情報.Presound ); - sb.Append( ", background=" + c曲リストノード.arスコア[ i ].譜面情報.Backgound ); - sb.Append( ", lvDr=" + c曲リストノード.arスコア[ i ].譜面情報.レベル.Drums ); - sb.Append( ", lvGt=" + c曲リストノード.arスコア[ i ].譜面情報.レベル.Guitar ); - sb.Append( ", lvBs=" + c曲リストノード.arスコア[ i ].譜面情報.レベル.Bass ); - sb.Append( ", lvHide=" + c曲リストノード.arスコア[ i ].譜面情報.レベルを非表示にする ); - sb.Append( ", type=" + c曲リストノード.arスコア[ i ].譜面情報.曲種別 ); - sb.Append( ", bpm=" + c曲リストノード.arスコア[ i ].譜面情報.Bpm ); - // sb.Append( ", duration=" + c曲リストノード.arスコア[ i ].譜面情報.Duration ); - Trace.TraceInformation( sb.ToString() ); + StringBuilder sb = new StringBuilder(0x400); + sb.Append(string.Format("曲データファイルから譜面情報を転記しました。({0})", path)); + sb.Append("(title=" + c曲リストノード.arスコア[i].譜面情報.タイトル); + sb.Append(", artist=" + c曲リストノード.arスコア[i].譜面情報.アーティスト名); + sb.Append(", comment=" + c曲リストノード.arスコア[i].譜面情報.コメント); + sb.Append(", genre=" + c曲リストノード.arスコア[i].譜面情報.ジャンル); + sb.Append(", preimage=" + c曲リストノード.arスコア[i].譜面情報.Preimage); + sb.Append(", premovie=" + c曲リストノード.arスコア[i].譜面情報.Premovie); + sb.Append(", presound=" + c曲リストノード.arスコア[i].譜面情報.Presound); + sb.Append(", background=" + c曲リストノード.arスコア[i].譜面情報.Backgound); + sb.Append(", lvDr=" + c曲リストノード.arスコア[i].譜面情報.レベル.Drums); + sb.Append(", lvGt=" + c曲リストノード.arスコア[i].譜面情報.レベル.Guitar); + sb.Append(", lvBs=" + c曲リストノード.arスコア[i].譜面情報.レベル.Bass); + sb.Append(", lvHide=" + c曲リストノード.arスコア[i].譜面情報.レベルを非表示にする); + sb.Append(", type=" + c曲リストノード.arスコア[i].譜面情報.曲種別); + sb.Append(", bpm=" + c曲リストノード.arスコア[i].譜面情報.Bpm); + // sb.Append( ", duration=" + c曲リストノード.arスコア[ i ].譜面情報.Duration ); + Trace.TraceInformation(sb.ToString()); } //----------------- #endregion } - catch( Exception exception ) + catch (Exception exception) { - Trace.TraceError( exception.Message ); - c曲リストノード.arスコア[ i ] = null; + Trace.TraceError(exception.Message); + c曲リストノード.arスコア[i] = null; c曲リストノード.nスコア数--; this.n検索されたスコア数--; - Trace.TraceError( "曲データファイルの読み込みに失敗しました。({0})", path ); + Trace.TraceError("曲データファイルの読み込みに失敗しました。({0})", path); } } //----------------- @@ -880,7 +880,7 @@ namespace DTXMania #region [ 対応する .score.ini が存在していれば読み込み、Cスコア.譜面情報 に追加設定する ] //----------------- - this.tScoreIniを読み込んで譜面情報を設定する( c曲リストノード.arスコア[ i ].ファイル情報.ファイルの絶対パス + ".score.ini", ref c曲リストノード.arスコア[ i ] ); + this.tScoreIniを読み込んで譜面情報を設定する(c曲リストノード.arスコア[i].ファイル情報.ファイルの絶対パス + ".score.ini", ref c曲リストノード.arスコア[i]); //----------------- #endregion } @@ -895,76 +895,76 @@ namespace DTXMania public void t曲リストへ後処理を適用する() { listStrBoxDefSkinSubfolderFullName = new List(); - if ( CDTXMania.app.Skin.strBoxDefSkinSubfolders != null ) + if (CDTXMania.app.Skin.strBoxDefSkinSubfolders != null) { - foreach ( string b in CDTXMania.app.Skin.strBoxDefSkinSubfolders ) + foreach (string b in CDTXMania.app.Skin.strBoxDefSkinSubfolders) { - listStrBoxDefSkinSubfolderFullName.Add( b ); + listStrBoxDefSkinSubfolderFullName.Add(b); } } - this.t曲リストへ後処理を適用する( this.list曲ルート ); + this.t曲リストへ後処理を適用する(this.list曲ルート); #region [ skin名で比較して、systemスキンとboxdefスキンに重複があれば、boxdefスキン側を削除する ] - string[] systemSkinNames = CSkin.GetSkinName( CDTXMania.app.Skin.strSystemSkinSubfolders ); - List l = new List( listStrBoxDefSkinSubfolderFullName ); - foreach ( string boxdefSkinSubfolderFullName in l ) + string[] systemSkinNames = CSkin.GetSkinName(CDTXMania.app.Skin.strSystemSkinSubfolders); + List l = new List(listStrBoxDefSkinSubfolderFullName); + foreach (string boxdefSkinSubfolderFullName in l) { - if ( Array.BinarySearch( systemSkinNames, - CSkin.GetSkinName( boxdefSkinSubfolderFullName ), - StringComparer.InvariantCultureIgnoreCase ) >= 0 ) + if (Array.BinarySearch(systemSkinNames, + CSkin.GetSkinName(boxdefSkinSubfolderFullName), + StringComparer.InvariantCultureIgnoreCase) >= 0) { - listStrBoxDefSkinSubfolderFullName.Remove( boxdefSkinSubfolderFullName ); + listStrBoxDefSkinSubfolderFullName.Remove(boxdefSkinSubfolderFullName); } } #endregion string[] ba = listStrBoxDefSkinSubfolderFullName.ToArray(); - Array.Sort( ba ); + Array.Sort(ba); CDTXMania.app.Skin.strBoxDefSkinSubfolders = ba; } - private void t曲リストへ後処理を適用する( List ノードリスト ) + private void t曲リストへ後処理を適用する(List ノードリスト) { #region [ リストに1つ以上の曲があるなら RANDOM BOX を入れる ] //----------------------------- - if( ノードリスト.Count > 0 ) + if (ノードリスト.Count > 0) { C曲リストノード itemRandom = new C曲リストノード(); itemRandom.eノード種別 = C曲リストノード.Eノード種別.RANDOM; itemRandom.strタイトル = "< RANDOM SELECT >"; itemRandom.nスコア数 = 5; - itemRandom.r親ノード = ノードリスト[ 0 ].r親ノード; + itemRandom.r親ノード = ノードリスト[0].r親ノード; - itemRandom.strBreadcrumbs = ( itemRandom.r親ノード == null ) ? - itemRandom.strタイトル : itemRandom.r親ノード.strBreadcrumbs + " > " + itemRandom.strタイトル; + itemRandom.strBreadcrumbs = (itemRandom.r親ノード == null) ? + itemRandom.strタイトル : itemRandom.r親ノード.strBreadcrumbs + " > " + itemRandom.strタイトル; - for( int i = 0; i < 5; i++ ) + for (int i = 0; i < 5; i++) { - itemRandom.arスコア[ i ] = new Cスコア(); - itemRandom.arスコア[ i ].譜面情報.タイトル = string.Format( "< RANDOM SELECT Lv.{0} >", i + 1 ); + itemRandom.arスコア[i] = new Cスコア(); + itemRandom.arスコア[i].譜面情報.タイトル = string.Format("< RANDOM SELECT Lv.{0} >", i + 1); itemRandom.arスコア[i].譜面情報.コメント = (CultureInfo.CurrentCulture.TwoLetterISOLanguageName == "ja") ? string.Format("難易度レベル {0} 付近の曲をランダムに選択します。難易度レベルを持たない曲も選択候補となります。", i + 1) : string.Format("Random select from the songs which has the level about L{0}. Non-leveled songs may also selected.", i + 1); - itemRandom.ar難易度ラベル[ i ] = string.Format( "L{0}", i + 1 ); + itemRandom.ar難易度ラベル[i] = string.Format("L{0}", i + 1); } - ノードリスト.Add( itemRandom ); + ノードリスト.Add(itemRandom); #region [ ログ出力 ] //----------------------------- - if( CDTXMania.app.ConfigIni.bLog曲検索ログ出力 ) + if (CDTXMania.app.ConfigIni.bLog曲検索ログ出力) { - StringBuilder sb = new StringBuilder( 0x100 ); - sb.Append( string.Format( "nID#{0:D3}", itemRandom.nID ) ); - if( itemRandom.r親ノード != null ) + StringBuilder sb = new StringBuilder(0x100); + sb.Append(string.Format("nID#{0:D3}", itemRandom.nID)); + if (itemRandom.r親ノード != null) { - sb.Append( string.Format( "(in#{0:D3}):", itemRandom.r親ノード.nID ) ); + sb.Append(string.Format("(in#{0:D3}):", itemRandom.r親ノード.nID)); } else { - sb.Append( "(onRoot):" ); + sb.Append("(onRoot):"); } - sb.Append( " RANDOM" ); - Trace.TraceInformation( sb.ToString() ); + sb.Append(" RANDOM"); + Trace.TraceInformation(sb.ToString()); } //----------------------------- #endregion @@ -973,13 +973,13 @@ namespace DTXMania #endregion // すべてのノードについて… - foreach( C曲リストノード c曲リストノード in ノードリスト ) + foreach (C曲リストノード c曲リストノード in ノードリスト) { SlowOrSuspendSearchTask(); // #27060 中断要求があったら、解除要求が来るまで待機, #PREMOVIE再生中は検索負荷を落とす #region [ BOXノードなら子リストに < " + itemBack.strタイトル; - itemBack.arスコア[ 0 ] = new Cスコア(); - itemBack.arスコア[ 0 ].ファイル情報.フォルダの絶対パス = ""; - itemBack.arスコア[ 0 ].譜面情報.タイトル = itemBack.strタイトル; - itemBack.arスコア[ 0 ].譜面情報.コメント = + itemBack.arスコア[0] = new Cスコア(); + itemBack.arスコア[0].ファイル情報.フォルダの絶対パス = ""; + itemBack.arスコア[0].譜面情報.タイトル = itemBack.strタイトル; + itemBack.arスコア[0].譜面情報.コメント = (CultureInfo.CurrentCulture.TwoLetterISOLanguageName == "ja") ? "BOX を出ます。" : "Exit from the BOX."; - c曲リストノード.list子リスト.Insert( 0, itemBack ); + c曲リストノード.list子リスト.Insert(0, itemBack); #region [ ログ出力 ] //----------------------------- - if( CDTXMania.app.ConfigIni.bLog曲検索ログ出力 ) + if (CDTXMania.app.ConfigIni.bLog曲検索ログ出力) { - StringBuilder sb = new StringBuilder( 0x100 ); - sb.Append( string.Format( "nID#{0:D3}", itemBack.nID ) ); - if( itemBack.r親ノード != null ) + StringBuilder sb = new StringBuilder(0x100); + sb.Append(string.Format("nID#{0:D3}", itemBack.nID)); + if (itemBack.r親ノード != null) { - sb.Append( string.Format( "(in#{0:D3}):", itemBack.r親ノード.nID ) ); + sb.Append(string.Format("(in#{0:D3}):", itemBack.r親ノード.nID)); } else { - sb.Append( "(onRoot):" ); + sb.Append("(onRoot):"); } - sb.Append( " BACKBOX" ); - Trace.TraceInformation( sb.ToString() ); + sb.Append(" BACKBOX"); + Trace.TraceInformation(sb.ToString()); } //----------------------------- #endregion - this.t曲リストへ後処理を適用する( c曲リストノード.list子リスト ); + this.t曲リストへ後処理を適用する(c曲リストノード.list子リスト); continue; } //----------------------------- @@ -1035,16 +1035,16 @@ namespace DTXMania #region [ ノードにタイトルがないなら、最初に見つけたスコアのタイトルを設定する ] //----------------------------- - if( string.IsNullOrEmpty( c曲リストノード.strタイトル ) ) + if (string.IsNullOrEmpty(c曲リストノード.strタイトル)) { - for( int j = 0; j < 5; j++ ) + for (int j = 0; j < 5; j++) { - if( ( c曲リストノード.arスコア[ j ] != null ) && !string.IsNullOrEmpty( c曲リストノード.arスコア[ j ].譜面情報.タイトル ) ) + if ((c曲リストノード.arスコア[j] != null) && !string.IsNullOrEmpty(c曲リストノード.arスコア[j].譜面情報.タイトル)) { - c曲リストノード.strタイトル = c曲リストノード.arスコア[ j ].譜面情報.タイトル; + c曲リストノード.strタイトル = c曲リストノード.arスコア[j].譜面情報.タイトル; - if( CDTXMania.app.ConfigIni.bLog曲検索ログ出力 ) - Trace.TraceInformation( "タイトルを設定しました。(nID#{0:D3}, title={1})", c曲リストノード.nID, c曲リストノード.strタイトル ); + if (CDTXMania.app.ConfigIni.bLog曲検索ログ出力) + Trace.TraceInformation("タイトルを設定しました。(nID#{0:D3}, title={1})", c曲リストノード.nID, c曲リストノード.strタイトル); break; } @@ -1056,7 +1056,7 @@ namespace DTXMania #region [ ノードをソートする ] //----------------------------- - this.t曲リストのソート1_絶対パス順( ノードリスト ); + this.t曲リストのソート1_絶対パス順(ノードリスト); //----------------------------- #endregion } @@ -1064,24 +1064,24 @@ namespace DTXMania #endregion #region [ スコアキャッシュをSongsDBに出力する ] //----------------- - public void tスコアキャッシュをSongsDBに出力する( string SongsDBファイル名 ) + public void tスコアキャッシュをSongsDBに出力する(string SongsDBファイル名) { this.nSongsDBへ出力できたスコア数 = 0; try { - BinaryWriter bw = new BinaryWriter( new FileStream( SongsDBファイル名, FileMode.Create, FileAccess.Write ) ); - bw.Write( SONGSDB_VERSION ); - this.tSongsDBにリストを1つ出力する( bw, this.list曲ルート ); + BinaryWriter bw = new BinaryWriter(new FileStream(SongsDBファイル名, FileMode.Create, FileAccess.Write)); + bw.Write(SONGSDB_VERSION); + this.tSongsDBにリストを1つ出力する(bw, this.list曲ルート); bw.Close(); } catch { - Trace.TraceError( "songs.dbの出力に失敗しました。" ); + Trace.TraceError("songs.dbの出力に失敗しました。"); } } - private void tSongsDBにノードを1つ出力する( BinaryWriter bw, C曲リストノード node ) + private void tSongsDBにノードを1つ出力する(BinaryWriter bw, C曲リストノード node) { - for( int i = 0; i < 5; i++ ) + for (int i = 0; i < 5; i++) { // ここではsuspendに応じないようにしておく(深い意味はない。ファイルの書き込みオープン状態を長時間維持したくないだけ) //if ( this.bIsSuspending ) // #27060 中断要求があったら、解除要求が来るまで待機 @@ -1089,98 +1089,98 @@ namespace DTXMania // autoReset.WaitOne(); //} - if( node.arスコア[ i ] != null ) + if (node.arスコア[i] != null) { - bw.Write( node.arスコア[ i ].ファイル情報.ファイルの絶対パス ); - bw.Write( node.arスコア[ i ].ファイル情報.フォルダの絶対パス ); - bw.Write( node.arスコア[ i ].ファイル情報.最終更新日時.Ticks ); - bw.Write( node.arスコア[ i ].ファイル情報.ファイルサイズ ); - bw.Write( node.arスコア[ i ].ScoreIni情報.最終更新日時.Ticks ); - bw.Write( node.arスコア[ i ].ScoreIni情報.ファイルサイズ ); - bw.Write( node.arスコア[ i ].譜面情報.タイトル ); - bw.Write( node.arスコア[ i ].譜面情報.アーティスト名 ); - bw.Write( node.arスコア[ i ].譜面情報.コメント ); - bw.Write( node.arスコア[ i ].譜面情報.ジャンル ); - bw.Write( node.arスコア[ i ].譜面情報.Preimage ); - bw.Write( node.arスコア[ i ].譜面情報.Premovie ); - bw.Write( node.arスコア[ i ].譜面情報.Presound ); - bw.Write( node.arスコア[ i ].譜面情報.Backgound ); - bw.Write( node.arスコア[ i ].譜面情報.レベル.Drums ); - bw.Write( node.arスコア[ i ].譜面情報.レベル.Guitar ); - bw.Write( node.arスコア[ i ].譜面情報.レベル.Bass ); - bw.Write( node.arスコア[ i ].譜面情報.最大ランク.Drums ); - bw.Write( node.arスコア[ i ].譜面情報.最大ランク.Guitar ); - bw.Write( node.arスコア[ i ].譜面情報.最大ランク.Bass ); - bw.Write( node.arスコア[ i ].譜面情報.最大スキル.Drums ); - bw.Write( node.arスコア[ i ].譜面情報.最大スキル.Guitar ); - bw.Write( node.arスコア[ i ].譜面情報.最大スキル.Bass ); - bw.Write( node.arスコア[ i ].譜面情報.フルコンボ.Drums ); - bw.Write( node.arスコア[ i ].譜面情報.フルコンボ.Guitar ); - bw.Write( node.arスコア[ i ].譜面情報.フルコンボ.Bass ); - bw.Write( node.arスコア[ i ].譜面情報.演奏回数.Drums ); - bw.Write( node.arスコア[ i ].譜面情報.演奏回数.Guitar ); - bw.Write( node.arスコア[ i ].譜面情報.演奏回数.Bass ); - bw.Write( node.arスコア[ i ].譜面情報.演奏履歴.行1 ); - bw.Write( node.arスコア[ i ].譜面情報.演奏履歴.行2 ); - bw.Write( node.arスコア[ i ].譜面情報.演奏履歴.行3 ); - bw.Write( node.arスコア[ i ].譜面情報.演奏履歴.行4 ); - bw.Write( node.arスコア[ i ].譜面情報.演奏履歴.行5 ); - bw.Write( node.arスコア[ i ].譜面情報.レベルを非表示にする ); - bw.Write( (int) node.arスコア[ i ].譜面情報.曲種別 ); - bw.Write( node.arスコア[ i ].譜面情報.Bpm ); - bw.Write( node.arスコア[ i ].譜面情報.Duration ); + bw.Write(node.arスコア[i].ファイル情報.ファイルの絶対パス); + bw.Write(node.arスコア[i].ファイル情報.フォルダの絶対パス); + bw.Write(node.arスコア[i].ファイル情報.最終更新日時.Ticks); + bw.Write(node.arスコア[i].ファイル情報.ファイルサイズ); + bw.Write(node.arスコア[i].ScoreIni情報.最終更新日時.Ticks); + bw.Write(node.arスコア[i].ScoreIni情報.ファイルサイズ); + bw.Write(node.arスコア[i].譜面情報.タイトル); + bw.Write(node.arスコア[i].譜面情報.アーティスト名); + bw.Write(node.arスコア[i].譜面情報.コメント); + bw.Write(node.arスコア[i].譜面情報.ジャンル); + bw.Write(node.arスコア[i].譜面情報.Preimage); + bw.Write(node.arスコア[i].譜面情報.Premovie); + bw.Write(node.arスコア[i].譜面情報.Presound); + bw.Write(node.arスコア[i].譜面情報.Backgound); + bw.Write(node.arスコア[i].譜面情報.レベル.Drums); + bw.Write(node.arスコア[i].譜面情報.レベル.Guitar); + bw.Write(node.arスコア[i].譜面情報.レベル.Bass); + bw.Write(node.arスコア[i].譜面情報.最大ランク.Drums); + bw.Write(node.arスコア[i].譜面情報.最大ランク.Guitar); + bw.Write(node.arスコア[i].譜面情報.最大ランク.Bass); + bw.Write(node.arスコア[i].譜面情報.最大スキル.Drums); + bw.Write(node.arスコア[i].譜面情報.最大スキル.Guitar); + bw.Write(node.arスコア[i].譜面情報.最大スキル.Bass); + bw.Write(node.arスコア[i].譜面情報.フルコンボ.Drums); + bw.Write(node.arスコア[i].譜面情報.フルコンボ.Guitar); + bw.Write(node.arスコア[i].譜面情報.フルコンボ.Bass); + bw.Write(node.arスコア[i].譜面情報.演奏回数.Drums); + bw.Write(node.arスコア[i].譜面情報.演奏回数.Guitar); + bw.Write(node.arスコア[i].譜面情報.演奏回数.Bass); + bw.Write(node.arスコア[i].譜面情報.演奏履歴.行1); + bw.Write(node.arスコア[i].譜面情報.演奏履歴.行2); + bw.Write(node.arスコア[i].譜面情報.演奏履歴.行3); + bw.Write(node.arスコア[i].譜面情報.演奏履歴.行4); + bw.Write(node.arスコア[i].譜面情報.演奏履歴.行5); + bw.Write(node.arスコア[i].譜面情報.レベルを非表示にする); + bw.Write((int)node.arスコア[i].譜面情報.曲種別); + bw.Write(node.arスコア[i].譜面情報.Bpm); + bw.Write(node.arスコア[i].譜面情報.Duration); this.nSongsDBへ出力できたスコア数++; } } } - private void tSongsDBにリストを1つ出力する( BinaryWriter bw, List list ) + private void tSongsDBにリストを1つ出力する(BinaryWriter bw, List list) { - foreach( C曲リストノード c曲リストノード in list ) + foreach (C曲リストノード c曲リストノード in list) { - if( ( c曲リストノード.eノード種別 == C曲リストノード.Eノード種別.SCORE ) - || ( c曲リストノード.eノード種別 == C曲リストノード.Eノード種別.SCORE_MIDI ) ) + if ((c曲リストノード.eノード種別 == C曲リストノード.Eノード種別.SCORE) + || (c曲リストノード.eノード種別 == C曲リストノード.Eノード種別.SCORE_MIDI)) { - this.tSongsDBにノードを1つ出力する( bw, c曲リストノード ); + this.tSongsDBにノードを1つ出力する(bw, c曲リストノード); } - if( c曲リストノード.list子リスト != null ) + if (c曲リストノード.list子リスト != null) { - this.tSongsDBにリストを1つ出力する( bw, c曲リストノード.list子リスト ); + this.tSongsDBにリストを1つ出力する(bw, c曲リストノード.list子リスト); } } } //----------------- #endregion - + #region [ 曲リストソート ] //----------------- - public void t曲リストのソート1_絶対パス順( List ノードリスト ) + public void t曲リストのソート1_絶対パス順(List ノードリスト) { - ノードリスト.Sort( delegate( C曲リストノード n1, C曲リストノード n2 ) + ノードリスト.Sort(delegate(C曲リストノード n1, C曲リストノード n2) { #region [ 共通処理 ] - if ( n1 == n2 ) + if (n1 == n2) { return 0; } - int num = this.t比較0_共通( n1, n2 ); - if( num != 0 ) + int num = this.t比較0_共通(n1, n2); + if (num != 0) { return num; } - if( ( n1.eノード種別 == C曲リストノード.Eノード種別.BOX ) && ( n2.eノード種別 == C曲リストノード.Eノード種別.BOX ) ) + if ((n1.eノード種別 == C曲リストノード.Eノード種別.BOX) && (n2.eノード種別 == C曲リストノード.Eノード種別.BOX)) { - return n1.arスコア[ 0 ].ファイル情報.フォルダの絶対パス.CompareTo( n2.arスコア[ 0 ].ファイル情報.フォルダの絶対パス ); + return n1.arスコア[0].ファイル情報.フォルダの絶対パス.CompareTo(n2.arスコア[0].ファイル情報.フォルダの絶対パス); } #endregion string str = ""; - if( string.IsNullOrEmpty( n1.pathSetDefの絶対パス ) ) + if (string.IsNullOrEmpty(n1.pathSetDefの絶対パス)) { - for( int i = 0; i < 5; i++ ) + for (int i = 0; i < 5; i++) { - if( n1.arスコア[ i ] != null ) + if (n1.arスコア[i] != null) { - str = n1.arスコア[ i ].ファイル情報.ファイルの絶対パス; - if( str == null ) + str = n1.arスコア[i].ファイル情報.ファイルの絶対パス; + if (str == null) { str = ""; } @@ -1190,17 +1190,17 @@ namespace DTXMania } else { - str = n1.pathSetDefの絶対パス + n1.SetDefのブロック番号.ToString( "00" ); + str = n1.pathSetDefの絶対パス + n1.SetDefのブロック番号.ToString("00"); } string strB = ""; - if( string.IsNullOrEmpty( n2.pathSetDefの絶対パス ) ) + if (string.IsNullOrEmpty(n2.pathSetDefの絶対パス)) { - for( int j = 0; j < 5; j++ ) + for (int j = 0; j < 5; j++) { - if( n2.arスコア[ j ] != null ) + if (n2.arスコア[j] != null) { - strB = n2.arスコア[ j ].ファイル情報.ファイルの絶対パス; - if( strB == null ) + strB = n2.arスコア[j].ファイル情報.ファイルの絶対パス; + if (strB == null) { strB = ""; } @@ -1210,40 +1210,40 @@ namespace DTXMania } else { - strB = n2.pathSetDefの絶対パス + n2.SetDefのブロック番号.ToString( "00" ); + strB = n2.pathSetDefの絶対パス + n2.SetDefのブロック番号.ToString("00"); } - return str.CompareTo( strB ); - } ); - foreach( C曲リストノード c曲リストノード in ノードリスト ) + return str.CompareTo(strB); + }); + foreach (C曲リストノード c曲リストノード in ノードリスト) { - if( ( c曲リストノード.list子リスト != null ) && ( c曲リストノード.list子リスト.Count > 1 ) ) + if ((c曲リストノード.list子リスト != null) && (c曲リストノード.list子リスト.Count > 1)) { - this.t曲リストのソート1_絶対パス順( c曲リストノード.list子リスト ); + this.t曲リストのソート1_絶対パス順(c曲リストノード.list子リスト); } } } - public void t曲リストのソート2_タイトル順( List ノードリスト, E楽器パート part, int order, params object[] p ) + public void t曲リストのソート2_タイトル順(List ノードリスト, E楽器パート part, int order, params object[] p) { - ノードリスト.Sort( delegate( C曲リストノード n1, C曲リストノード n2 ) + ノードリスト.Sort(delegate(C曲リストノード n1, C曲リストノード n2) { - if( n1 == n2 ) + if (n1 == n2) { return 0; } - int num = this.t比較0_共通( n1, n2 ); - if( num != 0 ) + int num = this.t比較0_共通(n1, n2); + if (num != 0) { return order * num; } - return order * n1.strタイトル.CompareTo( n2.strタイトル ); - } ); -// foreach( C曲リストノード c曲リストノード in ノードリスト ) -// { -// if( ( c曲リストノード.list子リスト != null ) && ( c曲リストノード.list子リスト.Count > 1 ) ) -// { -// this.t曲リストのソート2_タイトル順( c曲リストノード.list子リスト, part, order ); -// } -// } + return order * n1.strタイトル.CompareTo(n2.strタイトル); + }); + // foreach( C曲リストノード c曲リストノード in ノードリスト ) + // { + // if( ( c曲リストノード.list子リスト != null ) && ( c曲リストノード.list子リスト.Count > 1 ) ) + // { + // this.t曲リストのソート2_タイトル順( c曲リストノード.list子リスト, part, order ); + // } + // } } /// /// @@ -1251,325 +1251,325 @@ namespace DTXMania /// /// /// 1=Ascend -1=Descend - public void t曲リストのソート3_演奏回数の多い順( List ノードリスト, E楽器パート part, int order, params object[] p ) + public void t曲リストのソート3_演奏回数の多い順(List ノードリスト, E楽器パート part, int order, params object[] p) { order = -order; - int nL12345 = (int) p[ 0 ]; - if ( part != E楽器パート.UNKNOWN ) + int nL12345 = (int)p[0]; + if (part != E楽器パート.UNKNOWN) { - ノードリスト.Sort( delegate( C曲リストノード n1, C曲リストノード n2 ) + ノードリスト.Sort(delegate(C曲リストノード n1, C曲リストノード n2) { #region [ 共通処理 ] - if ( n1 == n2 ) + if (n1 == n2) { return 0; } - int num = this.t比較0_共通( n1, n2 ); - if( num != 0 ) + int num = this.t比較0_共通(n1, n2); + if (num != 0) { return order * num; } - if( ( n1.eノード種別 == C曲リストノード.Eノード種別.BOX ) && ( n2.eノード種別 == C曲リストノード.Eノード種別.BOX ) ) + if ((n1.eノード種別 == C曲リストノード.Eノード種別.BOX) && (n2.eノード種別 == C曲リストノード.Eノード種別.BOX)) { - return order * n1.arスコア[ 0 ].ファイル情報.フォルダの絶対パス.CompareTo( n2.arスコア[ 0 ].ファイル情報.フォルダの絶対パス ); + return order * n1.arスコア[0].ファイル情報.フォルダの絶対パス.CompareTo(n2.arスコア[0].ファイル情報.フォルダの絶対パス); } #endregion int nSumPlayCountN1 = 0, nSumPlayCountN2 = 0; -// for( int i = 0; i < 5; i++ ) -// { - if( n1.arスコア[ nL12345 ] != null ) - { - nSumPlayCountN1 += n1.arスコア[ nL12345 ].譜面情報.演奏回数[ (int) part ]; - } - if( n2.arスコア[ nL12345 ] != null ) - { - nSumPlayCountN2 += n2.arスコア[ nL12345 ].譜面情報.演奏回数[ (int) part ]; - } -// } + // for( int i = 0; i < 5; i++ ) + // { + if (n1.arスコア[nL12345] != null) + { + nSumPlayCountN1 += n1.arスコア[nL12345].譜面情報.演奏回数[(int)part]; + } + if (n2.arスコア[nL12345] != null) + { + nSumPlayCountN2 += n2.arスコア[nL12345].譜面情報.演奏回数[(int)part]; + } + // } num = nSumPlayCountN2 - nSumPlayCountN1; - if( num != 0 ) + if (num != 0) { return order * num; } - return order * n1.strタイトル.CompareTo( n2.strタイトル ); - } ); - foreach ( C曲リストノード c曲リストノード in ノードリスト ) + return order * n1.strタイトル.CompareTo(n2.strタイトル); + }); + foreach (C曲リストノード c曲リストノード in ノードリスト) { int nSumPlayCountN1 = 0; -// for ( int i = 0; i < 5; i++ ) -// { - if ( c曲リストノード.arスコア[ nL12345 ] != null ) - { - nSumPlayCountN1 += c曲リストノード.arスコア[ nL12345 ].譜面情報.演奏回数[ (int) part ]; - } -// } -// Debug.WriteLine( nSumPlayCountN1 + ":" + c曲リストノード.strタイトル ); + // for ( int i = 0; i < 5; i++ ) + // { + if (c曲リストノード.arスコア[nL12345] != null) + { + nSumPlayCountN1 += c曲リストノード.arスコア[nL12345].譜面情報.演奏回数[(int)part]; + } + // } + // Debug.WriteLine( nSumPlayCountN1 + ":" + c曲リストノード.strタイトル ); } -// foreach( C曲リストノード c曲リストノード in ノードリスト ) -// { -// if( ( c曲リストノード.list子リスト != null ) && ( c曲リストノード.list子リスト.Count > 1 ) ) -// { -// this.t曲リストのソート3_演奏回数の多い順( c曲リストノード.list子リスト, part ); -// } -// } + // foreach( C曲リストノード c曲リストノード in ノードリスト ) + // { + // if( ( c曲リストノード.list子リスト != null ) && ( c曲リストノード.list子リスト.Count > 1 ) ) + // { + // this.t曲リストのソート3_演奏回数の多い順( c曲リストノード.list子リスト, part ); + // } + // } } } - public void t曲リストのソート4_LEVEL順( List ノードリスト, E楽器パート part, int order, params object[] p ) + public void t曲リストのソート4_LEVEL順(List ノードリスト, E楽器パート part, int order, params object[] p) { order = -order; - int nL12345 = (int)p[ 0 ]; - if ( part != E楽器パート.UNKNOWN ) + int nL12345 = (int)p[0]; + if (part != E楽器パート.UNKNOWN) { - ノードリスト.Sort( delegate( C曲リストノード n1, C曲リストノード n2 ) + ノードリスト.Sort(delegate(C曲リストノード n1, C曲リストノード n2) { #region [ 共通処理 ] - if ( n1 == n2 ) + if (n1 == n2) { return 0; } - int num = this.t比較0_共通( n1, n2 ); - if ( num != 0 ) + int num = this.t比較0_共通(n1, n2); + if (num != 0) { return order * num; } - if ( ( n1.eノード種別 == C曲リストノード.Eノード種別.BOX ) && ( n2.eノード種別 == C曲リストノード.Eノード種別.BOX ) ) + if ((n1.eノード種別 == C曲リストノード.Eノード種別.BOX) && (n2.eノード種別 == C曲リストノード.Eノード種別.BOX)) { - return order * n1.arスコア[ 0 ].ファイル情報.フォルダの絶対パス.CompareTo( n2.arスコア[ 0 ].ファイル情報.フォルダの絶対パス ); + return order * n1.arスコア[0].ファイル情報.フォルダの絶対パス.CompareTo(n2.arスコア[0].ファイル情報.フォルダの絶対パス); } #endregion int nSumPlayCountN1 = 0, nSumPlayCountN2 = 0; - if ( n1.arスコア[ nL12345 ] != null ) + if (n1.arスコア[nL12345] != null) { - nSumPlayCountN1 = n1.arスコア[ nL12345 ].譜面情報.レベル[ (int) part ]; + nSumPlayCountN1 = n1.arスコア[nL12345].譜面情報.レベル[(int)part]; } - if ( n2.arスコア[ nL12345 ] != null ) + if (n2.arスコア[nL12345] != null) { - nSumPlayCountN2 = n2.arスコア[ nL12345 ].譜面情報.レベル[ (int) part ]; + nSumPlayCountN2 = n2.arスコア[nL12345].譜面情報.レベル[(int)part]; } num = nSumPlayCountN2 - nSumPlayCountN1; - if ( num != 0 ) + if (num != 0) { return order * num; } - return order * n1.strタイトル.CompareTo( n2.strタイトル ); - } ); - foreach ( C曲リストノード c曲リストノード in ノードリスト ) + return order * n1.strタイトル.CompareTo(n2.strタイトル); + }); + foreach (C曲リストノード c曲リストノード in ノードリスト) { int nSumPlayCountN1 = 0; - if ( c曲リストノード.arスコア[ nL12345 ] != null ) + if (c曲リストノード.arスコア[nL12345] != null) { - nSumPlayCountN1 = c曲リストノード.arスコア[ nL12345 ].譜面情報.レベル[ (int) part ]; + nSumPlayCountN1 = c曲リストノード.arスコア[nL12345].譜面情報.レベル[(int)part]; } -// Debug.WriteLine( nSumPlayCountN1 + ":" + c曲リストノード.strタイトル ); + // Debug.WriteLine( nSumPlayCountN1 + ":" + c曲リストノード.strタイトル ); } } } - public void t曲リストのソート5_BestRank順( List ノードリスト, E楽器パート part, int order, params object[] p ) + public void t曲リストのソート5_BestRank順(List ノードリスト, E楽器パート part, int order, params object[] p) { order = -order; - int nL12345 = (int) p[ 0 ]; - if ( part != E楽器パート.UNKNOWN ) + int nL12345 = (int)p[0]; + if (part != E楽器パート.UNKNOWN) { - ノードリスト.Sort( delegate( C曲リストノード n1, C曲リストノード n2 ) + ノードリスト.Sort(delegate(C曲リストノード n1, C曲リストノード n2) { #region [ 共通処理 ] - if ( n1 == n2 ) + if (n1 == n2) { return 0; } - int num = this.t比較0_共通( n1, n2 ); - if ( num != 0 ) + int num = this.t比較0_共通(n1, n2); + if (num != 0) { return order * num; } - if ( ( n1.eノード種別 == C曲リストノード.Eノード種別.BOX ) && ( n2.eノード種別 == C曲リストノード.Eノード種別.BOX ) ) + if ((n1.eノード種別 == C曲リストノード.Eノード種別.BOX) && (n2.eノード種別 == C曲リストノード.Eノード種別.BOX)) { - return order * n1.arスコア[ 0 ].ファイル情報.フォルダの絶対パス.CompareTo( n2.arスコア[ 0 ].ファイル情報.フォルダの絶対パス ); + return order * n1.arスコア[0].ファイル情報.フォルダの絶対パス.CompareTo(n2.arスコア[0].ファイル情報.フォルダの絶対パス); } #endregion int nSumPlayCountN1 = 0, nSumPlayCountN2 = 0; bool isFullCombo1 = false, isFullCombo2 = false; - if ( n1.arスコア[ nL12345 ] != null ) + if (n1.arスコア[nL12345] != null) { - isFullCombo1 = n1.arスコア[ nL12345 ].譜面情報.フルコンボ[ (int) part ]; - nSumPlayCountN1 = n1.arスコア[ nL12345 ].譜面情報.最大ランク[ (int) part ]; + isFullCombo1 = n1.arスコア[nL12345].譜面情報.フルコンボ[(int)part]; + nSumPlayCountN1 = n1.arスコア[nL12345].譜面情報.最大ランク[(int)part]; } - if ( n2.arスコア[ nL12345 ] != null ) + if (n2.arスコア[nL12345] != null) { - isFullCombo2 = n2.arスコア[ nL12345 ].譜面情報.フルコンボ[ (int) part ]; - nSumPlayCountN2 = n2.arスコア[ nL12345 ].譜面情報.最大ランク[ (int) part ]; + isFullCombo2 = n2.arスコア[nL12345].譜面情報.フルコンボ[(int)part]; + nSumPlayCountN2 = n2.arスコア[nL12345].譜面情報.最大ランク[(int)part]; } - if ( isFullCombo1 ^ isFullCombo2 ) + if (isFullCombo1 ^ isFullCombo2) { - if ( isFullCombo1 ) return order; else return -order; + if (isFullCombo1) return order; else return -order; } num = nSumPlayCountN2 - nSumPlayCountN1; - if ( num != 0 ) + if (num != 0) { return order * num; } - return order * n1.strタイトル.CompareTo( n2.strタイトル ); - } ); - foreach ( C曲リストノード c曲リストノード in ノードリスト ) + return order * n1.strタイトル.CompareTo(n2.strタイトル); + }); + foreach (C曲リストノード c曲リストノード in ノードリスト) { int nSumPlayCountN1 = 0; - if ( c曲リストノード.arスコア[ nL12345 ] != null ) + if (c曲リストノード.arスコア[nL12345] != null) { - nSumPlayCountN1 = c曲リストノード.arスコア[ nL12345 ].譜面情報.最大ランク[ (int) part ]; + nSumPlayCountN1 = c曲リストノード.arスコア[nL12345].譜面情報.最大ランク[(int)part]; } -// Debug.WriteLine( nSumPlayCountN1 + ":" + c曲リストノード.strタイトル ); + // Debug.WriteLine( nSumPlayCountN1 + ":" + c曲リストノード.strタイトル ); } } } - public void t曲リストのソート6_SkillPoint順( List ノードリスト, E楽器パート part, int order, params object[] p ) + public void t曲リストのソート6_SkillPoint順(List ノードリスト, E楽器パート part, int order, params object[] p) { order = -order; - int nL12345 = (int) p[ 0 ]; - if ( part != E楽器パート.UNKNOWN ) + int nL12345 = (int)p[0]; + if (part != E楽器パート.UNKNOWN) { - ノードリスト.Sort( delegate( C曲リストノード n1, C曲リストノード n2 ) + ノードリスト.Sort(delegate(C曲リストノード n1, C曲リストノード n2) { #region [ 共通処理 ] - if ( n1 == n2 ) + if (n1 == n2) { return 0; } - int num = this.t比較0_共通( n1, n2 ); - if ( num != 0 ) + int num = this.t比較0_共通(n1, n2); + if (num != 0) { return order * num; } - if ( ( n1.eノード種別 == C曲リストノード.Eノード種別.BOX ) && ( n2.eノード種別 == C曲リストノード.Eノード種別.BOX ) ) + if ((n1.eノード種別 == C曲リストノード.Eノード種別.BOX) && (n2.eノード種別 == C曲リストノード.Eノード種別.BOX)) { - return order * n1.arスコア[ 0 ].ファイル情報.フォルダの絶対パス.CompareTo( n2.arスコア[ 0 ].ファイル情報.フォルダの絶対パス ); + return order * n1.arスコア[0].ファイル情報.フォルダの絶対パス.CompareTo(n2.arスコア[0].ファイル情報.フォルダの絶対パス); } #endregion double nSumPlayCountN1 = 0, nSumPlayCountN2 = 0; - if ( n1.arスコア[ nL12345 ] != null ) + if (n1.arスコア[nL12345] != null) { - nSumPlayCountN1 = n1.arスコア[ nL12345 ].譜面情報.最大スキル[ (int) part ]; + nSumPlayCountN1 = n1.arスコア[nL12345].譜面情報.最大スキル[(int)part]; } - if ( n2.arスコア[ nL12345 ] != null ) + if (n2.arスコア[nL12345] != null) { - nSumPlayCountN2 = n2.arスコア[ nL12345 ].譜面情報.最大スキル[ (int) part ]; + nSumPlayCountN2 = n2.arスコア[nL12345].譜面情報.最大スキル[(int)part]; } double d = nSumPlayCountN2 - nSumPlayCountN1; - if ( d != 0 ) + if (d != 0) { return order * System.Math.Sign(d); } - return order * n1.strタイトル.CompareTo( n2.strタイトル ); - } ); - foreach ( C曲リストノード c曲リストノード in ノードリスト ) + return order * n1.strタイトル.CompareTo(n2.strタイトル); + }); + foreach (C曲リストノード c曲リストノード in ノードリスト) { double nSumPlayCountN1 = 0; - if ( c曲リストノード.arスコア[ nL12345 ] != null ) + if (c曲リストノード.arスコア[nL12345] != null) { - nSumPlayCountN1 = c曲リストノード.arスコア[ nL12345 ].譜面情報.最大スキル[ (int) part ]; + nSumPlayCountN1 = c曲リストノード.arスコア[nL12345].譜面情報.最大スキル[(int)part]; } -// Debug.WriteLine( nSumPlayCountN1 + ":" + c曲リストノード.strタイトル ); + // Debug.WriteLine( nSumPlayCountN1 + ":" + c曲リストノード.strタイトル ); } } } - public void t曲リストのソート7_更新日時順( List ノードリスト, E楽器パート part, int order, params object[] p ) + public void t曲リストのソート7_更新日時順(List ノードリスト, E楽器パート part, int order, params object[] p) { - int nL12345 = (int) p[ 0 ]; - if ( part != E楽器パート.UNKNOWN ) + int nL12345 = (int)p[0]; + if (part != E楽器パート.UNKNOWN) { - ノードリスト.Sort( delegate( C曲リストノード n1, C曲リストノード n2 ) + ノードリスト.Sort(delegate(C曲リストノード n1, C曲リストノード n2) { #region [ 共通処理 ] - if ( n1 == n2 ) + if (n1 == n2) { return 0; } - int num = this.t比較0_共通( n1, n2 ); - if ( num != 0 ) + int num = this.t比較0_共通(n1, n2); + if (num != 0) { return order * num; } - if ( ( n1.eノード種別 == C曲リストノード.Eノード種別.BOX ) && ( n2.eノード種別 == C曲リストノード.Eノード種別.BOX ) ) + if ((n1.eノード種別 == C曲リストノード.Eノード種別.BOX) && (n2.eノード種別 == C曲リストノード.Eノード種別.BOX)) { - return order * n1.arスコア[ 0 ].ファイル情報.フォルダの絶対パス.CompareTo( n2.arスコア[ 0 ].ファイル情報.フォルダの絶対パス ); + return order * n1.arスコア[0].ファイル情報.フォルダの絶対パス.CompareTo(n2.arスコア[0].ファイル情報.フォルダの絶対パス); } #endregion DateTime nSumPlayCountN1 = DateTime.Parse("0001/01/01 12:00:01.000"); DateTime nSumPlayCountN2 = DateTime.Parse("0001/01/01 12:00:01.000"); - if ( n1.arスコア[ nL12345 ] != null ) + if (n1.arスコア[nL12345] != null) { - nSumPlayCountN1 = n1.arスコア[ nL12345 ].ファイル情報.最終更新日時; + nSumPlayCountN1 = n1.arスコア[nL12345].ファイル情報.最終更新日時; } - if ( n2.arスコア[ nL12345 ] != null ) + if (n2.arスコア[nL12345] != null) { - nSumPlayCountN2 = n2.arスコア[ nL12345 ].ファイル情報.最終更新日時; + nSumPlayCountN2 = n2.arスコア[nL12345].ファイル情報.最終更新日時; } int d = nSumPlayCountN1.CompareTo(nSumPlayCountN2); - if ( d != 0 ) + if (d != 0) { - return order * System.Math.Sign( d ); + return order * System.Math.Sign(d); } - return order * n1.strタイトル.CompareTo( n2.strタイトル ); - } ); - foreach ( C曲リストノード c曲リストノード in ノードリスト ) + return order * n1.strタイトル.CompareTo(n2.strタイトル); + }); + foreach (C曲リストノード c曲リストノード in ノードリスト) { - DateTime nSumPlayCountN1 = DateTime.Parse( "0001/01/01 12:00:01.000" ); - if ( c曲リストノード.arスコア[ nL12345 ] != null ) + DateTime nSumPlayCountN1 = DateTime.Parse("0001/01/01 12:00:01.000"); + if (c曲リストノード.arスコア[nL12345] != null) { - nSumPlayCountN1 = c曲リストノード.arスコア[ nL12345 ].ファイル情報.最終更新日時; + nSumPlayCountN1 = c曲リストノード.arスコア[nL12345].ファイル情報.最終更新日時; } -// Debug.WriteLine( nSumPlayCountN1 + ":" + c曲リストノード.strタイトル ); + // Debug.WriteLine( nSumPlayCountN1 + ":" + c曲リストノード.strタイトル ); } } } - public void t曲リストのソート8_アーティスト名順( List ノードリスト, E楽器パート part, int order, params object[] p ) + public void t曲リストのソート8_アーティスト名順(List ノードリスト, E楽器パート part, int order, params object[] p) { - int nL12345 = (int) p[ 0 ]; - ノードリスト.Sort( delegate( C曲リストノード n1, C曲リストノード n2 ) + int nL12345 = (int)p[0]; + ノードリスト.Sort(delegate(C曲リストノード n1, C曲リストノード n2) { #region [ 共通処理 ] - if ( n1 == n2 ) + if (n1 == n2) { return 0; } - int num = this.t比較0_共通( n1, n2 ); - if ( num != 0 ) + int num = this.t比較0_共通(n1, n2); + if (num != 0) { - return order * System.Math.Sign( num ); + return order * System.Math.Sign(num); } #endregion string strAuthorN1 = ""; string strAuthorN2 = ""; int nL12345補正後1 = nL12345; int nL12345補正後2 = nL12345; - if ( n1.arスコア[ nL12345 ] == null ) + if (n1.arスコア[nL12345] == null) { - nL12345補正後1 = n現在のアンカ難易度レベルに最も近い難易度レベルを返す( n1, nL12345 ); + nL12345補正後1 = n現在のアンカ難易度レベルに最も近い難易度レベルを返す(n1, nL12345); } - if ( n1.arスコア[ nL12345補正後1 ] != null ) + if (n1.arスコア[nL12345補正後1] != null) { - strAuthorN1 = n1.arスコア[ nL12345補正後1 ].譜面情報.アーティスト名; + strAuthorN1 = n1.arスコア[nL12345補正後1].譜面情報.アーティスト名; } - if ( n2.arスコア[ nL12345 ] == null ) + if (n2.arスコア[nL12345] == null) { - nL12345補正後2 = n現在のアンカ難易度レベルに最も近い難易度レベルを返す( n2, nL12345 ); + nL12345補正後2 = n現在のアンカ難易度レベルに最も近い難易度レベルを返す(n2, nL12345); } - if ( n2.arスコア[ nL12345補正後2 ] != null ) + if (n2.arスコア[nL12345補正後2] != null) { - strAuthorN2 = n2.arスコア[ nL12345補正後2 ].譜面情報.アーティスト名; + strAuthorN2 = n2.arスコア[nL12345補正後2].譜面情報.アーティスト名; } - return order * strAuthorN1.CompareTo( strAuthorN2 ); - } ); + return order * strAuthorN1.CompareTo(strAuthorN2); + }); #region [ デバッグ用 ] - foreach ( C曲リストノード c曲リストノード in ノードリスト ) + foreach (C曲リストノード c曲リストノード in ノードリスト) { string s = ""; - if ( c曲リストノード.arスコア[ nL12345 ] != null ) + if (c曲リストノード.arスコア[nL12345] != null) { - s = c曲リストノード.arスコア[ nL12345 ].譜面情報.アーティスト名; + s = c曲リストノード.arスコア[nL12345].譜面情報.アーティスト名; } -//Debug.WriteLine( s + ":" + c曲リストノード.strタイトル ); + //Debug.WriteLine( s + ":" + c曲リストノード.strタイトル ); } #endregion } @@ -1579,17 +1579,17 @@ namespace DTXMania /// /// /// - public int n現在のアンカ難易度レベルに最も近い難易度レベルを返す( C曲リストノード song, int n現在のアンカ難易度レベル ) + public int n現在のアンカ難易度レベルに最も近い難易度レベルを返す(C曲リストノード song, int n現在のアンカ難易度レベル) { // 事前チェック。 - if ( song == null ) + if (song == null) return n現在のアンカ難易度レベル; // 曲がまったくないよ - if ( song.arスコア[ n現在のアンカ難易度レベル ] != null ) + if (song.arスコア[n現在のアンカ難易度レベル] != null) return n現在のアンカ難易度レベル; // 難易度ぴったりの曲があったよ - if ( ( song.eノード種別 == C曲リストノード.Eノード種別.BOX ) || ( song.eノード種別 == C曲リストノード.Eノード種別.BACKBOX ) ) + if ((song.eノード種別 == C曲リストノード.Eノード種別.BOX) || (song.eノード種別 == C曲リストノード.Eノード種別.BACKBOX)) return 0; // BOX と BACKBOX は関係無いよ @@ -1597,30 +1597,30 @@ namespace DTXMania int n最も近いレベル = n現在のアンカ難易度レベル; - for ( int i = 0; i < 5; i++ ) + for (int i = 0; i < 5; i++) { - if ( song.arスコア[ n最も近いレベル ] != null ) + if (song.arスコア[n最も近いレベル] != null) break; // 曲があった。 - n最も近いレベル = ( n最も近いレベル + 1 ) % 5; // 曲がなかったので次の難易度レベルへGo。(5以上になったら0に戻る。) + n最も近いレベル = (n最も近いレベル + 1) % 5; // 曲がなかったので次の難易度レベルへGo。(5以上になったら0に戻る。) } // 見つかった曲がアンカより下のレベルだった場合…… // アンカから下向きに検索すれば、もっとアンカに近い曲があるんじゃね? - if ( n最も近いレベル < n現在のアンカ難易度レベル ) + if (n最も近いレベル < n現在のアンカ難易度レベル) { // 現在のアンカレベルから、難易度下向きに検索開始。 n最も近いレベル = n現在のアンカ難易度レベル; - for ( int i = 0; i < 5; i++ ) + for (int i = 0; i < 5; i++) { - if ( song.arスコア[ n最も近いレベル ] != null ) + if (song.arスコア[n最も近いレベル] != null) break; // 曲があった。 - n最も近いレベル = ( ( n最も近いレベル - 1 ) + 5 ) % 5; // 曲がなかったので次の難易度レベルへGo。(0未満になったら4に戻る。) + n最も近いレベル = ((n最も近いレベル - 1) + 5) % 5; // 曲がなかったので次の難易度レベルへGo。(0未満になったら4に戻る。) } } @@ -1635,7 +1635,7 @@ namespace DTXMania { ノードリスト.Sort( delegate( C曲リストノード n1, C曲リストノード n2 ) { - #region [ 共通処理 ] + #region [ 共通処理 ] if ( n1 == n2 ) { return 0; @@ -1682,58 +1682,58 @@ Debug.WriteLine( dBPM + ":" + c曲リストノード.strタイトル ); #endregion #region [ .score.ini を読み込んで Cスコア.譜面情報に設定する ] //----------------- - public void tScoreIniを読み込んで譜面情報を設定する( string strScoreIniファイルパス, ref Cスコア score ) + public void tScoreIniを読み込んで譜面情報を設定する(string strScoreIniファイルパス, ref Cスコア score) { - if( !File.Exists( strScoreIniファイルパス ) ) + if (!File.Exists(strScoreIniファイルパス)) return; try { - var ini = new CScoreIni( strScoreIniファイルパス ); + var ini = new CScoreIni(strScoreIniファイルパス); ini.t全演奏記録セクションの整合性をチェックし不整合があればリセットする(); - for( int n楽器番号 = 0; n楽器番号 < 3; n楽器番号++ ) + for (int n楽器番号 = 0; n楽器番号 < 3; n楽器番号++) { - int n = ( n楽器番号 * 2 ) + 1; // n = 0~5 + int n = (n楽器番号 * 2) + 1; // n = 0~5 - #region socre.譜面情報.最大ランク[ n楽器番号 ] = ... + #region socre.譜面情報.最大ランク[ n楽器番号 ] = ... //----------------- - if( ini.stセクション[ n ].b演奏にMIDI入力を使用した || - ini.stセクション[ n ].b演奏にキーボードを使用した || - ini.stセクション[ n ].b演奏にジョイパッドを使用した || - ini.stセクション[ n ].b演奏にマウスを使用した ) + if (ini.stセクション[n].b演奏にMIDI入力を使用した || + ini.stセクション[n].b演奏にキーボードを使用した || + ini.stセクション[n].b演奏にジョイパッドを使用した || + ini.stセクション[n].b演奏にマウスを使用した) { // (A) 全オートじゃないようなので、演奏結果情報を有効としてランクを算出する。 - score.譜面情報.最大ランク[ n楽器番号 ] = - CScoreIni.tランク値を計算して返す( - ini.stセクション[ n ].n全チップ数, - ini.stセクション[ n ].nPerfect数, - ini.stセクション[ n ].nGreat数, - ini.stセクション[ n ].nGood数, - ini.stセクション[ n ].nPoor数, - ini.stセクション[ n ].nMiss数 ); + score.譜面情報.最大ランク[n楽器番号] = + CScoreIni.tランク値を計算して返す( + ini.stセクション[n].n全チップ数, + ini.stセクション[n].nPerfect数, + ini.stセクション[n].nGreat数, + ini.stセクション[n].nGood数, + ini.stセクション[n].nPoor数, + ini.stセクション[n].nMiss数); } else { // (B) 全オートらしいので、ランクは無効とする。 - score.譜面情報.最大ランク[ n楽器番号 ] = (int) CScoreIni.ERANK.UNKNOWN; + score.譜面情報.最大ランク[n楽器番号] = (int)CScoreIni.ERANK.UNKNOWN; } //----------------- #endregion - score.譜面情報.最大スキル[ n楽器番号 ] = ini.stセクション[ n ].db演奏型スキル値; - score.譜面情報.フルコンボ[ n楽器番号 ] = ini.stセクション[ n ].bフルコンボである; + score.譜面情報.最大スキル[n楽器番号] = ini.stセクション[n].db演奏型スキル値; + score.譜面情報.フルコンボ[n楽器番号] = ini.stセクション[n].bフルコンボである; } score.譜面情報.演奏回数.Drums = ini.stファイル.PlayCountDrums; score.譜面情報.演奏回数.Guitar = ini.stファイル.PlayCountGuitar; score.譜面情報.演奏回数.Bass = ini.stファイル.PlayCountBass; - for( int i = 0; i < 5; i++ ) - score.譜面情報.演奏履歴[ i ] = ini.stファイル.History[ i ]; + for (int i = 0; i < 5; i++) + score.譜面情報.演奏履歴[i] = ini.stファイル.History[i]; } catch { - Trace.TraceError( "演奏記録ファイルの読み込みに失敗しました。[{0}]", strScoreIniファイルパス ); + Trace.TraceError("演奏記録ファイルの読み込みに失敗しました。[{0}]", strScoreIniファイルパス); } } //----------------- @@ -1747,29 +1747,29 @@ Debug.WriteLine( dBPM + ":" + c曲リストノード.strタイトル ); private const string SONGSDB_VERSION = "SongsDB3"; private List listStrBoxDefSkinSubfolderFullName; - private int t比較0_共通( C曲リストノード n1, C曲リストノード n2 ) + private int t比較0_共通(C曲リストノード n1, C曲リストノード n2) { - if( n1.eノード種別 == C曲リストノード.Eノード種別.BACKBOX ) + if (n1.eノード種別 == C曲リストノード.Eノード種別.BACKBOX) { return -1; } - if( n2.eノード種別 == C曲リストノード.Eノード種別.BACKBOX ) + if (n2.eノード種別 == C曲リストノード.Eノード種別.BACKBOX) { return 1; } - if( n1.eノード種別 == C曲リストノード.Eノード種別.RANDOM ) + if (n1.eノード種別 == C曲リストノード.Eノード種別.RANDOM) { return 1; } - if( n2.eノード種別 == C曲リストノード.Eノード種別.RANDOM ) + if (n2.eノード種別 == C曲リストノード.Eノード種別.RANDOM) { return -1; } - if( ( n1.eノード種別 == C曲リストノード.Eノード種別.BOX ) && ( n2.eノード種別 != C曲リストノード.Eノード種別.BOX ) ) + if ((n1.eノード種別 == C曲リストノード.Eノード種別.BOX) && (n2.eノード種別 != C曲リストノード.Eノード種別.BOX)) { return -1; } - if( ( n1.eノード種別 != C曲リストノード.Eノード種別.BOX ) && ( n2.eノード種別 == C曲リストノード.Eノード種別.BOX ) ) + if ((n1.eノード種別 != C曲リストノード.Eノード種別.BOX) && (n2.eノード種別 == C曲リストノード.Eノード種別.BOX)) { return 1; } @@ -1781,13 +1781,13 @@ Debug.WriteLine( dBPM + ":" + c曲リストノード.strタイトル ); /// private void SlowOrSuspendSearchTask() { - if ( this.bIsSuspending ) // #27060 中断要求があったら、解除要求が来るまで待機 + if (this.bIsSuspending) // #27060 中断要求があったら、解除要求が来るまで待機 { autoReset.WaitOne(); } - if ( this.bIsSlowdown && ++this.searchCount > 10 ) // #27060 #PREMOVIE再生中は検索負荷を下げる + if (this.bIsSlowdown && ++this.searchCount > 10) // #27060 #PREMOVIE再生中は検索負荷を下げる { - Thread.Sleep( 100 ); + Thread.Sleep(100); this.searchCount = 0; } } diff --git a/DTXManiaプロジェクト/コード/スコア、曲/Cスコア.cs b/DTXManiaプロジェクト/コード/スコア、曲/Cスコア.cs index 8b8ea477..a5219d89 100644 --- a/DTXManiaプロジェクト/コード/スコア、曲/Cスコア.cs +++ b/DTXManiaプロジェクト/コード/スコア、曲/Cスコア.cs @@ -13,13 +13,13 @@ namespace DTXMania public STScoreIni情報 ScoreIni情報; [Serializable] - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] public struct STScoreIni情報 { public DateTime 最終更新日時; public long ファイルサイズ; - public STScoreIni情報( DateTime 最終更新日時, long ファイルサイズ ) + public STScoreIni情報(DateTime 最終更新日時, long ファイルサイズ) { this.最終更新日時 = 最終更新日時; this.ファイルサイズ = ファイルサイズ; @@ -28,7 +28,7 @@ namespace DTXMania public STファイル情報 ファイル情報; [Serializable] - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] public struct STファイル情報 { public string ファイルの絶対パス; @@ -36,7 +36,7 @@ namespace DTXMania public DateTime 最終更新日時; public long ファイルサイズ; - public STファイル情報( string ファイルの絶対パス, string フォルダの絶対パス, DateTime 最終更新日時, long ファイルサイズ ) + public STファイル情報(string ファイルの絶対パス, string フォルダの絶対パス, DateTime 最終更新日時, long ファイルサイズ) { this.ファイルの絶対パス = ファイルの絶対パス; this.フォルダの絶対パス = フォルダの絶対パス; @@ -47,7 +47,7 @@ namespace DTXMania public ST譜面情報 譜面情報; [Serializable] - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] public struct ST譜面情報 { public string タイトル; @@ -70,7 +70,7 @@ namespace DTXMania public int Duration; [Serializable] - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] public struct STHISTORY { public string 行1; @@ -78,11 +78,11 @@ namespace DTXMania public string 行3; public string 行4; public string 行5; - public string this[ int index ] + public string this[int index] { get { - switch( index ) + switch (index) { case 0: return this.行1; @@ -103,7 +103,7 @@ namespace DTXMania } set { - switch( index ) + switch (index) { case 0: this.行1 = value; @@ -131,17 +131,17 @@ namespace DTXMania } [Serializable] - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] public struct STRANK { public int Drums; public int Guitar; public int Bass; - public int this[ int index ] + public int this[int index] { get { - switch( index ) + switch (index) { case 0: return this.Drums; @@ -156,11 +156,11 @@ namespace DTXMania } set { - if ( ( value < (int)CScoreIni.ERANK.SS ) || ( ( value != (int)CScoreIni.ERANK.UNKNOWN ) && ( value > (int)CScoreIni.ERANK.E ) ) ) + if ((value < (int)CScoreIni.ERANK.SS) || ((value != (int)CScoreIni.ERANK.UNKNOWN) && (value > (int)CScoreIni.ERANK.E))) { throw new ArgumentOutOfRangeException(); } - switch( index ) + switch (index) { case 0: this.Drums = value; @@ -180,17 +180,17 @@ namespace DTXMania } [Serializable] - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] public struct STSKILL { public double Drums; public double Guitar; public double Bass; - public double this[ int index ] + public double this[int index] { get { - switch( index ) + switch (index) { case 0: return this.Drums; @@ -205,11 +205,11 @@ namespace DTXMania } set { - if( ( value < 0.0 ) || ( value > 100.0 ) ) + if ((value < 0.0) || (value > 100.0)) { throw new ArgumentOutOfRangeException(); } - switch( index ) + switch (index) { case 0: this.Drums = value; @@ -234,7 +234,7 @@ namespace DTXMania { get { - return ( ( ( this.譜面情報.レベル[ 0 ] + this.譜面情報.レベル[ 1 ] ) + this.譜面情報.レベル[ 2 ] ) != 0 ); + return (((this.譜面情報.レベル[0] + this.譜面情報.レベル[1]) + this.譜面情報.レベル[2]) != 0); } } @@ -243,9 +243,9 @@ namespace DTXMania public Cスコア() { - this.ScoreIni情報 = new STScoreIni情報( DateTime.MinValue, 0L ); + this.ScoreIni情報 = new STScoreIni情報(DateTime.MinValue, 0L); this.bSongDBにキャッシュがあった = false; - this.ファイル情報 = new STファイル情報( "", "", DateTime.MinValue, 0L ); + this.ファイル情報 = new STファイル情報("", "", DateTime.MinValue, 0L); this.譜面情報 = new ST譜面情報(); this.譜面情報.タイトル = ""; this.譜面情報.アーティスト名 = ""; @@ -257,9 +257,9 @@ namespace DTXMania this.譜面情報.Backgound = ""; this.譜面情報.レベル = new STDGBVALUE(); this.譜面情報.最大ランク = new ST譜面情報.STRANK(); - this.譜面情報.最大ランク.Drums = (int)CScoreIni.ERANK.UNKNOWN; + this.譜面情報.最大ランク.Drums = (int)CScoreIni.ERANK.UNKNOWN; this.譜面情報.最大ランク.Guitar = (int)CScoreIni.ERANK.UNKNOWN; - this.譜面情報.最大ランク.Bass = (int)CScoreIni.ERANK.UNKNOWN; + this.譜面情報.最大ランク.Bass = (int)CScoreIni.ERANK.UNKNOWN; this.譜面情報.フルコンボ = new STDGBVALUE(); this.譜面情報.演奏回数 = new STDGBVALUE(); this.譜面情報.演奏履歴 = new ST譜面情報.STHISTORY(); diff --git a/DTXManiaプロジェクト/コード/スコア、曲/C曲リストノード.cs b/DTXManiaプロジェクト/コード/スコア、曲/C曲リストノード.cs index 62ec5897..b92bf1cc 100644 --- a/DTXManiaプロジェクト/コード/スコア、曲/C曲リストノード.cs +++ b/DTXManiaプロジェクト/コード/スコア、曲/C曲リストノード.cs @@ -22,8 +22,8 @@ namespace DTXMania UNKNOWN } public int nID { get; private set; } - public Cスコア[] arスコア = new Cスコア[ 5 ]; - public string[] ar難易度ラベル = new string[ 5 ]; + public Cスコア[] arスコア = new Cスコア[5]; + public string[] ar難易度ラベル = new string[5]; public bool bDTXFilesで始まるフォルダ名のBOXである; public bool bBoxDefで作成されたBOXである { @@ -52,7 +52,7 @@ namespace DTXMania public string strタイトル = ""; public string strBreadcrumbs = ""; // #27060 2011.2.27 yyagi; MUSIC BOXのパンくずリスト (曲リスト構造内の絶対位置捕捉のために使う) public string strSkinPath = ""; // #28195 2012.5.4 yyagi; box.defでのスキン切り替え対応 - + // コンストラクタ public C曲リストノード() diff --git a/DTXManiaプロジェクト/コード/ステージ/01.起動/CStage起動.cs b/DTXManiaプロジェクト/コード/ステージ/01.起動/CStage起動.cs index 5e8b2398..e81fe2a7 100644 --- a/DTXManiaプロジェクト/コード/ステージ/01.起動/CStage起動.cs +++ b/DTXManiaプロジェクト/コード/ステージ/01.起動/CStage起動.cs @@ -25,14 +25,14 @@ namespace DTXMania public override void On活性化() { - Trace.TraceInformation( "起動ステージを活性化します。" ); + Trace.TraceInformation("起動ステージを活性化します。"); Trace.Indent(); try { this.list進行文字列 = new List(); base.eフェーズID = CStage.Eフェーズ.共通_通常状態; base.On活性化(); - Trace.TraceInformation( "起動ステージの活性化を完了しました。" ); + Trace.TraceInformation("起動ステージの活性化を完了しました。"); } finally { @@ -41,22 +41,22 @@ namespace DTXMania } public override void On非活性化() { - Trace.TraceInformation( "起動ステージを非活性化します。" ); + Trace.TraceInformation("起動ステージを非活性化します。"); Trace.Indent(); try { this.list進行文字列 = null; - if ( es != null ) + if (es != null) { - if ( ( es.thDTXFileEnumerate != null ) && es.thDTXFileEnumerate.IsAlive ) + if ((es.thDTXFileEnumerate != null) && es.thDTXFileEnumerate.IsAlive) { - Trace.TraceWarning( "リスト構築スレッドを強制停止します。" ); + Trace.TraceWarning("リスト構築スレッドを強制停止します。"); es.thDTXFileEnumerate.Abort(); es.thDTXFileEnumerate.Join(); } } base.On非活性化(); - Trace.TraceInformation( "起動ステージの非活性化を完了しました。" ); + Trace.TraceInformation("起動ステージの非活性化を完了しました。"); } finally { @@ -65,28 +65,28 @@ namespace DTXMania } public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - this.tx背景 = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenSetup background.jpg" ), false ); + this.tx背景 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenSetup background.jpg"), false); base.OnManagedリソースの作成(); } } public override void OnManagedリソースの解放() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.tx背景 ); + TextureFactory.tテクスチャの解放(ref this.tx背景); base.OnManagedリソースの解放(); } } public override int On進行描画() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - if( base.b初めての進行描画 ) + if (base.b初めての進行描画) { - this.list進行文字列.Add( "DTXMania powered by YAMAHA Silent Session Drums\n" ); - this.list進行文字列.Add( "Release: " + CDTXMania.VERSION + " [" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString() + "]" ); + this.list進行文字列.Add("DTXMania powered by YAMAHA Silent Session Drums\n"); + this.list進行文字列.Add("Release: " + CDTXMania.VERSION + " [" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString() + "]"); es = new CEnumSongs(); es.StartEnumFromCache(); // 曲リスト取得(別スレッドで実行される) @@ -96,12 +96,12 @@ namespace DTXMania // CSongs管理 s管理 = CDTXMania.app.Songs管理; - if( this.tx背景 != null ) - this.tx背景.t2D描画( CDTXMania.app.Device, 0, 0 ); + if (this.tx背景 != null) + this.tx背景.t2D描画(CDTXMania.app.Device, 0, 0); #region [ this.str現在進行中 の決定 ] //----------------- - switch( base.eフェーズID ) + switch (base.eフェーズID) { case CStage.Eフェーズ.起動0_システムサウンドを構築: this.str現在進行中 = "Loading system sounds ... "; @@ -116,23 +116,23 @@ namespace DTXMania break; case CStage.Eフェーズ.起動2_曲を検索してリストを作成する: - this.str現在進行中 = string.Format( "{0} ... {1}", "Enumerating songs", es.Songs管理.n検索されたスコア数 ); + this.str現在進行中 = string.Format("{0} ... {1}", "Enumerating songs", es.Songs管理.n検索されたスコア数); break; case CStage.Eフェーズ.起動3_スコアキャッシュをリストに反映する: - this.str現在進行中 = string.Format( "{0} ... {1}/{2}", "Loading score properties from songs.db", es.Songs管理.nスコアキャッシュから反映できたスコア数, es.Songs管理.n検索されたスコア数 ); + this.str現在進行中 = string.Format("{0} ... {1}/{2}", "Loading score properties from songs.db", es.Songs管理.nスコアキャッシュから反映できたスコア数, es.Songs管理.n検索されたスコア数); break; case CStage.Eフェーズ.起動4_スコアキャッシュになかった曲をファイルから読み込んで反映する: - this.str現在進行中 = string.Format( "{0} ... {1}/{2}", "Loading score properties from files", es.Songs管理.nファイルから反映できたスコア数, es.Songs管理.n検索されたスコア数 - es.Songs管理.nスコアキャッシュから反映できたスコア数 ); + this.str現在進行中 = string.Format("{0} ... {1}/{2}", "Loading score properties from files", es.Songs管理.nファイルから反映できたスコア数, es.Songs管理.n検索されたスコア数 - es.Songs管理.nスコアキャッシュから反映できたスコア数); break; case CStage.Eフェーズ.起動5_曲リストへ後処理を適用する: - this.str現在進行中 = string.Format( "{0} ... ", "Building songlists" ); + this.str現在進行中 = string.Format("{0} ... ", "Building songlists"); break; case CStage.Eフェーズ.起動6_スコアキャッシュをSongsDBに出力する: - this.str現在進行中 = string.Format( "{0} ... ", "Saving songs.db" ); + this.str現在進行中 = string.Format("{0} ... ", "Saving songs.db"); break; case CStage.Eフェーズ.起動7_完了: @@ -143,23 +143,23 @@ namespace DTXMania #endregion #region [ this.list進行文字列+this.現在進行中 の表示 ] //----------------- - lock( this.list進行文字列 ) + lock (this.list進行文字列) { int x = 0; int y = 0; - foreach( string str in this.list進行文字列 ) + foreach (string str in this.list進行文字列) { - CDTXMania.app.act文字コンソール.tPrint( x, y, C文字コンソール.Eフォント種別.灰細, str ); + CDTXMania.app.act文字コンソール.tPrint(x, y, C文字コンソール.Eフォント種別.灰細, str); y += 14 * 2; } - CDTXMania.app.act文字コンソール.tPrint( x, y, C文字コンソール.Eフォント種別.灰細, this.str現在進行中 ); + CDTXMania.app.act文字コンソール.tPrint(x, y, C文字コンソール.Eフォント種別.灰細, this.str現在進行中); } //----------------- #endregion - if( es != null && es.IsSongListEnumCompletelyDone ) // 曲リスト作成が終わったら + if (es != null && es.IsSongListEnumCompletelyDone) // 曲リスト作成が終わったら { - CDTXMania.app.Songs管理 = ( es != null ) ? es.Songs管理 : null; // 最後に、曲リストを拾い上げる + CDTXMania.app.Songs管理 = (es != null) ? es.Songs管理 : null; // 最後に、曲リストを拾い上げる return 1; } } @@ -188,7 +188,7 @@ namespace DTXMania try { - #region [ 0) システムサウンドの構築 ] + #region [ 0) システムサウンドの構築 ] //----------------------------- base.eフェーズID = CStage.Eフェーズ.起動0_システムサウンドを構築; @@ -240,7 +240,7 @@ namespace DTXMania return; } - #region [ 00) songlist.dbの読み込みによる曲リストの構築 ] + #region [ 00) songlist.dbの読み込みによる曲リストの構築 ] //----------------------------- base.eフェーズID = CStage.Eフェーズ.起動00_songlistから曲リストを作成する; @@ -283,7 +283,7 @@ namespace DTXMania #endregion - #region [ 1) songs.db の読み込み ] + #region [ 1) songs.db の読み込み ] //----------------------------- base.eフェーズID = CStage.Eフェーズ.起動1_SongsDBからスコアキャッシュを構築; diff --git a/DTXManiaプロジェクト/コード/ステージ/02.タイトル/CActEnumSongs.cs b/DTXManiaプロジェクト/コード/ステージ/02.タイトル/CActEnumSongs.cs index 213f6f36..3722d5b4 100644 --- a/DTXManiaプロジェクト/コード/ステージ/02.タイトル/CActEnumSongs.cs +++ b/DTXManiaプロジェクト/コード/ステージ/02.タイトル/CActEnumSongs.cs @@ -15,7 +15,7 @@ using SampleFramework; namespace DTXMania { - internal class CActEnumSongs : CActivity + internal class CActEnumSongs : CActivity { public bool bコマンドでの曲データ取得; @@ -25,14 +25,14 @@ namespace DTXMania /// public CActEnumSongs() { - Init( false ); + Init(false); } - public CActEnumSongs( bool _bコマンドでの曲データ取得 ) + public CActEnumSongs(bool _bコマンドでの曲データ取得) { - Init( _bコマンドでの曲データ取得 ); + Init(_bコマンドでの曲データ取得); } - private void Init( bool _bコマンドでの曲データ取得 ) + private void Init(bool _bコマンドでの曲データ取得) { base.b活性化してない = true; bコマンドでの曲データ取得 = _bコマンドでの曲データ取得; @@ -42,14 +42,14 @@ namespace DTXMania public override void On活性化() { - if ( this.b活性化してる ) + if (this.b活性化してる) return; base.On活性化(); try { this.ctNowEnumeratingSongs = new CCounter(); // 0, 1000, 17, CDTXMania.app.Timer ); - this.ctNowEnumeratingSongs.t開始( 0, 100, 17, CDTXMania.app.Timer ); + this.ctNowEnumeratingSongs.t開始(0, 100, 17, CDTXMania.app.Timer); } finally { @@ -57,28 +57,28 @@ namespace DTXMania } public override void On非活性化() { - if ( this.b活性化してない ) + if (this.b活性化してない) return; base.On非活性化(); this.ctNowEnumeratingSongs = null; } public override void OnManagedリソースの作成() { - if ( this.b活性化してない ) + if (this.b活性化してない) return; - string pathNowEnumeratingSongs = CSkin.Path( @"Graphics\ScreenTitle NowEnumeratingSongs.png" ); - if ( File.Exists( pathNowEnumeratingSongs ) ) + string pathNowEnumeratingSongs = CSkin.Path(@"Graphics\ScreenTitle NowEnumeratingSongs.png"); + if (File.Exists(pathNowEnumeratingSongs)) { - this.txNowEnumeratingSongs = TextureFactory.tテクスチャの生成( pathNowEnumeratingSongs, false ); + this.txNowEnumeratingSongs = TextureFactory.tテクスチャの生成(pathNowEnumeratingSongs, false); } else { this.txNowEnumeratingSongs = null; } - string pathDialogNowEnumeratingSongs = CSkin.Path( @"Graphics\ScreenConfig NowEnumeratingSongs.png" ); - if ( File.Exists( pathDialogNowEnumeratingSongs ) ) + string pathDialogNowEnumeratingSongs = CSkin.Path(@"Graphics\ScreenConfig NowEnumeratingSongs.png"); + if (File.Exists(pathDialogNowEnumeratingSongs)) { - this.txDialogNowEnumeratingSongs = TextureFactory.tテクスチャの生成( pathDialogNowEnumeratingSongs, false ); + this.txDialogNowEnumeratingSongs = TextureFactory.tテクスチャの生成(pathDialogNowEnumeratingSongs, false); } else { @@ -87,71 +87,71 @@ namespace DTXMania try { - System.Drawing.Font ftMessage = new System.Drawing.Font( "MS PGothic", 40 * 3f, FontStyle.Bold, GraphicsUnit.Pixel ); + System.Drawing.Font ftMessage = new System.Drawing.Font("MS PGothic", 40 * 3f, FontStyle.Bold, GraphicsUnit.Pixel); string[] strMessage = { " 曲データの一覧を\n 取得しています。\n しばらくお待ちください。", " Now enumerating songs.\n Please wait..." }; - int ci = ( CultureInfo.CurrentCulture.TwoLetterISOLanguageName == "ja" ) ? 0 : 1; - if ( ( strMessage != null ) && ( strMessage.Length > 0 ) ) + int ci = (CultureInfo.CurrentCulture.TwoLetterISOLanguageName == "ja") ? 0 : 1; + if ((strMessage != null) && (strMessage.Length > 0)) { - Bitmap image = new Bitmap( 1, 1 ); - Graphics graphics = Graphics.FromImage( image ); - SizeF ef = graphics.MeasureString( strMessage[ ci ], ftMessage ); - Size size = new Size( (int) Math.Ceiling( (double) ef.Width ), (int) Math.Ceiling( (double) ef.Height ) ); + Bitmap image = new Bitmap(1, 1); + Graphics graphics = Graphics.FromImage(image); + SizeF ef = graphics.MeasureString(strMessage[ci], ftMessage); + Size size = new Size((int)Math.Ceiling((double)ef.Width), (int)Math.Ceiling((double)ef.Height)); graphics.Dispose(); image.Dispose(); - image = new Bitmap( size.Width, size.Height ); - graphics = Graphics.FromImage( image ); + image = new Bitmap(size.Width, size.Height); + graphics = Graphics.FromImage(image); graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias; - graphics.DrawString( strMessage[ ci ], ftMessage, Brushes.White, (float) 0f, (float) 0f ); + graphics.DrawString(strMessage[ci], ftMessage, Brushes.White, (float)0f, (float)0f); graphics.Dispose(); - this.txMessage = new CTexture( CDTXMania.app.Device, image, CDTXMania.app.TextureFormat ); - this.txMessage.vc拡大縮小倍率 = new Vector3( 0.5f, 0.5f, 1f ); + this.txMessage = new CTexture(CDTXMania.app.Device, image, CDTXMania.app.TextureFormat); + this.txMessage.vc拡大縮小倍率 = new Vector3(0.5f, 0.5f, 1f); image.Dispose(); - TextureFactory.t安全にDisposeする( ref ftMessage ); + TextureFactory.t安全にDisposeする(ref ftMessage); } else { this.txMessage = null; } } - catch ( CTextureCreateFailedException ) + catch (CTextureCreateFailedException) { - Trace.TraceError( "テクスチャの生成に失敗しました。(txMessage)" ); + Trace.TraceError("テクスチャの生成に失敗しました。(txMessage)"); this.txMessage = null; } - + base.OnManagedリソースの作成(); } public override void OnManagedリソースの解放() { - if ( this.b活性化してない ) + if (this.b活性化してない) return; - TextureFactory.t安全にDisposeする( ref this.txDialogNowEnumeratingSongs ); - TextureFactory.t安全にDisposeする( ref this.txNowEnumeratingSongs ); - TextureFactory.t安全にDisposeする( ref this.txMessage ); + TextureFactory.t安全にDisposeする(ref this.txDialogNowEnumeratingSongs); + TextureFactory.t安全にDisposeする(ref this.txNowEnumeratingSongs); + TextureFactory.t安全にDisposeする(ref this.txMessage); base.OnManagedリソースの解放(); } public override int On進行描画() { - if ( this.b活性化してない ) + if (this.b活性化してない) { return 0; } this.ctNowEnumeratingSongs.t進行Loop(); - if ( this.txNowEnumeratingSongs != null ) + if (this.txNowEnumeratingSongs != null) { - this.txNowEnumeratingSongs.n透明度 = (int) ( 176.0 + 80.0 * Math.Sin( (double) (2 * Math.PI * this.ctNowEnumeratingSongs.n現在の値 * 2 / 100.0 ) ) ); - this.txNowEnumeratingSongs.t2D描画( CDTXMania.app.Device, 18, 7 ); + this.txNowEnumeratingSongs.n透明度 = (int)(176.0 + 80.0 * Math.Sin((double)(2 * Math.PI * this.ctNowEnumeratingSongs.n現在の値 * 2 / 100.0))); + this.txNowEnumeratingSongs.t2D描画(CDTXMania.app.Device, 18, 7); } - if ( bコマンドでの曲データ取得 && this.txDialogNowEnumeratingSongs != null ) + if (bコマンドでの曲データ取得 && this.txDialogNowEnumeratingSongs != null) { - this.txDialogNowEnumeratingSongs.t2D描画( CDTXMania.app.Device, 500, 300 ); - this.txMessage.t2D描画( CDTXMania.app.Device, 540, 320 ); + this.txDialogNowEnumeratingSongs.t2D描画(CDTXMania.app.Device, 500, 300); + this.txMessage.t2D描画(CDTXMania.app.Device, 540, 320); } return 0; diff --git a/DTXManiaプロジェクト/コード/ステージ/02.タイトル/CEnumSongs.cs b/DTXManiaプロジェクト/コード/ステージ/02.タイトル/CEnumSongs.cs index fba68eb7..9aa73ab2 100644 --- a/DTXManiaプロジェクト/コード/ステージ/02.タイトル/CEnumSongs.cs +++ b/DTXManiaプロジェクト/コード/ステージ/02.タイトル/CEnumSongs.cs @@ -25,14 +25,14 @@ namespace DTXMania { get { - return ( this.state == DTXEnumState.CompletelyDone ); + return (this.state == DTXEnumState.CompletelyDone); } } public bool IsEnumerating { get { - if ( thDTXFileEnumerate == null ) + if (thDTXFileEnumerate == null) { return false; } @@ -43,14 +43,14 @@ namespace DTXMania { get { - return ( this.state == DTXEnumState.Enumeratad ); + return (this.state == DTXEnumState.Enumeratad); } } public bool IsSongListEnumStarted // 曲リスト探索開始後?(探索完了も含む) { get { - return ( this.state != DTXEnumState.None ); + return (this.state != DTXEnumState.None); } } public void SongListEnumCompletelyDone() @@ -70,9 +70,9 @@ namespace DTXMania } } - public void ChangeEnumeratePriority( ThreadPriority tp ) + public void ChangeEnumeratePriority(ThreadPriority tp) { - if ( this.thDTXFileEnumerate != null && this.thDTXFileEnumerate.IsAlive == true ) + if (this.thDTXFileEnumerate != null && this.thDTXFileEnumerate.IsAlive == true) { this.thDTXFileEnumerate.Priority = tp; } @@ -104,9 +104,9 @@ namespace DTXMania this.Songs管理 = new CSongs管理(); } - public void Init( List ls, int n ) + public void Init(List ls, int n) { - if ( state == DTXEnumState.None ) + if (state == DTXEnumState.None) { this.Songs管理.listSongsDB = ls; this.Songs管理.nSongsDBから取得できたスコア数 = n; @@ -118,7 +118,7 @@ namespace DTXMania /// public void StartEnumFromCache() { - this.thDTXFileEnumerate = new Thread( new ThreadStart( this.t曲リストの構築1 ) ); + this.thDTXFileEnumerate = new Thread(new ThreadStart(this.t曲リストの構築1)); this.thDTXFileEnumerate.Name = "曲リストの構築"; this.thDTXFileEnumerate.IsBackground = true; this.thDTXFileEnumerate.Start(); @@ -134,20 +134,20 @@ namespace DTXMania /// public void StartEnumFromDisk() { - if ( state == DTXEnumState.None || state == DTXEnumState.CompletelyDone ) + if (state == DTXEnumState.None || state == DTXEnumState.CompletelyDone) { - Trace.TraceInformation( "★曲データ検索スレッドを起動しました。" ); - lock ( this ) + Trace.TraceInformation("★曲データ検索スレッドを起動しました。"); + lock (this) { state = DTXEnumState.Ongoing; } // this.autoReset = new AutoResetEvent( true ); - if ( this.Songs管理 == null ) // Enumerating Songs完了後、CONFIG画面から再スキャンしたときにこうなる + if (this.Songs管理 == null) // Enumerating Songs完了後、CONFIG画面から再スキャンしたときにこうなる { this.Songs管理 = new CSongs管理(); } - this.thDTXFileEnumerate = new Thread( new ThreadStart( this.t曲リストの構築2 ) ); + this.thDTXFileEnumerate = new Thread(new ThreadStart(this.t曲リストの構築2)); this.thDTXFileEnumerate.Name = "曲リストの構築"; this.thDTXFileEnumerate.IsBackground = true; this.thDTXFileEnumerate.Priority = System.Threading.ThreadPriority.Lowest; @@ -161,13 +161,13 @@ namespace DTXMania /// public void Suspend() { - if ( this.state != DTXEnumState.CompletelyDone && - ( ( thDTXFileEnumerate.ThreadState & ( System.Threading.ThreadState.Background ) ) != 0 ) ) + if (this.state != DTXEnumState.CompletelyDone && + ((thDTXFileEnumerate.ThreadState & (System.Threading.ThreadState.Background)) != 0)) { // this.thDTXFileEnumerate.Suspend(); // obsoleteにつき使用中止 this.Songs管理.bIsSuspending = true; this.state = DTXEnumState.Suspended; - Trace.TraceInformation( "★曲データ検索スレッドを中断しました。" ); + Trace.TraceInformation("★曲データ検索スレッドを中断しました。"); } } @@ -176,15 +176,15 @@ namespace DTXMania /// public void Resume() { - if ( this.state == DTXEnumState.Suspended ) + if (this.state == DTXEnumState.Suspended) { - if ( ( this.thDTXFileEnumerate.ThreadState & ( System.Threading.ThreadState.WaitSleepJoin | System.Threading.ThreadState.StopRequested ) ) != 0 ) // + if ((this.thDTXFileEnumerate.ThreadState & (System.Threading.ThreadState.WaitSleepJoin | System.Threading.ThreadState.StopRequested)) != 0) // { // this.thDTXFileEnumerate.Resume(); // obsoleteにつき使用中止 this.Songs管理.bIsSuspending = false; this.Songs管理.AutoReset.Set(); this.state = DTXEnumState.Ongoing; - Trace.TraceInformation( "★曲データ検索スレッドを再開しました。" ); + Trace.TraceInformation("★曲データ検索スレッドを再開しました。"); } } } @@ -196,15 +196,15 @@ namespace DTXMania public void WaitUntilSuspended() { // 曲検索が一時中断されるまで待機 - for ( int i = 0; i < 10; i++ ) + for (int i = 0; i < 10; i++) { - if ( this.state == DTXEnumState.CompletelyDone || - ( thDTXFileEnumerate.ThreadState & ( System.Threading.ThreadState.WaitSleepJoin | System.Threading.ThreadState.Background | System.Threading.ThreadState.Stopped ) ) != 0 ) + if (this.state == DTXEnumState.CompletelyDone || + (thDTXFileEnumerate.ThreadState & (System.Threading.ThreadState.WaitSleepJoin | System.Threading.ThreadState.Background | System.Threading.ThreadState.Stopped)) != 0) { break; } - Trace.TraceInformation( "★曲データ検索スレッドの中断待ちです: {0}", this.thDTXFileEnumerate.ThreadState.ToString() ); - Thread.Sleep( 500 ); + Trace.TraceInformation("★曲データ検索スレッドの中断待ちです: {0}", this.thDTXFileEnumerate.ThreadState.ToString()); + Thread.Sleep(500); } } @@ -214,7 +214,7 @@ namespace DTXMania /// public void Abort() { - if ( thDTXFileEnumerate != null ) + if (thDTXFileEnumerate != null) { thDTXFileEnumerate.Abort(); thDTXFileEnumerate = null; @@ -244,36 +244,36 @@ namespace DTXMania //----------------------------- CDTXMania.app.stage起動.eフェーズID = CStage.Eフェーズ.起動0_システムサウンドを構築; - Trace.TraceInformation( "0) システムサウンドを構築します。" ); + Trace.TraceInformation("0) システムサウンドを構築します。"); Trace.Indent(); try { CDTXMania.app.Skin.bgm起動画面.t再生する(); - for ( int i = 0; i < CDTXMania.app.Skin.nシステムサウンド数; i++ ) + for (int i = 0; i < CDTXMania.app.Skin.nシステムサウンド数; i++) { - if ( !CDTXMania.app.Skin[ i ].b排他 ) // BGM系以外のみ読み込む。(BGM系は必要になったときに読み込む) + if (!CDTXMania.app.Skin[i].b排他) // BGM系以外のみ読み込む。(BGM系は必要になったときに読み込む) { - CSkin.Cシステムサウンド cシステムサウンド = CDTXMania.app.Skin[ i ]; - if ( !CDTXMania.app.bコンパクトモード || cシステムサウンド.bCompact対象 ) + CSkin.Cシステムサウンド cシステムサウンド = CDTXMania.app.Skin[i]; + if (!CDTXMania.app.bコンパクトモード || cシステムサウンド.bCompact対象) { try { cシステムサウンド.t読み込み(); - Trace.TraceInformation( "システムサウンドを読み込みました。({0})", cシステムサウンド.strファイル名 ); + Trace.TraceInformation("システムサウンドを読み込みました。({0})", cシステムサウンド.strファイル名); //if ( ( cシステムサウンド == CDTXMania.app.Skin.bgm起動画面 ) && cシステムサウンド.b読み込み成功 ) //{ // cシステムサウンド.t再生する(); //} } - catch ( FileNotFoundException ) + catch (FileNotFoundException) { - Trace.TraceWarning( "システムサウンドが存在しません。({0})", cシステムサウンド.strファイル名 ); + Trace.TraceWarning("システムサウンドが存在しません。({0})", cシステムサウンド.strファイル名); } - catch ( Exception e ) + catch (Exception e) { - Trace.TraceError( e.Message ); - Trace.TraceWarning( "システムサウンドの読み込みに失敗しました。({0})", cシステムサウンド.strファイル名 ); + Trace.TraceError(e.Message); + Trace.TraceWarning("システムサウンドの読み込みに失敗しました。({0})", cシステムサウンド.strファイル名); } } } @@ -290,9 +290,9 @@ namespace DTXMania //----------------------------- #endregion - if ( CDTXMania.app.bコンパクトモード ) + if (CDTXMania.app.bコンパクトモード) { - Trace.TraceInformation( "コンパクトモードなので残りの起動処理は省略します。" ); + Trace.TraceInformation("コンパクトモードなので残りの起動処理は省略します。"); return; } @@ -300,22 +300,22 @@ namespace DTXMania //----------------------------- CDTXMania.app.stage起動.eフェーズID = CStage.Eフェーズ.起動00_songlistから曲リストを作成する; - Trace.TraceInformation( "1) songlist.dbを読み込みます。" ); + Trace.TraceInformation("1) songlist.dbを読み込みます。"); Trace.Indent(); try { - if ( !CDTXMania.app.ConfigIni.bConfigIniがないかDTXManiaのバージョンが異なる ) + if (!CDTXMania.app.ConfigIni.bConfigIniがないかDTXManiaのバージョンが異なる) { CSongs管理 s = new CSongs管理(); - s = Deserialize( strPathSongList ); // 直接this.Songs管理にdeserialize()結果を代入するのは避ける。nullにされてしまうことがあるため。 - if ( s != null ) + s = Deserialize(strPathSongList); // 直接this.Songs管理にdeserialize()結果を代入するのは避ける。nullにされてしまうことがあるため。 + if (s != null) { this.Songs管理 = s; } int scores = this.Songs管理.n検索されたスコア数; - Trace.TraceInformation( "songlist.db の読み込みを完了しました。[{0}スコア]", scores ); + Trace.TraceInformation("songlist.db の読み込みを完了しました。[{0}スコア]", scores); lock (CDTXMania.app.stage起動.list進行文字列) { CDTXMania.app.stage起動.list進行文字列.Add("Loading songlist.db ... OK"); @@ -323,7 +323,7 @@ namespace DTXMania } else { - Trace.TraceInformation( "初回の起動であるかまたはDTXManiaのバージョンが上がったため、songlist.db の読み込みをスキップします。" ); + Trace.TraceInformation("初回の起動であるかまたはDTXManiaのバージョンが上がったため、songlist.db の読み込みをスキップします。"); lock (CDTXMania.app.stage起動.list進行文字列) { CDTXMania.app.stage起動.list進行文字列.Add("Loading songlist.db ... Skip"); @@ -341,24 +341,24 @@ namespace DTXMania //----------------------------- CDTXMania.app.stage起動.eフェーズID = CStage.Eフェーズ.起動1_SongsDBからスコアキャッシュを構築; - Trace.TraceInformation( "2) songs.db を読み込みます。" ); + Trace.TraceInformation("2) songs.db を読み込みます。"); Trace.Indent(); try { - if ( !CDTXMania.app.ConfigIni.bConfigIniがないかDTXManiaのバージョンが異なる ) + if (!CDTXMania.app.ConfigIni.bConfigIniがないかDTXManiaのバージョンが異なる) { try { - this.Songs管理.tSongsDBを読み込む( strPathSongsDB ); + this.Songs管理.tSongsDBを読み込む(strPathSongsDB); } catch { - Trace.TraceError( "songs.db の読み込みに失敗しました。" ); + Trace.TraceError("songs.db の読み込みに失敗しました。"); } - int scores = ( this.Songs管理 == null ) ? 0 : this.Songs管理.nSongsDBから取得できたスコア数; // 読み込み途中でアプリ終了した場合など、CDTXMania.app.Songs管理 がnullの場合があるので注意 - Trace.TraceInformation( "songs.db の読み込みを完了しました。[{0}スコア]", scores ); + int scores = (this.Songs管理 == null) ? 0 : this.Songs管理.nSongsDBから取得できたスコア数; // 読み込み途中でアプリ終了した場合など、CDTXMania.app.Songs管理 がnullの場合があるので注意 + Trace.TraceInformation("songs.db の読み込みを完了しました。[{0}スコア]", scores); lock (CDTXMania.app.stage起動.list進行文字列) { CDTXMania.app.stage起動.list進行文字列.Add("Loading songs.db ... OK"); @@ -366,7 +366,7 @@ namespace DTXMania } else { - Trace.TraceInformation( "初回の起動であるかまたはDTXManiaのバージョンが上がったため、songs.db の読み込みをスキップします。" ); + Trace.TraceInformation("初回の起動であるかまたはDTXManiaのバージョンが上がったため、songs.db の読み込みをスキップします。"); lock (CDTXMania.app.stage起動.list進行文字列) { CDTXMania.app.stage起動.list進行文字列.Add("Loading songs.db ... Skip"); @@ -384,9 +384,9 @@ namespace DTXMania finally { CDTXMania.app.stage起動.eフェーズID = CStage.Eフェーズ.起動7_完了; - TimeSpan span = (TimeSpan) ( DateTime.Now - now ); - Trace.TraceInformation( "起動所要時間: {0}", span.ToString() ); - lock ( this ) // #28700 2012.6.12 yyagi; state change must be in finally{} for exiting as of compact mode. + TimeSpan span = (TimeSpan)(DateTime.Now - now); + Trace.TraceInformation("起動所要時間: {0}", span.ToString()); + lock (this) // #28700 2012.6.12 yyagi; state change must be in finally{} for exiting as of compact mode. { state = DTXEnumState.CompletelyDone; } @@ -417,41 +417,41 @@ namespace DTXMania //----------------------------- // base.eフェーズID = CStage.Eフェーズ.起動2_曲を検索してリストを作成する; - Trace.TraceInformation( "enum2) 曲データを検索します。" ); + Trace.TraceInformation("enum2) 曲データを検索します。"); Trace.Indent(); try { - if ( !string.IsNullOrEmpty( CDTXMania.app.ConfigIni.str曲データ検索パス ) ) + if (!string.IsNullOrEmpty(CDTXMania.app.ConfigIni.str曲データ検索パス)) { - string[] strArray = CDTXMania.app.ConfigIni.str曲データ検索パス.Split( new char[] { ';' } ); - if ( strArray.Length > 0 ) + string[] strArray = CDTXMania.app.ConfigIni.str曲データ検索パス.Split(new char[] { ';' }); + if (strArray.Length > 0) { // 全パスについて… - foreach ( string str in strArray ) + foreach (string str in strArray) { string path = str; - if ( !Path.IsPathRooted( path ) ) + if (!Path.IsPathRooted(path)) { path = CDTXMania.app.strEXEのあるフォルダ + str; // 相対パスの場合、絶対パスに直す(2010.9.16) } - if ( !string.IsNullOrEmpty( path ) ) + if (!string.IsNullOrEmpty(path)) { - Trace.TraceInformation( "検索パス: " + path ); + Trace.TraceInformation("検索パス: " + path); Trace.Indent(); try { - this.Songs管理.t曲を検索してリストを作成する( path, true ); + this.Songs管理.t曲を検索してリストを作成する(path, true); } - catch ( Exception e ) + catch (Exception e) { - Trace.TraceError( e.Message ); - Trace.TraceError( e.StackTrace ); - Trace.TraceError( "例外が発生しましたが処理を継続します。" ); - } - finally + Trace.TraceError(e.Message); + Trace.TraceError(e.StackTrace); + Trace.TraceError("例外が発生しましたが処理を継続します。"); + } + finally { Trace.Unindent(); } @@ -461,12 +461,12 @@ namespace DTXMania } else { - Trace.TraceWarning( "曲データの検索パス(DTXPath)の指定がありません。" ); + Trace.TraceWarning("曲データの検索パス(DTXPath)の指定がありません。"); } } finally { - Trace.TraceInformation( "曲データの検索を完了しました。[{0}曲{1}スコア]", this.Songs管理.n検索された曲ノード数, this.Songs管理.n検索されたスコア数 ); + Trace.TraceInformation("曲データの検索を完了しました。[{0}曲{1}スコア]", this.Songs管理.n検索された曲ノード数, this.Songs管理.n検索されたスコア数); Trace.Unindent(); } // lock ( this.list進行文字列 ) @@ -478,25 +478,25 @@ namespace DTXMania #region [ 3) songs.db 情報の曲リストへの反映 ] //----------------------------- // base.eフェーズID = CStage.Eフェーズ.起動3_スコアキャッシュをリストに反映する; - Trace.TraceInformation( "enum3) songs.db の情報を曲リストへ反映します。" ); + Trace.TraceInformation("enum3) songs.db の情報を曲リストへ反映します。"); Trace.Indent(); try { - if ( this.Songs管理.listSongsDB != null ) + if (this.Songs管理.listSongsDB != null) { this.Songs管理.tスコアキャッシュを曲リストに反映する(); } } - catch ( Exception e ) + catch (Exception e) { - Trace.TraceError( e.Message ); - Trace.TraceError( e.StackTrace ); - Trace.TraceError( "例外が発生しましたが処理を継続します。" ); + Trace.TraceError(e.Message); + Trace.TraceError(e.StackTrace); + Trace.TraceError("例外が発生しましたが処理を継続します。"); } finally { - Trace.TraceInformation( "曲リストへの反映を完了しました。[{0}/{1}スコア]", this.Songs管理.nスコアキャッシュから反映できたスコア数, this.Songs管理.n検索されたスコア数 ); + Trace.TraceInformation("曲リストへの反映を完了しました。[{0}/{1}スコア]", this.Songs管理.nスコアキャッシュから反映できたスコア数, this.Songs管理.n検索されたスコア数); Trace.Unindent(); } // lock ( this.list進行文字列 ) @@ -511,23 +511,23 @@ namespace DTXMania int num2 = this.Songs管理.n検索されたスコア数 - this.Songs管理.nスコアキャッシュから反映できたスコア数; - Trace.TraceInformation( "{0}, {1}", this.Songs管理.n検索されたスコア数, this.Songs管理.nスコアキャッシュから反映できたスコア数 ); - Trace.TraceInformation( "enum4) songs.db になかった曲データ[{0}スコア]の情報をファイルから読み込んで反映します。", num2 ); + Trace.TraceInformation("{0}, {1}", this.Songs管理.n検索されたスコア数, this.Songs管理.nスコアキャッシュから反映できたスコア数); + Trace.TraceInformation("enum4) songs.db になかった曲データ[{0}スコア]の情報をファイルから読み込んで反映します。", num2); Trace.Indent(); try { this.Songs管理.tSongsDBになかった曲をファイルから読み込んで反映する(); } - catch ( Exception e ) + catch (Exception e) { - Trace.TraceError( e.Message ); - Trace.TraceError( e.StackTrace ); - Trace.TraceError( "例外が発生しましたが処理を継続します。" ); + Trace.TraceError(e.Message); + Trace.TraceError(e.StackTrace); + Trace.TraceError("例外が発生しましたが処理を継続します。"); } finally { - Trace.TraceInformation( "曲データへの反映を完了しました。[{0}/{1}スコア]", this.Songs管理.nファイルから反映できたスコア数, num2 ); + Trace.TraceInformation("曲データへの反映を完了しました。[{0}/{1}スコア]", this.Songs管理.nファイルから反映できたスコア数, num2); Trace.Unindent(); } // lock ( this.list進行文字列 ) @@ -540,22 +540,22 @@ namespace DTXMania //----------------------------- // base.eフェーズID = CStage.Eフェーズ.起動5_曲リストへ後処理を適用する; - Trace.TraceInformation( "enum5) 曲リストへの後処理を適用します。" ); + Trace.TraceInformation("enum5) 曲リストへの後処理を適用します。"); Trace.Indent(); try { this.Songs管理.t曲リストへ後処理を適用する(); } - catch ( Exception e ) + catch (Exception e) { - Trace.TraceError( e.Message ); - Trace.TraceError( e.StackTrace ); - Trace.TraceError( "例外が発生しましたが処理を継続します。" ); + Trace.TraceError(e.Message); + Trace.TraceError(e.StackTrace); + Trace.TraceError("例外が発生しましたが処理を継続します。"); } finally { - Trace.TraceInformation( "曲リストへの後処理を完了しました。" ); + Trace.TraceInformation("曲リストへの後処理を完了しました。"); Trace.Unindent(); } // lock ( this.list進行文字列 ) @@ -568,22 +568,22 @@ namespace DTXMania //----------------------------- // base.eフェーズID = CStage.Eフェーズ.起動6_スコアキャッシュをSongsDBに出力する; - Trace.TraceInformation( "enum6) 曲データの情報を songs.db へ出力します。" ); + Trace.TraceInformation("enum6) 曲データの情報を songs.db へ出力します。"); Trace.Indent(); try { - this.Songs管理.tスコアキャッシュをSongsDBに出力する( strPathSongsDB ); + this.Songs管理.tスコアキャッシュをSongsDBに出力する(strPathSongsDB); } - catch ( Exception e ) + catch (Exception e) { - Trace.TraceError( e.Message ); - Trace.TraceError( e.StackTrace ); - Trace.TraceError( "例外が発生しましたが処理を継続します。" ); + Trace.TraceError(e.Message); + Trace.TraceError(e.StackTrace); + Trace.TraceError("例外が発生しましたが処理を継続します。"); } finally { - Trace.TraceInformation( "songs.db への出力を完了しました。[{0}スコア]", this.Songs管理.nSongsDBへ出力できたスコア数 ); + Trace.TraceInformation("songs.db への出力を完了しました。[{0}スコア]", this.Songs管理.nSongsDBへ出力できたスコア数); Trace.Unindent(); } // lock ( this.list進行文字列 ) @@ -594,11 +594,11 @@ namespace DTXMania // if ( !bSucceededFastBoot ) // songs2.db読み込みに成功したなら、songs2.dbを新たに作らない #region [ 7) songs2.db への保存 ] // #27060 2012.1.26 yyagi - Trace.TraceInformation( "enum7) 曲データの情報を songlist.db へ出力します。" ); + Trace.TraceInformation("enum7) 曲データの情報を songlist.db へ出力します。"); Trace.Indent(); - SerializeSongList( this.Songs管理, strPathSongList ); - Trace.TraceInformation( "songlist.db への出力を完了しました。[{0}スコア]", this.Songs管理.nSongsDBへ出力できたスコア数 ); + SerializeSongList(this.Songs管理, strPathSongList); + Trace.TraceInformation("songlist.db への出力を完了しました。[{0}スコア]", this.Songs管理.nSongsDBへ出力できたスコア数); Trace.Unindent(); //----------------------------- #endregion @@ -608,10 +608,10 @@ namespace DTXMania finally { // base.eフェーズID = CStage.Eフェーズ.起動7_完了; - TimeSpan span = (TimeSpan) ( DateTime.Now - now ); - Trace.TraceInformation( "曲探索所要時間: {0}", span.ToString() ); + TimeSpan span = (TimeSpan)(DateTime.Now - now); + Trace.TraceInformation("曲探索所要時間: {0}", span.ToString()); } - lock ( this ) + lock (this) { // state = DTXEnumState.Done; // DoneにするのはCDTXMania.app.cs側にて。 state = DTXEnumState.Enumeratad; @@ -623,33 +623,33 @@ namespace DTXMania /// /// 曲リストのserialize /// - private static void SerializeSongList( CSongs管理 cs, string strPathSongList ) + private static void SerializeSongList(CSongs管理 cs, string strPathSongList) { bool bSucceededSerialize = true; Stream output = null; try { - output = File.Create( strPathSongList ); + output = File.Create(strPathSongList); BinaryFormatter formatter = new BinaryFormatter(); - formatter.Serialize( output, cs ); + formatter.Serialize(output, cs); } - catch ( Exception e ) + catch (Exception e) { bSucceededSerialize = false; - Trace.TraceError( e.Message ); - Trace.TraceError( e.StackTrace ); - Trace.TraceError( "例外が発生しましたが処理を継続します。" ); + Trace.TraceError(e.Message); + Trace.TraceError(e.StackTrace); + Trace.TraceError("例外が発生しましたが処理を継続します。"); } finally { output.Close(); - if ( !bSucceededSerialize ) + if (!bSucceededSerialize) { try { - File.Delete( strPathSongList ); // serializeに失敗したら、songs2.dbファイルを消しておく + File.Delete(strPathSongList); // serializeに失敗したら、songs2.dbファイルを消しておく } - catch ( Exception ) + catch (Exception) { // 特に何もしない } @@ -662,7 +662,7 @@ namespace DTXMania /// /// /// - private CSongs管理 Deserialize( string strPathSongList ) + private CSongs管理 Deserialize(string strPathSongList) { CSongs管理 songs管理 = null; try @@ -670,14 +670,14 @@ namespace DTXMania #region [ SongListDB(songlist.db)を読み込む ] // byte[] buf = File.ReadAllBytes( SongListDBファイル名 ); // 一旦メモリにまとめ読みしてからdeserializeした方が高速かと思ったら全く変わらなかったので削除 // using ( MemoryStream input = new MemoryStream(buf, false) ) - using ( Stream input = File.OpenRead( strPathSongList ) ) + using (Stream input = File.OpenRead(strPathSongList)) { try { BinaryFormatter formatter = new BinaryFormatter(); - songs管理 = (CSongs管理) formatter.Deserialize( input ); + songs管理 = (CSongs管理)formatter.Deserialize(input); } - catch ( Exception ) + catch (Exception) { // songs管理 = null; } @@ -686,7 +686,7 @@ namespace DTXMania } catch { - Trace.TraceError( "songlist.db の読み込みに失敗しました。" ); + Trace.TraceError("songlist.db の読み込みに失敗しました。"); } return songs管理; } diff --git a/DTXManiaプロジェクト/コード/ステージ/02.タイトル/CStageタイトル.cs b/DTXManiaプロジェクト/コード/ステージ/02.タイトル/CStageタイトル.cs index 8b61cb3d..a62d21b1 100644 --- a/DTXManiaプロジェクト/コード/ステージ/02.タイトル/CStageタイトル.cs +++ b/DTXManiaプロジェクト/コード/ステージ/02.タイトル/CStageタイトル.cs @@ -16,9 +16,9 @@ namespace DTXMania { base.eステージID = CStage.Eステージ.タイトル; base.b活性化してない = true; - base.list子Activities.Add( this.actFIfromSetup = new CActFIFOWhite() ); - base.list子Activities.Add( this.actFI = new CActFIFOWhite() ); - base.list子Activities.Add( this.actFO = new CActFIFOWhite() ); + base.list子Activities.Add(this.actFIfromSetup = new CActFIFOWhite()); + base.list子Activities.Add(this.actFI = new CActFIFOWhite()); + base.list子Activities.Add(this.actFO = new CActFIFOWhite()); } @@ -26,13 +26,13 @@ namespace DTXMania public override void On活性化() { - Trace.TraceInformation( "タイトルステージを活性化します。" ); + Trace.TraceInformation("タイトルステージを活性化します。"); Trace.Indent(); try { - for ( int i = 0; i < 4; i++ ) + for (int i = 0; i < 4; i++) { - this.ctキー反復用[ i ] = new CCounter( 0, 0, 0, CDTXMania.app.Timer ); + this.ctキー反復用[i] = new CCounter(0, 0, 0, CDTXMania.app.Timer); } this.ct上移動用 = new CCounter(); this.ct下移動用 = new CCounter(); @@ -41,19 +41,19 @@ namespace DTXMania } finally { - Trace.TraceInformation( "タイトルステージの活性化を完了しました。" ); + Trace.TraceInformation("タイトルステージの活性化を完了しました。"); Trace.Unindent(); } } public override void On非活性化() { - Trace.TraceInformation( "タイトルステージを非活性化します。" ); + Trace.TraceInformation("タイトルステージを非活性化します。"); Trace.Indent(); try { - for ( int i = 0; i < 4; i++ ) + for (int i = 0; i < 4; i++) { - this.ctキー反復用[ i ] = null; + this.ctキー反復用[i] = null; } this.ct上移動用 = null; this.ct下移動用 = null; @@ -61,46 +61,46 @@ namespace DTXMania } finally { - Trace.TraceInformation( "タイトルステージの非活性化を完了しました。" ); + Trace.TraceInformation("タイトルステージの非活性化を完了しました。"); Trace.Unindent(); } base.On非活性化(); } public override void OnManagedリソースの作成() { - if ( !base.b活性化してない ) + if (!base.b活性化してない) { - this.tx背景 = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenTitle background.jpg" ), false ); - this.txメニュー = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenTitle menu.png" ), false ); + this.tx背景 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenTitle background.jpg"), false); + this.txメニュー = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenTitle menu.png"), false); - prvFont = new CPrivateFastFont( CSkin.Path( @"Graphics\fonts\mplus-1p-heavy.ttf" ), 36 ); + prvFont = new CPrivateFastFont(CSkin.Path(@"Graphics\fonts\mplus-1p-heavy.ttf"), 36); //prvFont = new CPrivateFont( new FontFamily("MS UI Gothic"), 36, FontStyle.Bold ); string[] menuStr = { "START", "CONFIGURATION", "EXIT" }; - this.txMenuItem = new CTexture[ menuStr.Length ]; - this.stMenuItem = new STMenuItem[ menuStr.Length ]; + this.txMenuItem = new CTexture[menuStr.Length]; + this.stMenuItem = new STMenuItem[menuStr.Length]; // メニュー項目に対応したテクスチャ画像を生成しつつ、テクスチャ画像の最大横幅を取得しておく int maxX = 0; - for ( int i = 0; i < menuStr.Length; i++ ) + for (int i = 0; i < menuStr.Length; i++) { - txMenuItem[ i ] = TextureFactory.tテクスチャの生成( prvFont.DrawPrivateFont( menuStr[ i ], Color.White, Color.Black ), false ); + txMenuItem[i] = TextureFactory.tテクスチャの生成(prvFont.DrawPrivateFont(menuStr[i], Color.White, Color.Black), false); // txMenuItem[ i ] = prvFont.DrawPrivateFont( menuStr[ i ], Color.White, Color.Black, Color.Yellow, Color.OrangeRed ); // グラデーションもなかなかいける。 // txMenuItem[ i ] = prvFont.DrawPrivateFont( menuStr[ i ], Color.White ); - if ( maxX < txMenuItem[ i ].szテクスチャサイズ.Width ) + if (maxX < txMenuItem[i].szテクスチャサイズ.Width) { - maxX = txMenuItem[ i ].szテクスチャサイズ.Width; + maxX = txMenuItem[i].szテクスチャサイズ.Width; } } // センタリング表示するために、X座標のオフセット値を算出・格納する - for ( int i = 0; i < menuStr.Length; i++ ) + for (int i = 0; i < menuStr.Length; i++) { - stMenuItem[ i ] = new STMenuItem(); - stMenuItem[ i ].txMenuItem = txMenuItem[ i ]; - stMenuItem[ i ].offsetX = ( maxX - txMenuItem[ i ].szテクスチャサイズ.Width ) / 2; + stMenuItem[i] = new STMenuItem(); + stMenuItem[i].txMenuItem = txMenuItem[i]; + stMenuItem[i].offsetX = (maxX - txMenuItem[i].szテクスチャサイズ.Width) / 2; } prvFont.Dispose(); - MENU_X = ( SampleFramework.GameWindowSize.Width - maxX ) / 2; + MENU_X = (SampleFramework.GameWindowSize.Width - maxX) / 2; MENU_Y = 600; base.OnManagedリソースの作成(); @@ -110,29 +110,29 @@ namespace DTXMania public override void OnManagedリソースの解放() { - if ( !base.b活性化してない ) + if (!base.b活性化してない) { - for ( int i = 0; i < txMenuItem.Length; i++ ) + for (int i = 0; i < txMenuItem.Length; i++) { - if ( txMenuItem[ i ] != null ) + if (txMenuItem[i] != null) { - TextureFactory.tテクスチャの解放( ref txMenuItem[ i ] ); + TextureFactory.tテクスチャの解放(ref txMenuItem[i]); } } - TextureFactory.tテクスチャの解放( ref this.tx背景 ); - TextureFactory.tテクスチャの解放( ref this.txメニュー ); + TextureFactory.tテクスチャの解放(ref this.tx背景); + TextureFactory.tテクスチャの解放(ref this.txメニュー); base.OnManagedリソースの解放(); } } public override int On進行描画() { - if ( !base.b活性化してない ) + if (!base.b活性化してない) { #region [ 初めての進行描画 ] //--------------------- - if ( base.b初めての進行描画 ) + if (base.b初めての進行描画) { - if ( CDTXMania.app.r直前のステージ == CDTXMania.app.stage起動 ) + if (CDTXMania.app.r直前のステージ == CDTXMania.app.stage起動) { this.actFIfromSetup.tフェードイン開始(); base.eフェーズID = CStage.Eフェーズ.タイトル_起動画面からのフェードイン; @@ -142,7 +142,7 @@ namespace DTXMania this.actFI.tフェードイン開始(); base.eフェーズID = CStage.Eフェーズ.共通_フェードイン; } - this.ctカーソルフラッシュ用.t開始( 0, 700, 5, CDTXMania.app.Timer ); + this.ctカーソルフラッシュ用.t開始(0, 700, 5, CDTXMania.app.Timer); this.ctカーソルフラッシュ用.n現在の値 = 100; base.b初めての進行描画 = false; } @@ -153,10 +153,10 @@ namespace DTXMania #region [ カーソル上移動 ] //--------------------- - if ( this.ct上移動用.b進行中 ) + if (this.ct上移動用.b進行中) { this.ct上移動用.t進行(); - if ( this.ct上移動用.b終了値に達した ) + if (this.ct上移動用.b終了値に達した) { this.ct上移動用.t停止(); } @@ -165,10 +165,10 @@ namespace DTXMania #endregion #region [ カーソル下移動 ] //--------------------- - if ( this.ct下移動用.b進行中 ) + if (this.ct下移動用.b進行中) { this.ct下移動用.t進行(); - if ( this.ct下移動用.b終了値に達した ) + if (this.ct下移動用.b終了値に達した) { this.ct下移動用.t停止(); } @@ -182,25 +182,25 @@ namespace DTXMania #endregion #region [ キー入力 ] - if ( base.eフェーズID == CStage.Eフェーズ.共通_通常状態 // 通常状態、かつ - && CDTXMania.app.act現在入力を占有中のプラグイン == null ) // プラグインの入力占有がない + if (base.eフェーズID == CStage.Eフェーズ.共通_通常状態 // 通常状態、かつ + && CDTXMania.app.act現在入力を占有中のプラグイン == null) // プラグインの入力占有がない { - if ( CDTXMania.app.Input管理.Keyboard.bキーが押された( (int) Key.Escape ) ) - return (int) E戻り値.EXIT; + if (CDTXMania.app.Input管理.Keyboard.bキーが押された((int)Key.Escape)) + return (int)E戻り値.EXIT; - this.ctキー反復用.Up.tキー反復( CDTXMania.app.Input管理.Keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.UpArrow ), new CCounter.DGキー処理( this.tカーソルを上へ移動する ) ); - this.ctキー反復用.R.tキー反復( CDTXMania.app.Pad.b押されているGB( Eパッド.HH ), new CCounter.DGキー処理( this.tカーソルを上へ移動する ) ); - if ( CDTXMania.app.Pad.b押された( E楽器パート.DRUMS, Eパッド.SD ) ) + this.ctキー反復用.Up.tキー反復(CDTXMania.app.Input管理.Keyboard.bキーが押されている((int)SlimDX.DirectInput.Key.UpArrow), new CCounter.DGキー処理(this.tカーソルを上へ移動する)); + this.ctキー反復用.R.tキー反復(CDTXMania.app.Pad.b押されているGB(Eパッド.HH), new CCounter.DGキー処理(this.tカーソルを上へ移動する)); + if (CDTXMania.app.Pad.b押された(E楽器パート.DRUMS, Eパッド.SD)) this.tカーソルを上へ移動する(); - this.ctキー反復用.Down.tキー反復( CDTXMania.app.Input管理.Keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.DownArrow ), new CCounter.DGキー処理( this.tカーソルを下へ移動する ) ); - this.ctキー反復用.B.tキー反復( CDTXMania.app.Pad.b押されているGB( Eパッド.BD ), new CCounter.DGキー処理( this.tカーソルを下へ移動する ) ); - if ( CDTXMania.app.Pad.b押された( E楽器パート.DRUMS, Eパッド.LT ) ) + this.ctキー反復用.Down.tキー反復(CDTXMania.app.Input管理.Keyboard.bキーが押されている((int)SlimDX.DirectInput.Key.DownArrow), new CCounter.DGキー処理(this.tカーソルを下へ移動する)); + this.ctキー反復用.B.tキー反復(CDTXMania.app.Pad.b押されているGB(Eパッド.BD), new CCounter.DGキー処理(this.tカーソルを下へ移動する)); + if (CDTXMania.app.Pad.b押された(E楽器パート.DRUMS, Eパッド.LT)) this.tカーソルを下へ移動する(); - if ( ( CDTXMania.app.Pad.b押されたDGB( Eパッド.CY ) || CDTXMania.app.Pad.b押された( E楽器パート.DRUMS, Eパッド.RD ) ) || ( CDTXMania.app.Pad.b押された( E楽器パート.DRUMS, Eパッド.LC ) || ( CDTXMania.app.ConfigIni.bEnterがキー割り当てのどこにも使用されていない && CDTXMania.app.Input管理.Keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.Return ) ) ) ) + if ((CDTXMania.app.Pad.b押されたDGB(Eパッド.CY) || CDTXMania.app.Pad.b押された(E楽器パート.DRUMS, Eパッド.RD)) || (CDTXMania.app.Pad.b押された(E楽器パート.DRUMS, Eパッド.LC) || (CDTXMania.app.ConfigIni.bEnterがキー割り当てのどこにも使用されていない && CDTXMania.app.Input管理.Keyboard.bキーが押された((int)SlimDX.DirectInput.Key.Return)))) { - if ( ( this.n現在のカーソル行 == (int) E戻り値.GAMESTART - 1 ) && CDTXMania.app.Skin.soundゲーム開始音.b読み込み成功 ) + if ((this.n現在のカーソル行 == (int)E戻り値.GAMESTART - 1) && CDTXMania.app.Skin.soundゲーム開始音.b読み込み成功) { CDTXMania.app.Skin.soundゲーム開始音.t再生する(); } @@ -208,9 +208,9 @@ namespace DTXMania { CDTXMania.app.Skin.sound決定音.t再生する(); } - if ( this.n現在のカーソル行 == (int) E戻り値.EXIT - 1 ) + if (this.n現在のカーソル行 == (int)E戻り値.EXIT - 1) { - return (int) E戻り値.EXIT; + return (int)E戻り値.EXIT; } this.actFO.tフェードアウト開始(); base.eフェーズID = CStage.Eフェーズ.共通_フェードアウト; @@ -223,37 +223,37 @@ namespace DTXMania // 描画 #region [ 背景描画 ] - if ( this.tx背景 != null ) - this.tx背景.t2D描画( CDTXMania.app.Device, 0, 0 ); + if (this.tx背景 != null) + this.tx背景.t2D描画(CDTXMania.app.Device, 0, 0); #endregion #region [ メニュー枠描画 ] - if ( this.txメニュー != null ) + if (this.txメニュー != null) { - int MENU_ITEM_H = txMenuItem[ 0 ].szテクスチャサイズ.Height; - int x = ( 1920 - txメニュー.szテクスチャサイズ.Width ) / 2; // MENU_X; - int y = MENU_Y + ( ( MENU_ITEM_H - MENU_H ) / 2 ) + ( this.n現在のカーソル行 * MENU_ITEM_H ); - if ( this.ct上移動用.b進行中 ) + int MENU_ITEM_H = txMenuItem[0].szテクスチャサイズ.Height; + int x = (1920 - txメニュー.szテクスチャサイズ.Width) / 2; // MENU_X; + int y = MENU_Y + ((MENU_ITEM_H - MENU_H) / 2) + (this.n現在のカーソル行 * MENU_ITEM_H); + if (this.ct上移動用.b進行中) { - y += (int) ( (double) MENU_ITEM_H / 2 * ( Math.Cos( Math.PI * ( ( (double) this.ct上移動用.n現在の値 ) / 100.0 ) ) + 1.0 ) ); + y += (int)((double)MENU_ITEM_H / 2 * (Math.Cos(Math.PI * (((double)this.ct上移動用.n現在の値) / 100.0)) + 1.0)); } - else if ( this.ct下移動用.b進行中 ) + else if (this.ct下移動用.b進行中) { - y -= (int) ( (double) MENU_ITEM_H / 2 * ( Math.Cos( Math.PI * ( ( (double) this.ct下移動用.n現在の値 ) / 100.0 ) ) + 1.0 ) ); + y -= (int)((double)MENU_ITEM_H / 2 * (Math.Cos(Math.PI * (((double)this.ct下移動用.n現在の値) / 100.0)) + 1.0)); } - if ( this.ctカーソルフラッシュ用.n現在の値 <= 100 ) + if (this.ctカーソルフラッシュ用.n現在の値 <= 100) { - float nMag = (float) ( 1.0 + ( ( ( (double) this.ctカーソルフラッシュ用.n現在の値 ) / 100.0 ) * 0.5 ) ); + float nMag = (float)(1.0 + ((((double)this.ctカーソルフラッシュ用.n現在の値) / 100.0) * 0.5)); this.txメニュー.vc拡大縮小倍率.X = nMag; this.txメニュー.vc拡大縮小倍率.Y = nMag; - this.txメニュー.n透明度 = (int) ( 255.0 * ( 1.0 - ( ( (double) this.ctカーソルフラッシュ用.n現在の値 ) / 100.0 ) ) ); - int x_magnified = x + ( (int) ( ( MENU_W * ( 1.0 - nMag ) ) / 2.0 ) ); - int y_magnified = y + ( (int) ( ( MENU_H * ( 1.0 - nMag ) ) / 2.0 ) ); - this.txメニュー.t2D描画( CDTXMania.app.Device, x_magnified, y_magnified, new Rectangle( 0, MENU_H * 1, MENU_W, MENU_H ) ); + this.txメニュー.n透明度 = (int)(255.0 * (1.0 - (((double)this.ctカーソルフラッシュ用.n現在の値) / 100.0))); + int x_magnified = x + ((int)((MENU_W * (1.0 - nMag)) / 2.0)); + int y_magnified = y + ((int)((MENU_H * (1.0 - nMag)) / 2.0)); + this.txメニュー.t2D描画(CDTXMania.app.Device, x_magnified, y_magnified, new Rectangle(0, MENU_H * 1, MENU_W, MENU_H)); } this.txメニュー.vc拡大縮小倍率.X = 1f; this.txメニュー.vc拡大縮小倍率.Y = 1f; this.txメニュー.n透明度 = 0xff; - this.txメニュー.t2D描画( CDTXMania.app.Device, x, y, new Rectangle( 0, MENU_H * 0, MENU_W, MENU_H ) ); + this.txメニュー.t2D描画(CDTXMania.app.Device, x, y, new Rectangle(0, MENU_H * 0, MENU_W, MENU_H)); } #endregion @@ -261,19 +261,19 @@ namespace DTXMania // if ( this.txメニュー != null ) { int offsetY = 0; - for ( int i = 0; i < txMenuItem.Length; i++ ) + for (int i = 0; i < txMenuItem.Length; i++) { - this.txMenuItem[ i ].t2D描画( CDTXMania.app.Device, MENU_X + this.stMenuItem[ i ].offsetX, MENU_Y + offsetY ); - offsetY += this.txMenuItem[ i ].sz画像サイズ.Height; + this.txMenuItem[i].t2D描画(CDTXMania.app.Device, MENU_X + this.stMenuItem[i].offsetX, MENU_Y + offsetY); + offsetY += this.txMenuItem[i].sz画像サイズ.Height; } } #endregion #region [ フェーズ移行処理 ] CStage.Eフェーズ eフェーズid = base.eフェーズID; - switch ( eフェーズid ) + switch (eフェーズid) { case CStage.Eフェーズ.共通_フェードイン: - if ( this.actFI.On進行描画() != 0 ) + if (this.actFI.On進行描画() != 0) { CDTXMania.app.Skin.soundタイトル音.t再生する(); base.eフェーズID = CStage.Eフェーズ.共通_通常状態; @@ -281,27 +281,27 @@ namespace DTXMania break; case CStage.Eフェーズ.共通_フェードアウト: - if ( this.actFO.On進行描画() == 0 ) + if (this.actFO.On進行描画() == 0) { break; } base.eフェーズID = CStage.Eフェーズ.共通_終了状態; - switch ( this.n現在のカーソル行 ) + switch (this.n現在のカーソル行) { - case (int) E戻り値.GAMESTART - 1: - return (int) E戻り値.GAMESTART; + case (int)E戻り値.GAMESTART - 1: + return (int)E戻り値.GAMESTART; - case (int) E戻り値.CONFIG - 1: - return (int) E戻り値.CONFIG; + case (int)E戻り値.CONFIG - 1: + return (int)E戻り値.CONFIG; - case (int) E戻り値.EXIT - 1: - return (int) E戻り値.EXIT; + case (int)E戻り値.EXIT - 1: + return (int)E戻り値.EXIT; //return ( this.n現在のカーソル行 + 1 ); } break; case CStage.Eフェーズ.タイトル_起動画面からのフェードイン: - if ( this.actFIfromSetup.On進行描画() != 0 ) + if (this.actFIfromSetup.On進行描画() != 0) { CDTXMania.app.Skin.soundタイトル音.t再生する(); base.eフェーズID = CStage.Eフェーズ.共通_通常状態; @@ -326,18 +326,18 @@ namespace DTXMania #region [ private ] //----------------- - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] private struct STキー反復用カウンタ { public CCounter Up; public CCounter Down; public CCounter R; public CCounter B; - public CCounter this[ int index ] + public CCounter this[int index] { get { - switch ( index ) + switch (index) { case 0: return this.Up; @@ -355,7 +355,7 @@ namespace DTXMania } set { - switch ( index ) + switch (index) { case 0: this.Up = value; @@ -385,8 +385,8 @@ namespace DTXMania private STキー反復用カウンタ ctキー反復用; private CCounter ct下移動用; private CCounter ct上移動用; - private int MENU_H = (int) ( 39 * 2.25 ); - private int MENU_W = (int) ( 227 * 3 ); + private int MENU_H = (int)(39 * 2.25); + private int MENU_W = (int)(227 * 3); private int MENU_X = 800; //206; private int MENU_Y = 500; //203; private int n現在のカーソル行; @@ -404,12 +404,12 @@ namespace DTXMania private void tカーソルを下へ移動する() { - if ( this.n現在のカーソル行 != (int) E戻り値.EXIT - 1 ) + if (this.n現在のカーソル行 != (int)E戻り値.EXIT - 1) { CDTXMania.app.Skin.soundカーソル移動音.t再生する(); this.n現在のカーソル行++; - this.ct下移動用.t開始( 0, 100, 1, CDTXMania.app.Timer ); - if ( this.ct上移動用.b進行中 ) + this.ct下移動用.t開始(0, 100, 1, CDTXMania.app.Timer); + if (this.ct上移動用.b進行中) { this.ct下移動用.n現在の値 = 100 - this.ct上移動用.n現在の値; this.ct上移動用.t停止(); @@ -418,12 +418,12 @@ namespace DTXMania } private void tカーソルを上へ移動する() { - if ( this.n現在のカーソル行 != (int) E戻り値.GAMESTART - 1 ) + if (this.n現在のカーソル行 != (int)E戻り値.GAMESTART - 1) { CDTXMania.app.Skin.soundカーソル移動音.t再生する(); this.n現在のカーソル行--; - this.ct上移動用.t開始( 0, 100, 1, CDTXMania.app.Timer ); - if ( this.ct下移動用.b進行中 ) + this.ct上移動用.t開始(0, 100, 1, CDTXMania.app.Timer); + if (this.ct下移動用.b進行中) { this.ct上移動用.n現在の値 = 100 - this.ct下移動用.n現在の値; this.ct下移動用.t停止(); diff --git a/DTXManiaプロジェクト/コード/ステージ/04.コンフィグ/CActConfigKeyAssign.cs b/DTXManiaプロジェクト/コード/ステージ/04.コンフィグ/CActConfigKeyAssign.cs index c1084fd3..f69e608d 100644 --- a/DTXManiaプロジェクト/コード/ステージ/04.コンフィグ/CActConfigKeyAssign.cs +++ b/DTXManiaプロジェクト/コード/ステージ/04.コンフィグ/CActConfigKeyAssign.cs @@ -28,35 +28,35 @@ namespace DTXMania // メソッド - public void t開始( EKeyConfigPart part, EKeyConfigPad pad, string strパッド名 ) + public void t開始(EKeyConfigPart part, EKeyConfigPad pad, string strパッド名) { - if( part != EKeyConfigPart.UNKNOWN ) + if (part != EKeyConfigPart.UNKNOWN) { this.part = part; this.pad = pad; this.strパッド名 = strパッド名; - for( int i = 0; i < 0x10; i++ ) + for (int i = 0; i < 0x10; i++) { - this.structReset用KeyAssign[ i ].入力デバイス = CDTXMania.app.ConfigIni.KeyAssign[ (int) part ][ (int) pad ][ i ].入力デバイス; - this.structReset用KeyAssign[ i ].ID = CDTXMania.app.ConfigIni.KeyAssign[ (int) part ][ (int) pad ][ i ].ID; - this.structReset用KeyAssign[ i ].コード = CDTXMania.app.ConfigIni.KeyAssign[ (int) part ][ (int) pad ][ i ].コード; + this.structReset用KeyAssign[i].入力デバイス = CDTXMania.app.ConfigIni.KeyAssign[(int)part][(int)pad][i].入力デバイス; + this.structReset用KeyAssign[i].ID = CDTXMania.app.ConfigIni.KeyAssign[(int)part][(int)pad][i].ID; + this.structReset用KeyAssign[i].コード = CDTXMania.app.ConfigIni.KeyAssign[(int)part][(int)pad][i].コード; } } } - + public void tEnter押下() { - if( !this.bキー入力待ち ) + if (!this.bキー入力待ち) { CDTXMania.app.Skin.sound決定音.t再生する(); - switch( this.n現在の選択行 ) + switch (this.n現在の選択行) { case 0x10: - for( int i = 0; i < 0x10; i++ ) + for (int i = 0; i < 0x10; i++) { - CDTXMania.app.ConfigIni.KeyAssign[ (int) this.part ][ (int) this.pad ][ i ].入力デバイス = this.structReset用KeyAssign[ i ].入力デバイス; - CDTXMania.app.ConfigIni.KeyAssign[ (int) this.part ][ (int) this.pad ][ i ].ID = this.structReset用KeyAssign[ i ].ID; - CDTXMania.app.ConfigIni.KeyAssign[ (int) this.part ][ (int) this.pad ][ i ].コード = this.structReset用KeyAssign[ i ].コード; + CDTXMania.app.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][i].入力デバイス = this.structReset用KeyAssign[i].入力デバイス; + CDTXMania.app.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][i].ID = this.structReset用KeyAssign[i].ID; + CDTXMania.app.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][i].コード = this.structReset用KeyAssign[i].コード; } return; @@ -69,22 +69,22 @@ namespace DTXMania } public void t次に移動() { - if( !this.bキー入力待ち ) + if (!this.bキー入力待ち) { CDTXMania.app.Skin.soundカーソル移動音.t再生する(); - this.n現在の選択行 = ( this.n現在の選択行 + 1 ) % 0x12; + this.n現在の選択行 = (this.n現在の選択行 + 1) % 0x12; } } public void t前に移動() { - if( !this.bキー入力待ち ) + if (!this.bキー入力待ち) { CDTXMania.app.Skin.soundカーソル移動音.t再生する(); - this.n現在の選択行 = ( ( this.n現在の選択行 - 1 ) + 0x12 ) % 0x12; + this.n現在の選択行 = ((this.n現在の選択行 - 1) + 0x12) % 0x12; } } - + // CActivity 実装 public override void On活性化() @@ -94,23 +94,23 @@ namespace DTXMania this.strパッド名 = ""; this.n現在の選択行 = 0; this.bキー入力待ち = false; - this.structReset用KeyAssign = new CConfigIni.CKeyAssign.STKEYASSIGN[ 0x10 ]; + this.structReset用KeyAssign = new CConfigIni.CKeyAssign.STKEYASSIGN[0x10]; base.On活性化(); } public override void On非活性化() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.txカーソル ); - TextureFactory.tテクスチャの解放( ref this.txHitKeyダイアログ ); + TextureFactory.tテクスチャの解放(ref this.txカーソル); + TextureFactory.tテクスチャの解放(ref this.txHitKeyダイアログ); base.On非活性化(); } } public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - this.prvFont = new CPrivateFastFont( CSkin.Path( @"Graphics\fonts\mplus-1p-heavy.ttf" ), (int) ( 18 * Scale.Y ) ); // t項目リストの設定 の前に必要 + this.prvFont = new CPrivateFastFont(CSkin.Path(@"Graphics\fonts\mplus-1p-heavy.ttf"), (int)(18 * Scale.Y)); // t項目リストの設定 の前に必要 this.txカーソル = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenConfig menu cursor.png"), false); this.txHitKeyダイアログ = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenConfig hit key to assign dialog.png"), false); base.OnManagedリソースの作成(); @@ -122,129 +122,129 @@ namespace DTXMania } public override int On進行描画() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - if( this.bキー入力待ち ) + if (this.bキー入力待ち) { - if( CDTXMania.app.Input管理.Keyboard.bキーが押された( (int)SlimDX.DirectInput.Key.Escape ) ) + if (CDTXMania.app.Input管理.Keyboard.bキーが押された((int)SlimDX.DirectInput.Key.Escape)) { CDTXMania.app.Skin.sound取消音.t再生する(); this.bキー入力待ち = false; - CDTXMania.app.Input管理.tポーリング( CDTXMania.app.bApplicationActive, false ); + CDTXMania.app.Input管理.tポーリング(CDTXMania.app.bApplicationActive, false); } - else if( ( this.tキーチェックとアサイン_Keyboard() || this.tキーチェックとアサイン_MidiIn() ) || ( this.tキーチェックとアサイン_Joypad() || this.tキーチェックとアサイン_Mouse() ) ) + else if ((this.tキーチェックとアサイン_Keyboard() || this.tキーチェックとアサイン_MidiIn()) || (this.tキーチェックとアサイン_Joypad() || this.tキーチェックとアサイン_Mouse())) { this.bキー入力待ち = false; - CDTXMania.app.Input管理.tポーリング( CDTXMania.app.bApplicationActive, false ); + CDTXMania.app.Input管理.tポーリング(CDTXMania.app.bApplicationActive, false); } } - else if( ( CDTXMania.app.Input管理.Keyboard.bキーが押された( (int)SlimDX.DirectInput.Key.Delete ) && ( this.n現在の選択行 >= 0 ) ) && ( this.n現在の選択行 <= 15 ) ) + else if ((CDTXMania.app.Input管理.Keyboard.bキーが押された((int)SlimDX.DirectInput.Key.Delete) && (this.n現在の選択行 >= 0)) && (this.n現在の選択行 <= 15)) { CDTXMania.app.Skin.sound決定音.t再生する(); - CDTXMania.app.ConfigIni.KeyAssign[ (int) this.part ][ (int) this.pad ][ this.n現在の選択行 ].入力デバイス = E入力デバイス.不明; - CDTXMania.app.ConfigIni.KeyAssign[ (int) this.part ][ (int) this.pad ][ this.n現在の選択行 ].ID = 0; - CDTXMania.app.ConfigIni.KeyAssign[ (int) this.part ][ (int) this.pad ][ this.n現在の選択行 ].コード = 0; + CDTXMania.app.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][this.n現在の選択行].入力デバイス = E入力デバイス.不明; + CDTXMania.app.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][this.n現在の選択行].ID = 0; + CDTXMania.app.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][this.n現在の選択行].コード = 0; } - if ( this.txカーソル != null ) + if (this.txカーソル != null) { int num = 20; int num2 = 0x144; - int num3 = 0x3e + ( num * ( this.n現在の選択行 + 1 ) ); - this.txカーソル.vc拡大縮小倍率 = new Vector3( 1f, 0.75f, 1f ); - this.txカーソル.t2D描画( CDTXMania.app.Device, num2 * Scale.X, num3 * Scale.Y - 6, new Rectangle( 0, 0, (int) ( 0x10 * Scale.X ), (int) ( 0x20 * Scale.Y ) ) ); + int num3 = 0x3e + (num * (this.n現在の選択行 + 1)); + this.txカーソル.vc拡大縮小倍率 = new Vector3(1f, 0.75f, 1f); + this.txカーソル.t2D描画(CDTXMania.app.Device, num2 * Scale.X, num3 * Scale.Y - 6, new Rectangle(0, 0, (int)(0x10 * Scale.X), (int)(0x20 * Scale.Y))); num2 += 0x10; - Rectangle rectangle = new Rectangle( (int) ( 8 * Scale.X ), 0, (int) ( 0x10 * Scale.X ), (int) ( 0x20 * Scale.Y ) ); - for ( int j = 0; j < 14; j++ ) + Rectangle rectangle = new Rectangle((int)(8 * Scale.X), 0, (int)(0x10 * Scale.X), (int)(0x20 * Scale.Y)); + for (int j = 0; j < 14; j++) { - this.txカーソル.t2D描画( CDTXMania.app.Device, num2 * Scale.X, num3 * Scale.Y - 6, rectangle ); + this.txカーソル.t2D描画(CDTXMania.app.Device, num2 * Scale.X, num3 * Scale.Y - 6, rectangle); num2 += 0x10; } - this.txカーソル.t2D描画( CDTXMania.app.Device, num2 * Scale.X, num3 * Scale.Y - 6, new Rectangle( (int) ( 0x10 * Scale.X ), 0, (int) ( 0x10 * Scale.X ), (int) ( 0x20 * Scale.Y ) ) ); + this.txカーソル.t2D描画(CDTXMania.app.Device, num2 * Scale.X, num3 * Scale.Y - 6, new Rectangle((int)(0x10 * Scale.X), 0, (int)(0x10 * Scale.X), (int)(0x20 * Scale.Y))); } int num5 = 20; int x = 0x134; int y = 0x40; //CDTXMania.app.stageコンフィグ.actFont.t文字列描画( x, y, this.strパッド名, false, 0.75f ); - Bitmap bmpStr = prvFont.DrawPrivateFont( this.strパッド名, Color.White, Color.Black ); - CTexture txStr = TextureFactory.tテクスチャの生成( bmpStr ); - txStr.vc拡大縮小倍率 = new Vector3( 0.75f, 0.75f, 1f ); - txStr.t2D描画( CDTXMania.app.Device, x * Scale.X, y * Scale.Y - 20 ); - TextureFactory.tテクスチャの解放( ref txStr ); - TextureFactory.t安全にDisposeする( ref txStr ); - TextureFactory.t安全にDisposeする( ref bmpStr ); + Bitmap bmpStr = prvFont.DrawPrivateFont(this.strパッド名, Color.White, Color.Black); + CTexture txStr = TextureFactory.tテクスチャの生成(bmpStr); + txStr.vc拡大縮小倍率 = new Vector3(0.75f, 0.75f, 1f); + txStr.t2D描画(CDTXMania.app.Device, x * Scale.X, y * Scale.Y - 20); + TextureFactory.tテクスチャの解放(ref txStr); + TextureFactory.t安全にDisposeする(ref txStr); + TextureFactory.t安全にDisposeする(ref bmpStr); y += num5; - CConfigIni.CKeyAssign.STKEYASSIGN[] stkeyassignArray = CDTXMania.app.ConfigIni.KeyAssign[ (int) this.part ][ (int) this.pad ]; + CConfigIni.CKeyAssign.STKEYASSIGN[] stkeyassignArray = CDTXMania.app.ConfigIni.KeyAssign[(int)this.part][(int)this.pad]; string strParam; bool b強調; - for ( int i = 0; i < 0x10; i++ ) + for (int i = 0; i < 0x10; i++) { - switch( stkeyassignArray[ i ].入力デバイス ) + switch (stkeyassignArray[i].入力デバイス) { case E入力デバイス.キーボード: - this.tアサインコードの描画_Keyboard( i + 1, x + 20, y, stkeyassignArray[ i ].ID, stkeyassignArray[ i ].コード, this.n現在の選択行 == i ); + this.tアサインコードの描画_Keyboard(i + 1, x + 20, y, stkeyassignArray[i].ID, stkeyassignArray[i].コード, this.n現在の選択行 == i); break; case E入力デバイス.MIDI入力: - this.tアサインコードの描画_MidiIn( i + 1, x + 20, y, stkeyassignArray[ i ].ID, stkeyassignArray[ i ].コード, this.n現在の選択行 == i ); + this.tアサインコードの描画_MidiIn(i + 1, x + 20, y, stkeyassignArray[i].ID, stkeyassignArray[i].コード, this.n現在の選択行 == i); break; case E入力デバイス.ジョイパッド: - this.tアサインコードの描画_Joypad( i + 1, x + 20, y, stkeyassignArray[ i ].ID, stkeyassignArray[ i ].コード, this.n現在の選択行 == i ); + this.tアサインコードの描画_Joypad(i + 1, x + 20, y, stkeyassignArray[i].ID, stkeyassignArray[i].コード, this.n現在の選択行 == i); break; case E入力デバイス.マウス: - this.tアサインコードの描画_Mouse( i + 1, x + 20, y, stkeyassignArray[ i ].ID, stkeyassignArray[ i ].コード, this.n現在の選択行 == i ); + this.tアサインコードの描画_Mouse(i + 1, x + 20, y, stkeyassignArray[i].ID, stkeyassignArray[i].コード, this.n現在の選択行 == i); break; default: - strParam = string.Format( "{0,2}.", i + 1 ); - b強調 = ( this.n現在の選択行 == i ); + strParam = string.Format("{0,2}.", i + 1); + b強調 = (this.n現在の選択行 == i); bmpStr = b強調 ? - prvFont.DrawPrivateFont( strParam, Color.White, Color.Black, Color.Yellow, Color.OrangeRed ) : - prvFont.DrawPrivateFont( strParam, Color.White, Color.Black ); - txStr = TextureFactory.tテクスチャの生成( bmpStr, false ); - txStr.vc拡大縮小倍率 = new Vector3( 0.75f, 0.75f, 1f ); - txStr.t2D描画( CDTXMania.app.Device, ( x + 20 ) * Scale.X, y * Scale.Y - 20 ); - TextureFactory.tテクスチャの解放( ref txStr ); - TextureFactory.t安全にDisposeする( ref txStr ); - TextureFactory.t安全にDisposeする( ref bmpStr ); + prvFont.DrawPrivateFont(strParam, Color.White, Color.Black, Color.Yellow, Color.OrangeRed) : + prvFont.DrawPrivateFont(strParam, Color.White, Color.Black); + txStr = TextureFactory.tテクスチャの生成(bmpStr, false); + txStr.vc拡大縮小倍率 = new Vector3(0.75f, 0.75f, 1f); + txStr.t2D描画(CDTXMania.app.Device, (x + 20) * Scale.X, y * Scale.Y - 20); + TextureFactory.tテクスチャの解放(ref txStr); + TextureFactory.t安全にDisposeする(ref txStr); + TextureFactory.t安全にDisposeする(ref bmpStr); //CDTXMania.app.stageコンフィグ.actFont.t文字列描画( x + 20, y, string.Format( "{0,2}.", i + 1 ), this.n現在の選択行 == i, 0.75f ); break; } y += num5; } strParam = "Reset"; - b強調 = ( this.n現在の選択行 == 0x10 ); + b強調 = (this.n現在の選択行 == 0x10); bmpStr = b強調 ? - prvFont.DrawPrivateFont( strParam, Color.White, Color.Black, Color.Yellow, Color.OrangeRed ) : - prvFont.DrawPrivateFont( strParam, Color.White, Color.Black ); - txStr = TextureFactory.tテクスチャの生成( bmpStr, false ); - txStr.vc拡大縮小倍率 = new Vector3( 0.75f, 0.75f, 1f ); - txStr.t2D描画( CDTXMania.app.Device, ( x + 20 ) * Scale.X, y * Scale.Y - 20 ); - TextureFactory.tテクスチャの解放( ref txStr ); - TextureFactory.t安全にDisposeする( ref txStr ); - TextureFactory.t安全にDisposeする( ref bmpStr ); + prvFont.DrawPrivateFont(strParam, Color.White, Color.Black, Color.Yellow, Color.OrangeRed) : + prvFont.DrawPrivateFont(strParam, Color.White, Color.Black); + txStr = TextureFactory.tテクスチャの生成(bmpStr, false); + txStr.vc拡大縮小倍率 = new Vector3(0.75f, 0.75f, 1f); + txStr.t2D描画(CDTXMania.app.Device, (x + 20) * Scale.X, y * Scale.Y - 20); + TextureFactory.tテクスチャの解放(ref txStr); + TextureFactory.t安全にDisposeする(ref txStr); + TextureFactory.t安全にDisposeする(ref bmpStr); y += num5; strParam = "<< Returnto List"; - b強調 = ( this.n現在の選択行 == 0x11 ); + b強調 = (this.n現在の選択行 == 0x11); bmpStr = b強調 ? - prvFont.DrawPrivateFont( strParam, Color.White, Color.Black, Color.Yellow, Color.OrangeRed ) : - prvFont.DrawPrivateFont( strParam, Color.White, Color.Black ); - txStr = TextureFactory.tテクスチャの生成( bmpStr, false ); - txStr.vc拡大縮小倍率 = new Vector3( 0.75f, 0.75f, 1f ); - txStr.t2D描画( CDTXMania.app.Device, ( x + 20 ) * Scale.X, y * Scale.Y - 20 ); - TextureFactory.tテクスチャの解放( ref txStr ); - TextureFactory.t安全にDisposeする( ref txStr ); - TextureFactory.t安全にDisposeする( ref bmpStr ); + prvFont.DrawPrivateFont(strParam, Color.White, Color.Black, Color.Yellow, Color.OrangeRed) : + prvFont.DrawPrivateFont(strParam, Color.White, Color.Black); + txStr = TextureFactory.tテクスチャの生成(bmpStr, false); + txStr.vc拡大縮小倍率 = new Vector3(0.75f, 0.75f, 1f); + txStr.t2D描画(CDTXMania.app.Device, (x + 20) * Scale.X, y * Scale.Y - 20); + TextureFactory.tテクスチャの解放(ref txStr); + TextureFactory.t安全にDisposeする(ref txStr); + TextureFactory.t安全にDisposeする(ref bmpStr); //CDTXMania.app.stageコンフィグ.actFont.t文字列描画( x + 20, y, "Reset", this.n現在の選択行 == 0x10, 0.75f ); //y += num5; //CDTXMania.app.stageコンフィグ.actFont.t文字列描画( x + 20, y, "<< Returnto List", this.n現在の選択行 == 0x11, 0.75f ); //y += num5; - if( this.bキー入力待ち && ( this.txHitKeyダイアログ != null ) ) + if (this.bキー入力待ち && (this.txHitKeyダイアログ != null)) { - this.txHitKeyダイアログ.t2D描画( CDTXMania.app.Device, 0x185 * Scale.X, 0xd7 * Scale.Y ); + this.txHitKeyダイアログ.t2D描画(CDTXMania.app.Device, 0x185 * Scale.X, 0xd7 * Scale.Y); } } return 0; @@ -255,12 +255,12 @@ namespace DTXMania #region [ private ] //----------------- - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] private struct STKEYLABEL { public int nCode; public string strLabel; - public STKEYLABEL( int nCode, string strLabel ) + public STKEYLABEL(int nCode, string strLabel) { this.nCode = nCode; this.strLabel = strLabel; @@ -288,10 +288,10 @@ namespace DTXMania private CTexture txカーソル; private CPrivateFastFont prvFont; - private void tアサインコードの描画_Joypad( int line, int x, int y, int nID, int nCode, bool b強調 ) + private void tアサインコードの描画_Joypad(int line, int x, int y, int nID, int nCode, bool b強調) { string str = ""; - switch( nCode ) + switch (nCode) { case 0: str = "Left"; @@ -318,101 +318,101 @@ namespace DTXMania break; default: - if( ( 6 <= nCode ) && ( nCode < 6 + 128 ) ) // other buttons (128 types) + if ((6 <= nCode) && (nCode < 6 + 128)) // other buttons (128 types) { - str = string.Format( "Button{0}", nCode - 5 ); + str = string.Format("Button{0}", nCode - 5); } - else if ( ( 6 + 128 <= nCode ) && ( nCode < 6 + 128 + 8 ) ) // POV HAT ( 8 types; 45 degrees per HATs) + else if ((6 + 128 <= nCode) && (nCode < 6 + 128 + 8)) // POV HAT ( 8 types; 45 degrees per HATs) { - str = string.Format( "POV {0}", ( nCode - 6 - 128 ) * 45 ); + str = string.Format("POV {0}", (nCode - 6 - 128) * 45); } else { - str = string.Format( "Code{0}", nCode ); + str = string.Format("Code{0}", nCode); } break; } Bitmap bmpStr = b強調 ? - prvFont.DrawPrivateFont( str, Color.White, Color.Black, Color.Yellow, Color.OrangeRed ) : - prvFont.DrawPrivateFont( str, Color.White, Color.Black ); - CTexture txStr = TextureFactory.tテクスチャの生成( bmpStr, false ); - txStr.vc拡大縮小倍率 = new Vector3( 0.75f, 0.75f, 1f ); - txStr.t2D描画( CDTXMania.app.Device, x * Scale.X, y * Scale.Y - 20 ); - TextureFactory.tテクスチャの解放( ref txStr ); - TextureFactory.t安全にDisposeする( ref txStr ); - TextureFactory.t安全にDisposeする( ref bmpStr ); + prvFont.DrawPrivateFont(str, Color.White, Color.Black, Color.Yellow, Color.OrangeRed) : + prvFont.DrawPrivateFont(str, Color.White, Color.Black); + CTexture txStr = TextureFactory.tテクスチャの生成(bmpStr, false); + txStr.vc拡大縮小倍率 = new Vector3(0.75f, 0.75f, 1f); + txStr.t2D描画(CDTXMania.app.Device, x * Scale.X, y * Scale.Y - 20); + TextureFactory.tテクスチャの解放(ref txStr); + TextureFactory.t安全にDisposeする(ref txStr); + TextureFactory.t安全にDisposeする(ref bmpStr); // CDTXMania.app.stageコンフィグ.actFont.t文字列描画( x, y, string.Format( "{0,2}. Joypad #{1} ", line, nID ) + str, b強調, 0.75f ); } - private void tアサインコードの描画_Keyboard( int line, int x, int y, int nID, int nCode, bool b強調 ) + private void tアサインコードの描画_Keyboard(int line, int x, int y, int nID, int nCode, bool b強調) { string str = null; - foreach( STKEYLABEL stkeylabel in this.KeyLabel ) + foreach (STKEYLABEL stkeylabel in this.KeyLabel) { - if( stkeylabel.nCode == nCode ) + if (stkeylabel.nCode == nCode) { - str = string.Format( "{0,2}. Key {1}", line, stkeylabel.strLabel ); + str = string.Format("{0,2}. Key {1}", line, stkeylabel.strLabel); break; } } - if( str == null ) + if (str == null) { - str = string.Format( "{0,2}. Key 0x{1:X2}", line, nCode ); + str = string.Format("{0,2}. Key 0x{1:X2}", line, nCode); } Bitmap bmpStr = b強調 ? - prvFont.DrawPrivateFont( str, Color.White, Color.Black, Color.Yellow, Color.OrangeRed ) : - prvFont.DrawPrivateFont( str, Color.White, Color.Black ); - CTexture txStr = TextureFactory.tテクスチャの生成( bmpStr, false ); - txStr.vc拡大縮小倍率 = new Vector3( 0.75f, 0.75f, 1f ); - txStr.t2D描画( CDTXMania.app.Device, x * Scale.X, y * Scale.Y - 20 ); - TextureFactory.tテクスチャの解放( ref txStr ); - TextureFactory.t安全にDisposeする( ref txStr ); - TextureFactory.t安全にDisposeする( ref bmpStr ); + prvFont.DrawPrivateFont(str, Color.White, Color.Black, Color.Yellow, Color.OrangeRed) : + prvFont.DrawPrivateFont(str, Color.White, Color.Black); + CTexture txStr = TextureFactory.tテクスチャの生成(bmpStr, false); + txStr.vc拡大縮小倍率 = new Vector3(0.75f, 0.75f, 1f); + txStr.t2D描画(CDTXMania.app.Device, x * Scale.X, y * Scale.Y - 20); + TextureFactory.tテクスチャの解放(ref txStr); + TextureFactory.t安全にDisposeする(ref txStr); + TextureFactory.t安全にDisposeする(ref bmpStr); //CDTXMania.app.stageコンフィグ.actFont.t文字列描画( x, y, str, b強調, 0.75f ); } - private void tアサインコードの描画_MidiIn( int line, int x, int y, int nID, int nCode, bool b強調 ) + private void tアサインコードの描画_MidiIn(int line, int x, int y, int nID, int nCode, bool b強調) { - string str = string.Format( "{0,2}. MidiIn #{1} code.{2}", line, nID, nCode ); + string str = string.Format("{0,2}. MidiIn #{1} code.{2}", line, nID, nCode); Bitmap bmpStr = b強調 ? - prvFont.DrawPrivateFont( str, Color.White, Color.Black, Color.Yellow, Color.OrangeRed ) : - prvFont.DrawPrivateFont( str, Color.White, Color.Black ); - CTexture txStr = TextureFactory.tテクスチャの生成( bmpStr, false ); - txStr.vc拡大縮小倍率 = new Vector3( 0.75f, 0.75f, 1f ); - txStr.t2D描画( CDTXMania.app.Device, x * Scale.X, y * Scale.Y - 20 ); - TextureFactory.tテクスチャの解放( ref txStr ); - TextureFactory.t安全にDisposeする( ref txStr ); - TextureFactory.t安全にDisposeする( ref bmpStr ); + prvFont.DrawPrivateFont(str, Color.White, Color.Black, Color.Yellow, Color.OrangeRed) : + prvFont.DrawPrivateFont(str, Color.White, Color.Black); + CTexture txStr = TextureFactory.tテクスチャの生成(bmpStr, false); + txStr.vc拡大縮小倍率 = new Vector3(0.75f, 0.75f, 1f); + txStr.t2D描画(CDTXMania.app.Device, x * Scale.X, y * Scale.Y - 20); + TextureFactory.tテクスチャの解放(ref txStr); + TextureFactory.t安全にDisposeする(ref txStr); + TextureFactory.t安全にDisposeする(ref bmpStr); //CDTXMania.app.stageコンフィグ.actFont.t文字列描画( x, y, string.Format( "{0,2}. MidiIn #{1} code.{2}", line, nID, nCode ), b強調, 0.75f ); } - private void tアサインコードの描画_Mouse( int line, int x, int y, int nID, int nCode, bool b強調 ) + private void tアサインコードの描画_Mouse(int line, int x, int y, int nID, int nCode, bool b強調) { - string str = string.Format( "{0,2}. Mouse Button{1}", line, nCode ); + string str = string.Format("{0,2}. Mouse Button{1}", line, nCode); Bitmap bmpStr = b強調 ? - prvFont.DrawPrivateFont( str, Color.White, Color.Black, Color.Yellow, Color.OrangeRed ) : - prvFont.DrawPrivateFont( str, Color.White, Color.Black ); - CTexture txStr = TextureFactory.tテクスチャの生成( bmpStr, false ); - txStr.vc拡大縮小倍率 = new Vector3( 0.75f, 0.75f, 1f ); - txStr.t2D描画( CDTXMania.app.Device, x * Scale.X, y * Scale.Y - 20 ); - TextureFactory.tテクスチャの解放( ref txStr ); - TextureFactory.t安全にDisposeする( ref txStr ); - TextureFactory.t安全にDisposeする( ref bmpStr ); + prvFont.DrawPrivateFont(str, Color.White, Color.Black, Color.Yellow, Color.OrangeRed) : + prvFont.DrawPrivateFont(str, Color.White, Color.Black); + CTexture txStr = TextureFactory.tテクスチャの生成(bmpStr, false); + txStr.vc拡大縮小倍率 = new Vector3(0.75f, 0.75f, 1f); + txStr.t2D描画(CDTXMania.app.Device, x * Scale.X, y * Scale.Y - 20); + TextureFactory.tテクスチャの解放(ref txStr); + TextureFactory.t安全にDisposeする(ref txStr); + TextureFactory.t安全にDisposeする(ref bmpStr); //CDTXMania.app.stageコンフィグ.actFont.t文字列描画( x, y, string.Format( "{0,2}. Mouse Button{1}", line, nCode ), b強調, 0.75f ); } private bool tキーチェックとアサイン_Joypad() { - foreach( IInputDevice device in CDTXMania.app.Input管理.list入力デバイス ) + foreach (IInputDevice device in CDTXMania.app.Input管理.list入力デバイス) { - if( device.e入力デバイス種別 == E入力デバイス種別.Joystick ) + if (device.e入力デバイス種別 == E入力デバイス種別.Joystick) { - for( int i = 0; i < 6 + 0x80 + 8; i++ ) // +6 for Axis, +8 for HAT + for (int i = 0; i < 6 + 0x80 + 8; i++) // +6 for Axis, +8 for HAT { - if( device.bキーが押された( i ) ) + if (device.bキーが押された(i)) { CDTXMania.app.Skin.sound決定音.t再生する(); - CDTXMania.app.ConfigIni.t指定した入力が既にアサイン済みである場合はそれを全削除する( E入力デバイス.ジョイパッド, device.ID, i ); - CDTXMania.app.ConfigIni.KeyAssign[ (int) this.part ][ (int) this.pad ][ this.n現在の選択行 ].入力デバイス = E入力デバイス.ジョイパッド; - CDTXMania.app.ConfigIni.KeyAssign[ (int) this.part ][ (int) this.pad ][ this.n現在の選択行 ].ID = device.ID; - CDTXMania.app.ConfigIni.KeyAssign[ (int) this.part ][ (int) this.pad ][ this.n現在の選択行 ].コード = i; + CDTXMania.app.ConfigIni.t指定した入力が既にアサイン済みである場合はそれを全削除する(E入力デバイス.ジョイパッド, device.ID, i); + CDTXMania.app.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][this.n現在の選択行].入力デバイス = E入力デバイス.ジョイパッド; + CDTXMania.app.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][this.n現在の選択行].ID = device.ID; + CDTXMania.app.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][this.n現在の選択行].コード = i; return true; } } @@ -422,21 +422,21 @@ namespace DTXMania } private bool tキーチェックとアサイン_Keyboard() { - for( int i = 0; i < 0x100; i++ ) + for (int i = 0; i < 0x100; i++) { - if( i != (int)SlimDX.DirectInput.Key.Escape && + if (i != (int)SlimDX.DirectInput.Key.Escape && i != (int)SlimDX.DirectInput.Key.UpArrow && i != (int)SlimDX.DirectInput.Key.DownArrow && i != (int)SlimDX.DirectInput.Key.LeftArrow && i != (int)SlimDX.DirectInput.Key.RightArrow && i != (int)SlimDX.DirectInput.Key.Delete && - CDTXMania.app.Input管理.Keyboard.bキーが押された( i ) ) + CDTXMania.app.Input管理.Keyboard.bキーが押された(i)) { CDTXMania.app.Skin.sound決定音.t再生する(); - CDTXMania.app.ConfigIni.t指定した入力が既にアサイン済みである場合はそれを全削除する( E入力デバイス.キーボード, 0, i ); - CDTXMania.app.ConfigIni.KeyAssign[ (int) this.part ][ (int) this.pad ][ this.n現在の選択行 ].入力デバイス = E入力デバイス.キーボード; - CDTXMania.app.ConfigIni.KeyAssign[ (int) this.part ][ (int) this.pad ][ this.n現在の選択行 ].ID = 0; - CDTXMania.app.ConfigIni.KeyAssign[ (int) this.part ][ (int) this.pad ][ this.n現在の選択行 ].コード = i; + CDTXMania.app.ConfigIni.t指定した入力が既にアサイン済みである場合はそれを全削除する(E入力デバイス.キーボード, 0, i); + CDTXMania.app.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][this.n現在の選択行].入力デバイス = E入力デバイス.キーボード; + CDTXMania.app.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][this.n現在の選択行].ID = 0; + CDTXMania.app.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][this.n現在の選択行].コード = i; return true; } } @@ -444,19 +444,19 @@ namespace DTXMania } private bool tキーチェックとアサイン_MidiIn() { - foreach( IInputDevice device in CDTXMania.app.Input管理.list入力デバイス ) + foreach (IInputDevice device in CDTXMania.app.Input管理.list入力デバイス) { - if( device.e入力デバイス種別 == E入力デバイス種別.MidiIn ) + if (device.e入力デバイス種別 == E入力デバイス種別.MidiIn) { - for( int i = 0; i < 0x100; i++ ) + for (int i = 0; i < 0x100; i++) { - if( device.bキーが押された( i ) ) + if (device.bキーが押された(i)) { CDTXMania.app.Skin.sound決定音.t再生する(); - CDTXMania.app.ConfigIni.t指定した入力が既にアサイン済みである場合はそれを全削除する( E入力デバイス.MIDI入力, device.ID, i ); - CDTXMania.app.ConfigIni.KeyAssign[ (int) this.part ][ (int) this.pad ][ this.n現在の選択行 ].入力デバイス = E入力デバイス.MIDI入力; - CDTXMania.app.ConfigIni.KeyAssign[ (int) this.part ][ (int) this.pad ][ this.n現在の選択行 ].ID = device.ID; - CDTXMania.app.ConfigIni.KeyAssign[ (int) this.part ][ (int) this.pad ][ this.n現在の選択行 ].コード = i; + CDTXMania.app.ConfigIni.t指定した入力が既にアサイン済みである場合はそれを全削除する(E入力デバイス.MIDI入力, device.ID, i); + CDTXMania.app.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][this.n現在の選択行].入力デバイス = E入力デバイス.MIDI入力; + CDTXMania.app.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][this.n現在の選択行].ID = device.ID; + CDTXMania.app.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][this.n現在の選択行].コード = i; return true; } } @@ -466,14 +466,14 @@ namespace DTXMania } private bool tキーチェックとアサイン_Mouse() { - for( int i = 0; i < 8; i++ ) + for (int i = 0; i < 8; i++) { - if( CDTXMania.app.Input管理.Mouse.bキーが押された( i ) ) + if (CDTXMania.app.Input管理.Mouse.bキーが押された(i)) { - CDTXMania.app.ConfigIni.t指定した入力が既にアサイン済みである場合はそれを全削除する( E入力デバイス.マウス, 0, i ); - CDTXMania.app.ConfigIni.KeyAssign[ (int) this.part ][ (int) this.pad ][ this.n現在の選択行 ].入力デバイス = E入力デバイス.マウス; - CDTXMania.app.ConfigIni.KeyAssign[ (int) this.part ][ (int) this.pad ][ this.n現在の選択行 ].ID = 0; - CDTXMania.app.ConfigIni.KeyAssign[ (int) this.part ][ (int) this.pad ][ this.n現在の選択行 ].コード = i; + CDTXMania.app.ConfigIni.t指定した入力が既にアサイン済みである場合はそれを全削除する(E入力デバイス.マウス, 0, i); + CDTXMania.app.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][this.n現在の選択行].入力デバイス = E入力デバイス.マウス; + CDTXMania.app.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][this.n現在の選択行].ID = 0; + CDTXMania.app.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][this.n現在の選択行].コード = i; } } return false; diff --git a/DTXManiaプロジェクト/コード/ステージ/04.コンフィグ/CActConfigList.cs b/DTXManiaプロジェクト/コード/ステージ/04.コンフィグ/CActConfigList.cs index 57c9b556..34446b74 100644 --- a/DTXManiaプロジェクト/コード/ステージ/04.コンフィグ/CActConfigList.cs +++ b/DTXManiaプロジェクト/コード/ステージ/04.コンフィグ/CActConfigList.cs @@ -23,8 +23,8 @@ namespace DTXMania get { Eメニュー種別 e = this.eメニュー種別; - if ( e == Eメニュー種別.KeyAssignBass || e == Eメニュー種別.KeyAssignDrums || - e == Eメニュー種別.KeyAssignGuitar || e == Eメニュー種別.KeyAssignSystem ) + if (e == Eメニュー種別.KeyAssignBass || e == Eメニュー種別.KeyAssignDrums || + e == Eメニュー種別.KeyAssignGuitar || e == Eメニュー種別.KeyAssignSystem) { return true; } @@ -45,9 +45,9 @@ namespace DTXMania { get { - CItemBase currentItem = this.list項目リスト[ this.n現在の選択項目 ]; - if ( currentItem == this.iSystemReturnToMenu || currentItem == this.iDrumsReturnToMenu || - currentItem == this.iGuitarReturnToMenu || currentItem == this.iBassReturnToMenu ) + CItemBase currentItem = this.list項目リスト[this.n現在の選択項目]; + if (currentItem == this.iSystemReturnToMenu || currentItem == this.iDrumsReturnToMenu || + currentItem == this.iGuitarReturnToMenu || currentItem == this.iBassReturnToMenu) { return true; } @@ -61,7 +61,7 @@ namespace DTXMania { get { - return this.list項目リスト[ this.n現在の選択項目 ]; + return this.list項目リスト[this.n現在の選択項目]; } } public int n現在の選択項目; @@ -76,26 +76,26 @@ namespace DTXMania // #27029 2012.1.5 from: 説明文は最大9行→13行に変更。 - this.iSystemReturnToMenu = new CItemBase( "<< Return To Menu", CItemBase.Eパネル種別.その他, + this.iSystemReturnToMenu = new CItemBase("<< Return To Menu", CItemBase.Eパネル種別.その他, "左側のメニューに戻ります。", - "Return to left menu." ); - this.list項目リスト.Add( this.iSystemReturnToMenu ); + "Return to left menu."); + this.list項目リスト.Add(this.iSystemReturnToMenu); - this.iSystemReloadDTX = new CItemBase( "Reload Songs", CItemBase.Eパネル種別.通常, + this.iSystemReloadDTX = new CItemBase("Reload Songs", CItemBase.Eパネル種別.通常, "曲データの一覧情報を取得し直します。", - "Reload song data." ); - this.list項目リスト.Add( this.iSystemReloadDTX ); + "Reload song data."); + this.list項目リスト.Add(this.iSystemReloadDTX); - this.iCommonDark = new CItemList( "Dark", CItemBase.Eパネル種別.通常, (int) CDTXMania.app.ConfigIni.eDark, + this.iCommonDark = new CItemList("Dark", CItemBase.Eパネル種別.通常, (int)CDTXMania.app.ConfigIni.eDark, "HALF: 背景、レーン、ゲージが表示されなくなります。\n" + "FULL: さらに小節線、拍線、判定ライン、パッドも表示されなくなります。", "OFF: all display parts are shown.\n" + "HALF: wallpaper, lanes and gauge are disappeared.\n" + "FULL: additionaly to HALF, bar/beat lines, hit bar, pads are disappeared.", - new string[] { "OFF", "HALF", "FULL" } ); - this.list項目リスト.Add( this.iCommonDark ); + new string[] { "OFF", "HALF", "FULL" }); + this.list項目リスト.Add(this.iCommonDark); - this.iSystemRisky = new CItemInteger( "Risky", 0, 10, CDTXMania.app.ConfigIni.nRisky, + this.iSystemRisky = new CItemInteger("Risky", 0, 10, CDTXMania.app.ConfigIni.nRisky, "Riskyモードの設定:\n" + "1以上の値にすると、その回数分のPoor/MissでFAILEDとなります。\n" + "0にすると無効になり、DamageLevelに従ったゲージ増減となります。\n" + @@ -103,11 +103,11 @@ namespace DTXMania "なお、この設定は、StageFailedの設定と併用できます。", "Risky mode:\n" + "It means the Poor/Miss times to be FAILED.\n" + - "Set 0 to disable Risky mode." ); - this.list項目リスト.Add( this.iSystemRisky ); + "Set 0 to disable Risky mode."); + this.list項目リスト.Add(this.iSystemRisky); - int nDGmode = ( CDTXMania.app.ConfigIni.bGuitar有効 ? 2 : 0 ) + ( CDTXMania.app.ConfigIni.bDrums有効 ? 1 : 0 ) - 1; - this.iSystemGRmode = new CItemList( "Drums & GR ", CItemBase.Eパネル種別.通常, nDGmode, + int nDGmode = (CDTXMania.app.ConfigIni.bGuitar有効 ? 2 : 0) + (CDTXMania.app.ConfigIni.bDrums有効 ? 1 : 0) - 1; + this.iSystemGRmode = new CItemList("Drums & GR ", CItemBase.Eパネル種別.通常, nDGmode, "使用楽器の選択:\n" + "DrOnly: ドラムのみ有効にします。\n" + "GROnly: ギター/ベースのみの専用画面を用います。\n" + @@ -115,10 +115,10 @@ namespace DTXMania "DrOnly: Only Drums is available.\n" + "GROnly: Only Guitar/Bass are available. You can play them in GR screen.\n" + "Both: Both Drums and Guitar/Bass are available.", - new string[] { "DrOnly", "GROnly", "Both" } ); - this.list項目リスト.Add( this.iSystemGRmode ); + new string[] { "DrOnly", "GROnly", "Both" }); + this.list項目リスト.Add(this.iSystemGRmode); - this.iCommonPlaySpeed = new CItemInteger( "PlaySpeed", 5, 40, CDTXMania.app.ConfigIni.n演奏速度, + this.iCommonPlaySpeed = new CItemInteger("PlaySpeed", 5, 40, CDTXMania.app.ConfigIni.n演奏速度, "曲の演奏速度を、速くしたり遅くしたりすることができます。\n" + "(※一部のサウンドカードでは正しく再生できない可能性があります。)\n" + "\n" + @@ -126,10 +126,10 @@ namespace DTXMania "It changes the song speed.\n" + "For example, you can play in half speed by setting PlaySpeed = 0.500 for your practice.\n" + "\n" + - "Note: It also changes the songs' pitch. In case TimeStretch=ON and slower than x0.900, some sound lag occurs." ); - this.list項目リスト.Add( this.iCommonPlaySpeed ); + "Note: It also changes the songs' pitch. In case TimeStretch=ON and slower than x0.900, some sound lag occurs."); + this.list項目リスト.Add(this.iCommonPlaySpeed); - this.iSystemTimeStretch = new CItemToggle( "TimeStretch", CDTXMania.app.ConfigIni.bTimeStretch, + this.iSystemTimeStretch = new CItemToggle("TimeStretch", CDTXMania.app.ConfigIni.bTimeStretch, "演奏速度の変更方式:\n" + "ONにすると、演奏速度の変更を、周波数変更ではなくタイムストレッチで行います。\n" + "\n" + @@ -138,28 +138,28 @@ namespace DTXMania "The way to change the playing speed:\n" + "Turn ON to use time stretch to change the play speed." + "\n" + - "TimeStretch uses more CPU power. And some sound lag occurs if PlaySpeed is slower than x0.900." ); - this.list項目リスト.Add( this.iSystemTimeStretch ); + "TimeStretch uses more CPU power. And some sound lag occurs if PlaySpeed is slower than x0.900."); + this.list項目リスト.Add(this.iSystemTimeStretch); - this.iSystemFullscreen = new CItemToggle( "Fullscreen", CDTXMania.app.ConfigIni.b全画面モード, + this.iSystemFullscreen = new CItemToggle("Fullscreen", CDTXMania.app.ConfigIni.b全画面モード, "画面モード設定:\n" + "ON で全画面モード、OFF でウィンドウモードになります。", - "Fullscreen mode or window mode." ); - this.list項目リスト.Add( this.iSystemFullscreen ); - this.iSystemStageFailed = new CItemToggle( "StageFailed", CDTXMania.app.ConfigIni.bSTAGEFAILED有効, + "Fullscreen mode or window mode."); + this.list項目リスト.Add(this.iSystemFullscreen); + this.iSystemStageFailed = new CItemToggle("StageFailed", CDTXMania.app.ConfigIni.bSTAGEFAILED有効, "STAGE FAILED 有効:\n" + "ON にすると、ゲージがなくなった時に STAGE FAILED となり演奏が中断されます。\n" + "OFF の場合は、ゲージがなくなっても最後まで演奏できます。", - "Turn OFF if you don't want to encount GAME OVER." ); - this.list項目リスト.Add( this.iSystemStageFailed ); - this.iSystemRandomFromSubBox = new CItemToggle( "RandSubBox", CDTXMania.app.ConfigIni.bランダムセレクトで子BOXを検索対象とする, + "Turn OFF if you don't want to encount GAME OVER."); + this.list項目リスト.Add(this.iSystemStageFailed); + this.iSystemRandomFromSubBox = new CItemToggle("RandSubBox", CDTXMania.app.ConfigIni.bランダムセレクトで子BOXを検索対象とする, "子BOXをRANDOMの対象とする:\n" + "ON にすると、RANDOM SELECT 時に子BOXも選択対象とします。", - "Turn ON to use child BOX (subfolders) at RANDOM SELECT." ); - this.list項目リスト.Add( this.iSystemRandomFromSubBox ); + "Turn ON to use child BOX (subfolders) at RANDOM SELECT."); + this.list項目リスト.Add(this.iSystemRandomFromSubBox); - this.iSystemAdjustWaves = new CItemToggle( "AdjustWaves", CDTXMania.app.ConfigIni.bWave再生位置自動調整機能有効, + this.iSystemAdjustWaves = new CItemToggle("AdjustWaves", CDTXMania.app.ConfigIni.bWave再生位置自動調整機能有効, "サウンド再生位置自動補正:\n" + "ハードウェアやOSに起因するサウンドのずれを強制的に補正します。\n" + "BGM のように再生時間の長い音声データが使用されている曲で効果があります。" + @@ -170,109 +170,109 @@ namespace DTXMania "If you turn it ON, it decrease the lag which comes from the difference of hardware/OS.\n" + "Usually, you should turn it ON.\n" + "\n" + - "Note: This setting is effetive only when DSound(DirectSound) in SoundType is used." ); - this.list項目リスト.Add( this.iSystemAdjustWaves ); + "Note: This setting is effetive only when DSound(DirectSound) in SoundType is used."); + this.list項目リスト.Add(this.iSystemAdjustWaves); - this.iSystemVSyncWait = new CItemToggle( "VSyncWait", CDTXMania.app.ConfigIni.b垂直帰線待ちを行う, + this.iSystemVSyncWait = new CItemToggle("VSyncWait", CDTXMania.app.ConfigIni.b垂直帰線待ちを行う, "垂直帰線同期:\n" + "画面の描画をディスプレイの垂直帰線中に行なう場合には ON を指定します。\n" + "ON にすると、ガタつきのない滑らかな画面描画が実現されます。", "Turn ON to wait VSync (Vertical Synchronizing signal) at every drawings. (so FPS becomes 60)\n" + "\n" + - "If you have enough CPU/GPU power, the scroll would become smooth." ); - this.list項目リスト.Add( this.iSystemVSyncWait ); - this.iSystemAVI = new CItemToggle( "AVI", CDTXMania.app.ConfigIni.bAVI有効, + "If you have enough CPU/GPU power, the scroll would become smooth."); + this.list項目リスト.Add(this.iSystemVSyncWait); + this.iSystemAVI = new CItemToggle("AVI", CDTXMania.app.ConfigIni.bAVI有効, "AVIの使用:\n" + "演奏中に動画(AVI)を再生する場合にON にします。\n" + "AVI の再生には、それなりのマシンパワーが必要とされます。", - "To use AVI playback or not." ); - this.list項目リスト.Add( this.iSystemAVI ); - this.iSystemForceAVIFullscreen = new CItemToggle( "FullAVI", CDTXMania.app.ConfigIni.bForceAVIFullscreen, + "To use AVI playback or not."); + this.list項目リスト.Add(this.iSystemAVI); + this.iSystemForceAVIFullscreen = new CItemToggle("FullAVI", CDTXMania.app.ConfigIni.bForceAVIFullscreen, "旧AVIの全画面表示:\n" + "旧仕様の動画(AVI)の表示を、強制的に全画面化します。\n" + "BGAと併用している場合は、表示がおかしくなります。", "Forcely show the legacy-spec AVI to fullscreen.\n" + - "If the data contains both AVI and BGA, the screen will corrupt." ); - this.list項目リスト.Add( this.iSystemForceAVIFullscreen ); - this.iSystemBGA = new CItemToggle( "BGA", CDTXMania.app.ConfigIni.bBGA有効, + "If the data contains both AVI and BGA, the screen will corrupt."); + this.list項目リスト.Add(this.iSystemForceAVIFullscreen); + this.iSystemBGA = new CItemToggle("BGA", CDTXMania.app.ConfigIni.bBGA有効, "BGAの使用:\n" + "演奏中に画像(BGA)を表示する場合にON にします。\n" + "BGA の再生には、それなりのマシンパワーが必要とされます。", - "To draw BGA (back ground animations) or not." ); - this.list項目リスト.Add( this.iSystemBGA ); - this.iSystemPreviewSoundWait = new CItemInteger( "PreSoundWait", 0, 0x2710, CDTXMania.app.ConfigIni.n曲が選択されてからプレビュー音が鳴るまでのウェイトms, + "To draw BGA (back ground animations) or not."); + this.list項目リスト.Add(this.iSystemBGA); + this.iSystemPreviewSoundWait = new CItemInteger("PreSoundWait", 0, 0x2710, CDTXMania.app.ConfigIni.n曲が選択されてからプレビュー音が鳴るまでのウェイトms, "プレビュー音演奏までの時間:\n" + "曲にカーソルが合わされてからプレビュー音が鳴り始めるまでの時間を指定します。\n" + "0 ~ 10000 [ms] が指定可能です。", "Delay time(ms) to start playing preview sound in SELECT MUSIC screen.\n" + - "You can specify from 0ms to 10000ms." ); - this.list項目リスト.Add( this.iSystemPreviewSoundWait ); - this.iSystemPreviewImageWait = new CItemInteger( "PreImageWait", 0, 0x2710, CDTXMania.app.ConfigIni.n曲が選択されてからプレビュー画像が表示開始されるまでのウェイトms, + "You can specify from 0ms to 10000ms."); + this.list項目リスト.Add(this.iSystemPreviewSoundWait); + this.iSystemPreviewImageWait = new CItemInteger("PreImageWait", 0, 0x2710, CDTXMania.app.ConfigIni.n曲が選択されてからプレビュー画像が表示開始されるまでのウェイトms, "プレビュー画像表示までの時間:\n" + "曲にカーソルが合わされてからプレビュー画像が表示されるまでの時間を指定します。\n" + "0 ~ 10000 [ms] が指定可能です。", "Delay time(ms) to show preview image in SELECT MUSIC screen.\n" + - "You can specify from 0ms to 10000ms." ); - this.list項目リスト.Add( this.iSystemPreviewImageWait ); - this.iSystemDebugInfo = new CItemToggle( "Debug Info", CDTXMania.app.ConfigIni.b演奏情報を表示する, + "You can specify from 0ms to 10000ms."); + this.list項目リスト.Add(this.iSystemPreviewImageWait); + this.iSystemDebugInfo = new CItemToggle("Debug Info", CDTXMania.app.ConfigIni.b演奏情報を表示する, "演奏情報の表示:\n" + "演奏中、BGA領域の下部に演奏情報(FPS、BPM、演奏時間など)を表示します。\n" + "また、小節線の横に小節番号が表示されるようになります。", "To show song informations on playing BGA area. (FPS, BPM, total time etc)\n" + - "You can ON/OFF the indications by pushing [Del] while playing drums, guitar or bass." ); - this.list項目リスト.Add( this.iSystemDebugInfo ); - this.iSystemBGAlpha = new CItemInteger( "BG Alpha", 0, 0xff, CDTXMania.app.ConfigIni.n背景の透過度, + "You can ON/OFF the indications by pushing [Del] while playing drums, guitar or bass."); + this.list項目リスト.Add(this.iSystemDebugInfo); + this.iSystemBGAlpha = new CItemInteger("BG Alpha", 0, 0xff, CDTXMania.app.ConfigIni.n背景の透過度, "背景画像の透明割合:\n" + "背景画像をDTXManiaのフレーム画像と合成する際の、背景画像の透明度を指定します。\n" + "0 が完全不透明で、255 が完全透明となります。", "The degree for transparing playing screen and wallpaper.\n" + "\n" + - "0=no transparent, 255=completely transparency." ); - this.list項目リスト.Add( this.iSystemBGAlpha ); - this.iSystemBGMSound = new CItemToggle( "BGM Sound", CDTXMania.app.ConfigIni.bBGM音を発声する, + "0=no transparent, 255=completely transparency."); + this.list項目リスト.Add(this.iSystemBGAlpha); + this.iSystemBGMSound = new CItemToggle("BGM Sound", CDTXMania.app.ConfigIni.bBGM音を発声する, "BGMの再生:\n" + "これをOFFにすると、BGM を再生しなくなります。", - "Turn OFF if you don't want to play BGM." ); - this.list項目リスト.Add( this.iSystemBGMSound ); - this.iSystemAudienceSound = new CItemToggle( "Audience", CDTXMania.app.ConfigIni.b歓声を発声する, + "Turn OFF if you don't want to play BGM."); + this.list項目リスト.Add(this.iSystemBGMSound); + this.iSystemAudienceSound = new CItemToggle("Audience", CDTXMania.app.ConfigIni.b歓声を発声する, "歓声の再生:\n" + "これをOFFにすると、歓声を再生しなくなります。", - "Turn ON if you want to be cheered at the end of fill-in zone." ); - this.list項目リスト.Add( this.iSystemAudienceSound ); - this.iSystemDamageLevel = new CItemList( "DamageLevel", CItemBase.Eパネル種別.通常, (int) CDTXMania.app.ConfigIni.eダメージレベル, + "Turn ON if you want to be cheered at the end of fill-in zone."); + this.list項目リスト.Add(this.iSystemAudienceSound); + this.iSystemDamageLevel = new CItemList("DamageLevel", CItemBase.Eパネル種別.通常, (int)CDTXMania.app.ConfigIni.eダメージレベル, "ゲージ減少割合:\n" + "Miss ヒット時のゲージの減少度合いを指定します。\n" + "Riskyが1以上の場合は無効となります。", "Damage level at missing (and recovering level) at playing.\n" + "This setting is ignored when Risky >= 1.", - new string[] { "Small", "Normal", "Large" } ); - this.list項目リスト.Add( this.iSystemDamageLevel ); - this.iSystemSaveScore = new CItemToggle( "SaveScore", CDTXMania.app.ConfigIni.bScoreIniを出力する, + new string[] { "Small", "Normal", "Large" }); + this.list項目リスト.Add(this.iSystemDamageLevel); + this.iSystemSaveScore = new CItemToggle("SaveScore", CDTXMania.app.ConfigIni.bScoreIniを出力する, "演奏記録の保存:\n" + "これを ON にすると、演奏記録を ~.score.ini ファイルに保存します。", "To save high-scores/skills, turn it ON.\n" + "Turn OFF in case your song data are in read-only media (CD-ROM etc).\n" + "Note that the score files also contain 'BGM Adjust' parameter.\n" + - "So if you want to keep adjusting parameter, you need to set SaveScore=ON." ); - this.list項目リスト.Add( this.iSystemSaveScore ); + "So if you want to keep adjusting parameter, you need to set SaveScore=ON."); + this.list項目リスト.Add(this.iSystemSaveScore); - this.iSystemChipVolume = new CItemInteger( "ChipVolume", 0, 100, CDTXMania.app.ConfigIni.n手動再生音量, + this.iSystemChipVolume = new CItemInteger("ChipVolume", 0, 100, CDTXMania.app.ConfigIni.n手動再生音量, "打音の音量:\n" + "入力に反応して再生されるチップの音量を指定します。\n" + "0 ~ 100 % の値が指定可能です。", "The volumes for chips you hit.\n" + - "You can specify from 0 to 100%." ); - this.list項目リスト.Add( this.iSystemChipVolume ); - this.iSystemAutoChipVolume = new CItemInteger( "AutoVolume", 0, 100, CDTXMania.app.ConfigIni.n自動再生音量, + "You can specify from 0 to 100%."); + this.list項目リスト.Add(this.iSystemChipVolume); + this.iSystemAutoChipVolume = new CItemInteger("AutoVolume", 0, 100, CDTXMania.app.ConfigIni.n自動再生音量, "自動再生音の音量:\n" + "自動的に再生されるチップの音量を指定します。\n" + "0 ~ 100 % の値が指定可能です。", "The volumes for AUTO chips.\n" + - "You can specify from 0 to 100%." ); - this.list項目リスト.Add( this.iSystemAutoChipVolume ); - this.iSystemStoicMode = new CItemToggle( "StoicMode", CDTXMania.app.ConfigIni.bストイックモード, + "You can specify from 0 to 100%."); + this.list項目リスト.Add(this.iSystemAutoChipVolume); + this.iSystemStoicMode = new CItemToggle("StoicMode", CDTXMania.app.ConfigIni.bストイックモード, "ストイック(禁欲)モード:\n" + "以下をまとめて表示ON/OFFします。\n" + "・プレビュー画像/動画\n" + @@ -287,9 +287,9 @@ namespace DTXMania " * nowloading image\n" + " * wallpaper (in playing screen)\n" + " * BGA / AVI (in playing screen)\n" + - " * Graph bar" ); - this.list項目リスト.Add( this.iSystemStoicMode ); - this.iSystemShowLag = new CItemList( "ShowLagTime", CItemBase.Eパネル種別.通常, CDTXMania.app.ConfigIni.nShowLagType, + " * Graph bar"); + this.list項目リスト.Add(this.iSystemStoicMode); + this.iSystemShowLag = new CItemList("ShowLagTime", CItemBase.Eパネル種別.通常, CDTXMania.app.ConfigIni.nShowLagType, "ズレ時間表示:\n" + "ジャストタイミングからのズレ時間(ms)を表示します。\n" + " OFF: ズレ時間を表示しません。\n" + @@ -299,17 +299,17 @@ namespace DTXMania " OFF: Don't show it.\n" + " ON: Show it.\n" + " GREAT-: Show it except you've gotten PERFECT.", - new string[] { "OFF", "ON", "GREAT-" } ); - this.list項目リスト.Add( this.iSystemShowLag ); - this.iSystemAutoResultCapture = new CItemToggle( "Autosaveresult", CDTXMania.app.ConfigIni.bIsAutoResultCapture, + new string[] { "OFF", "ON", "GREAT-" }); + this.list項目リスト.Add(this.iSystemShowLag); + this.iSystemAutoResultCapture = new CItemToggle("Autosaveresult", CDTXMania.app.ConfigIni.bIsAutoResultCapture, "リザルト画像自動保存機能:\n" + "ONにすると、ハイスコア/ハイスキル時に、自動的にリザルト画像を曲データと同じフォルダに保存します。", "AutoSaveResult:\n" + - "Turn ON to save your result screen image automatically when you get hiscore/hiskill." ); - this.list項目リスト.Add( this.iSystemAutoResultCapture ); + "Turn ON to save your result screen image automatically when you get hiscore/hiskill."); + this.list項目リスト.Add(this.iSystemAutoResultCapture); - this.iSystemJudgeDispPriority = new CItemList( "JudgePriority", CItemBase.Eパネル種別.通常, (int) CDTXMania.app.ConfigIni.e判定表示優先度, + this.iSystemJudgeDispPriority = new CItemList("JudgePriority", CItemBase.Eパネル種別.通常, (int)CDTXMania.app.ConfigIni.e判定表示優先度, "判定文字列とコンボ表示の優先順位を指定します。\n" + "\n" + " Under: チップの下に表示します。\n" + @@ -318,10 +318,10 @@ namespace DTXMania "\n" + " Under: Show them under the chips.\n" + " Over: Show them over the chips.", - new string[] { "Under", "Over" } ); - this.list項目リスト.Add( this.iSystemJudgeDispPriority ); + new string[] { "Under", "Over" }); + this.list項目リスト.Add(this.iSystemJudgeDispPriority); - this.iSystemBufferedInput = new CItemToggle( "BufferedInput", CDTXMania.app.ConfigIni.bバッファ入力を行う, + this.iSystemBufferedInput = new CItemToggle("BufferedInput", CDTXMania.app.ConfigIni.bバッファ入力を行う, "バッファ入力モード:\n" + "ON にすると、FPS を超える入力解像度を実現します。\n" + "OFF にすると、入力解像度は FPS に等しくなります。", @@ -329,28 +329,28 @@ namespace DTXMania "\n" + "ON to use buffer input. No lost/lags.\n" + "OFF to use realtime input. It may causes lost/lags for input.\n" + - "Moreover, input frequency is synchronized with FPS." ); - this.list項目リスト.Add( this.iSystemBufferedInput ); - this.iLogOutputLog = new CItemToggle( "TraceLog", CDTXMania.app.ConfigIni.bログ出力, + "Moreover, input frequency is synchronized with FPS."); + this.list項目リスト.Add(this.iSystemBufferedInput); + this.iLogOutputLog = new CItemToggle("TraceLog", CDTXMania.app.ConfigIni.bログ出力, "Traceログ出力:\n" + "DTXManiaLog.txt にログを出力します。\n" + "この設定の変更は、DTXMania の再起動後に有効となります。", "Turn ON to put debug log to DTXManiaLog.txt.\n" + - "To take it effective, you need to re-open DTXMania." ); - this.list項目リスト.Add( this.iLogOutputLog ); + "To take it effective, you need to re-open DTXMania."); + this.list項目リスト.Add(this.iLogOutputLog); - this.iSystemLoadsoundspeed = new CItemToggle( "LoadSoundSpeed", CDTXMania.app.ConfigIni.b曲読み込みを高速化する, + this.iSystemLoadsoundspeed = new CItemToggle("LoadSoundSpeed", CDTXMania.app.ConfigIni.b曲読み込みを高速化する, "曲読み込みを高速化する:\n" + "ON にすると、曲読み込み画面での1フレームあたりの\nチップ音読み込み数を増やします。\n高速になりますが、応答停止の時間が増加しやすくなります。\n" + "OFF にすると、低速ですが応答停止の時間が\n減少しやすくなります。\n\n", "Load sounds speed.\n" + "ON to High.\n" + - "OFF to Low." ); - this.list項目リスト.Add( this.iSystemLoadsoundspeed ); + "OFF to Low."); + this.list項目リスト.Add(this.iSystemLoadsoundspeed); #region [ WASAPI / ASIO ] // #24820 2013.1.3 yyagi - this.iSystemSoundType = new CItemList( "SoundType", CItemList.Eパネル種別.通常, CDTXMania.app.ConfigIni.nSoundDeviceType, + this.iSystemSoundType = new CItemList("SoundType", CItemList.Eパネル種別.通常, CDTXMania.app.ConfigIni.nSoundDeviceType, "サウンドの出力方式:\n" + "WASAPI, ASIO, DSound(DirectSound)の中からサウンド出力方式を選択します。\n" + "WASAPIはVista以降でのみ使用可能です。ASIOはXPでも使用可能ですが、対応機器でのみ使用できます。\n" + @@ -365,34 +365,34 @@ namespace DTXMania "You should use WASAPI or ASIO to decrease the sound lag.\n" + "\n" + "Note: Exit CONFIGURATION to make the setting take effect.", - new string[] { "DSound", "ASIO", "WASAPI" } ); - this.list項目リスト.Add( this.iSystemSoundType ); + new string[] { "DSound", "ASIO", "WASAPI" }); + this.list項目リスト.Add(this.iSystemSoundType); // #24820 2013.1.15 yyagi - this.iSystemWASAPIBufferSizeMs = new CItemInteger( "WASAPI BufferSize", 0, 99999, CDTXMania.app.ConfigIni.nWASAPIBufferSizeMs, - "WASAPI使用時のバッファサイズ:\n" + + this.iSystemWASAPIBufferSizeMs = new CItemInteger("WASAPI BufferSize", 0, 99999, CDTXMania.app.ConfigIni.nWASAPIBufferSizeMs, + "WASAPI使用時のバッファサイズ:\n" + "\n" + - // "0~99999ms を指定可能です。\n" + - "0を指定すると、設定可能な最小のバッファサイズを自動設定します。" + + // "0~99999ms を指定可能です。\n" + + "0を指定すると、設定可能な最小のバッファサイズを自動設定します。" + "1以上を指定すると、その値以上で指定可能な最小のバッファサイズを自動設定します。\n" + "\n" + - "値を小さくするほど発音遅延が減少しますが、音割れや性能低下などの問題が発生する場合があります。" + + "値を小さくするほど発音遅延が減少しますが、音割れや性能低下などの問題が発生する場合があります。" + "タブレットなど性能の低いPCを使う場合は、手動で大きめの値を指定してください。\n" + "\n" + - "※ 設定はCONFIGURATION画面の終了時に\n" + + "※ 設定はCONFIGURATION画面の終了時に\n" + " 有効になります。", - "Sound buffer size for WASAPI:\n" + - "You can set from 0 to 99999ms.\n" + - "Set 0 to use a minimum buffer size automatically.\n" + - "Smaller value makes smaller lag, but it may cause sound troubles. " + + "Sound buffer size for WASAPI:\n" + + "You can set from 0 to 99999ms.\n" + + "Set 0 to use a minimum buffer size automatically.\n" + + "Smaller value makes smaller lag, but it may cause sound troubles. " + "So if you use poor CPU PC (tablet etc), please specify a little bigger value.\n" + - "\n" + - "Note: Exit CONFIGURATION to make the setting take effect." ); - this.list項目リスト.Add( this.iSystemWASAPIBufferSizeMs ); + "\n" + + "Note: Exit CONFIGURATION to make the setting take effect."); + this.list項目リスト.Add(this.iSystemWASAPIBufferSizeMs); // #24820 2013.1.17 yyagi string[] asiodevs = CEnumerateAllAsioDevices.GetAllASIODevices(); - this.iSystemASIODevice = new CItemList( "ASIO device", CItemList.Eパネル種別.通常, CDTXMania.app.ConfigIni.nASIODevice, + this.iSystemASIODevice = new CItemList("ASIO device", CItemList.Eパネル種別.通常, CDTXMania.app.ConfigIni.nASIODevice, "ASIOデバイス:\n" + "ASIO使用時のサウンドデバイスを選択します。\n" + "\n" + @@ -401,8 +401,8 @@ namespace DTXMania "Select the sound device to use under ASIO mode.\n" + "\n" + "Note: Exit CONFIGURATION to make the setting take effect.", - asiodevs ); - this.list項目リスト.Add( this.iSystemASIODevice ); + asiodevs); + this.list項目リスト.Add(this.iSystemASIODevice); // #24820 2013.1.3 yyagi //this.iSystemASIOBufferSizeMs = new CItemInteger("ASIOBuffSize", 0, 99999, CDTXMania.app.ConfigIni.nASIOBufferSizeMs, @@ -431,7 +431,7 @@ namespace DTXMania //this.list項目リスト.Add( this.iSystemASIOBufferSizeMs ); // #33689 2014.6.17 yyagi - this.iSystemSoundTimerType = new CItemToggle( "UseOSTimer", CDTXMania.app.ConfigIni.bUseOSTimer, + this.iSystemSoundTimerType = new CItemToggle("UseOSTimer", CDTXMania.app.ConfigIni.bUseOSTimer, "OSタイマーを使用するかどうか:\n" + "演奏タイマーとして、DTXMania独自のタイマーを使うか、OS標準のタイマーを使うかを選択します。\n" + "OS標準タイマーを使うとスクロールが滑らかになりますが、演奏で音ズレが発生することがあります。(そのためAdjustWavesの効果が適用されます。)\n" + @@ -445,10 +445,10 @@ namespace DTXMania "\n" + "This settings is avilable only when you use WASAPI/ASIO.\n" ); - this.list項目リスト.Add( this.iSystemSoundTimerType ); + this.list項目リスト.Add(this.iSystemSoundTimerType); #endregion // #33700 2013.1.3 yyagi - this.iSystemMasterVolume = new CItemInteger( "MasterVolume", 0, 100, CDTXMania.app.ConfigIni.nMasterVolume, + this.iSystemMasterVolume = new CItemInteger("MasterVolume", 0, 100, CDTXMania.app.ConfigIni.nMasterVolume, "マスターボリュームの設定:\n" + "全体の音量を設定します。\n" + "0が無音で、100が最大値です。\n" + @@ -457,33 +457,33 @@ namespace DTXMania "You can set 0 - 100.\n" + "\n" + "Note:\n" + - "Only for WASAPI/ASIO mode." ); - this.list項目リスト.Add( this.iSystemMasterVolume ); + "Only for WASAPI/ASIO mode."); + this.list項目リスト.Add(this.iSystemMasterVolume); - this.iSystemSkinSubfolder = new CItemList( "Skin (General)", CItemBase.Eパネル種別.通常, nSkinIndex, + this.iSystemSkinSubfolder = new CItemList("Skin (General)", CItemBase.Eパネル種別.通常, nSkinIndex, "スキン切替:\n" + "スキンを切り替えます。\n", //"CONFIGURATIONを抜けると、設定した\n" + //"スキンに変更されます。", "Skin:\n" + "Change skin.", - skinNames ); - this.list項目リスト.Add( this.iSystemSkinSubfolder ); - this.iSystemUseBoxDefSkin = new CItemToggle( "Skin (Box)", CDTXMania.app.ConfigIni.bUseBoxDefSkin, + skinNames); + this.list項目リスト.Add(this.iSystemSkinSubfolder); + this.iSystemUseBoxDefSkin = new CItemToggle("Skin (Box)", CDTXMania.app.ConfigIni.bUseBoxDefSkin, "Music boxスキンの利用:\n" + "特別なスキンが設定されたMusic boxに出入りしたときに、自動でスキンを切り替えるかどうかを設定します。\n", //"\n" + //"(Music Boxスキンは、box.defファイル\n" + //" で指定できます)\n", "Box skin:\n" + - "Automatically change skin specified in box.def file." ); - this.list項目リスト.Add( this.iSystemUseBoxDefSkin ); + "Automatically change skin specified in box.def file."); + this.list項目リスト.Add(this.iSystemUseBoxDefSkin); - this.iSystemGoToKeyAssign = new CItemBase( "System Keys", CItemBase.Eパネル種別.通常, + this.iSystemGoToKeyAssign = new CItemBase("System Keys", CItemBase.Eパネル種別.通常, "システムのキー入力に関する項目を設定します。", - "Settings for the system key/pad inputs." ); - this.list項目リスト.Add( this.iSystemGoToKeyAssign ); + "Settings for the system key/pad inputs."); + this.list項目リスト.Add(this.iSystemGoToKeyAssign); OnListMenuの初期化(); this.n現在の選択項目 = 0; @@ -499,71 +499,71 @@ namespace DTXMania // #27029 2012.1.5 from: 説明文は最大9行→13行に変更。 - this.iDrumsReturnToMenu = new CItemBase( "<< Return To Menu", CItemBase.Eパネル種別.その他, + this.iDrumsReturnToMenu = new CItemBase("<< Return To Menu", CItemBase.Eパネル種別.その他, "左側のメニューに戻ります。", - "Return to left menu." ); - this.list項目リスト.Add( this.iDrumsReturnToMenu ); + "Return to left menu."); + this.list項目リスト.Add(this.iDrumsReturnToMenu); #region [ AutoPlay ] - this.iDrumsAutoPlayAll = new CItemThreeState( "AutoPlay (All)", CItemThreeState.E状態.不定, + this.iDrumsAutoPlayAll = new CItemThreeState("AutoPlay (All)", CItemThreeState.E状態.不定, "全パッドの自動演奏の ON/OFF をまとめて切り替えます。", - "You can change whether Auto or not for all drums lanes at once." ); - this.list項目リスト.Add( this.iDrumsAutoPlayAll ); + "You can change whether Auto or not for all drums lanes at once."); + this.list項目リスト.Add(this.iDrumsAutoPlayAll); - this.iDrumsLeftCymbal = new CItemToggle( " LeftCymbal", CDTXMania.app.ConfigIni.bAutoPlay.LC, + this.iDrumsLeftCymbal = new CItemToggle(" LeftCymbal", CDTXMania.app.ConfigIni.bAutoPlay.LC, "左シンバルを自動で演奏します。", - "To play LeftCymbal automatically." ); - this.list項目リスト.Add( this.iDrumsLeftCymbal ); + "To play LeftCymbal automatically."); + this.list項目リスト.Add(this.iDrumsLeftCymbal); - this.iDrumsHiHat = new CItemToggle( " HiHat", CDTXMania.app.ConfigIni.bAutoPlay.HH, + this.iDrumsHiHat = new CItemToggle(" HiHat", CDTXMania.app.ConfigIni.bAutoPlay.HH, "ハイハットを自動で演奏します。\n" + "(クローズ、オープンとも)", "To play HiHat automatically.\n" + - "(It effects to both HH-close and HH-open)" ); - this.list項目リスト.Add( this.iDrumsHiHat ); + "(It effects to both HH-close and HH-open)"); + this.list項目リスト.Add(this.iDrumsHiHat); - this.iDrumsSnare = new CItemToggle( " Snare", CDTXMania.app.ConfigIni.bAutoPlay.SD, + this.iDrumsSnare = new CItemToggle(" Snare", CDTXMania.app.ConfigIni.bAutoPlay.SD, "スネアを自動で演奏します。", - "To play Snare automatically." ); - this.list項目リスト.Add( this.iDrumsSnare ); + "To play Snare automatically."); + this.list項目リスト.Add(this.iDrumsSnare); - this.iDrumsBass = new CItemToggle( " BassDrum", CDTXMania.app.ConfigIni.bAutoPlay.BD, + this.iDrumsBass = new CItemToggle(" BassDrum", CDTXMania.app.ConfigIni.bAutoPlay.BD, "バスドラムを自動で演奏します。", - "To play Bass Drum automatically." ); - this.list項目リスト.Add( this.iDrumsBass ); + "To play Bass Drum automatically."); + this.list項目リスト.Add(this.iDrumsBass); - this.iDrumsHighTom = new CItemToggle( " HighTom", CDTXMania.app.ConfigIni.bAutoPlay.HT, + this.iDrumsHighTom = new CItemToggle(" HighTom", CDTXMania.app.ConfigIni.bAutoPlay.HT, "ハイタムを自動で演奏します。", - "To play High Tom automatically." ); - this.list項目リスト.Add( this.iDrumsHighTom ); + "To play High Tom automatically."); + this.list項目リスト.Add(this.iDrumsHighTom); - this.iDrumsLowTom = new CItemToggle( " LowTom", CDTXMania.app.ConfigIni.bAutoPlay.LT, + this.iDrumsLowTom = new CItemToggle(" LowTom", CDTXMania.app.ConfigIni.bAutoPlay.LT, "ロータムを自動で演奏します。", - "To play Low Tom automatically." ); - this.list項目リスト.Add( this.iDrumsLowTom ); + "To play Low Tom automatically."); + this.list項目リスト.Add(this.iDrumsLowTom); - this.iDrumsFloorTom = new CItemToggle( " FloorTom", CDTXMania.app.ConfigIni.bAutoPlay.FT, + this.iDrumsFloorTom = new CItemToggle(" FloorTom", CDTXMania.app.ConfigIni.bAutoPlay.FT, "フロアタムを自動で演奏します。", - "To play Floor Tom automatically." ); - this.list項目リスト.Add( this.iDrumsFloorTom ); + "To play Floor Tom automatically."); + this.list項目リスト.Add(this.iDrumsFloorTom); - this.iDrumsCymbalRide = new CItemToggle( " Cym/Ride", CDTXMania.app.ConfigIni.bAutoPlay.CY, + this.iDrumsCymbalRide = new CItemToggle(" Cym/Ride", CDTXMania.app.ConfigIni.bAutoPlay.CY, "右シンバルとライドシンバルを自動で演奏します。", - "To play both right- and Ride-Cymbal automatically." ); - this.list項目リスト.Add( this.iDrumsCymbalRide ); + "To play both right- and Ride-Cymbal automatically."); + this.list項目リスト.Add(this.iDrumsCymbalRide); #endregion - this.iDrumsScrollSpeed = new CItemInteger( "ScrollSpeed", 0, 0x7cf, CDTXMania.app.ConfigIni.n譜面スクロール速度.Drums, + this.iDrumsScrollSpeed = new CItemInteger("ScrollSpeed", 0, 0x7cf, CDTXMania.app.ConfigIni.n譜面スクロール速度.Drums, "演奏時のドラム譜面のスクロールの速度を指定します。\n" + "x0.5 ~ x1000.0 を指定可能です。", "To change the scroll speed for the drums lanes.\n" + "You can set it from x0.5 to x1000.0.\n" + - "(ScrollSpeed=x0.5 means half speed)" ); - this.list項目リスト.Add( this.iDrumsScrollSpeed ); + "(ScrollSpeed=x0.5 means half speed)"); + this.list項目リスト.Add(this.iDrumsScrollSpeed); #region [ SudHid ] - this.iDrumsSudHid = new CItemList( "Sud+Hid", CItemBase.Eパネル種別.通常, getDefaultSudHidValue( E楽器パート.DRUMS ), + this.iDrumsSudHid = new CItemList("Sud+Hid", CItemBase.Eパネル種別.通常, getDefaultSudHidValue(E楽器パート.DRUMS), "ドラムチップの表示方式:\n" + "OFF:  チップを常に表示します。\n" + "Sudden: チップがヒットバー付近に来るまで表示\n" + @@ -592,8 +592,8 @@ namespace DTXMania " you've gotten Poor/Miss.\n" + "F(ull)-Invisible:\n" + " You can't see the chips at all.", - new string[] { "OFF", "Sudden", "Hidden", "Sud+Hid", "S-Invisible", "F-Invisible" } ); - this.list項目リスト.Add( this.iDrumsSudHid ); + new string[] { "OFF", "Sudden", "Hidden", "Sud+Hid", "S-Invisible", "F-Invisible" }); + this.list項目リスト.Add(this.iDrumsSudHid); #endregion //this.iDrumsSudden = new CItemToggle( "Sudden", CDTXMania.app.ConfigIni.bSudden.Drums, // "ドラムチップが譜面の下の方から表\n" + @@ -633,22 +633,22 @@ namespace DTXMania // new string[] { "LEFT", "CENTER" } ); //this.list項目リスト.Add( this.iDrumsLanePosition ); - this.iCommonDark = new CItemList( "Dark", CItemBase.Eパネル種別.通常, (int) CDTXMania.app.ConfigIni.eDark, + this.iCommonDark = new CItemList("Dark", CItemBase.Eパネル種別.通常, (int)CDTXMania.app.ConfigIni.eDark, "HALF: 背景、レーン、ゲージが表示されなくなります。\n" + "FULL: さらに小節線、拍線、判定ライン、パッドも表示されなくなります。", "OFF: all display parts are shown.\n" + "HALF: wallpaper, lanes and gauge are disappeared.\n" + "FULL: additionaly to HALF, bar/beat lines, hit bar, pads are disappeared.", - new string[] { "OFF", "HALF", "FULL" } ); - this.list項目リスト.Add( this.iCommonDark ); + new string[] { "OFF", "HALF", "FULL" }); + this.list項目リスト.Add(this.iCommonDark); - this.iDrumsReverse = new CItemToggle( "Reverse", CDTXMania.app.ConfigIni.bReverse.Drums, + this.iDrumsReverse = new CItemToggle("Reverse", CDTXMania.app.ConfigIni.bReverse.Drums, "ドラムチップが譜面の下から上に流れるようになります。", - "The scroll way is reversed. Drums chips flow from the bottom to the top." ); - this.list項目リスト.Add( this.iDrumsReverse ); + "The scroll way is reversed. Drums chips flow from the bottom to the top."); + this.list項目リスト.Add(this.iDrumsReverse); - this.iSystemRisky = new CItemInteger( "Risky", 0, 10, CDTXMania.app.ConfigIni.nRisky, + this.iSystemRisky = new CItemInteger("Risky", 0, 10, CDTXMania.app.ConfigIni.nRisky, "Riskyモードの設定:\n" + "1以上の値にすると、その回数分のPoor/MissでFAILEDとなります。\n" + "0にすると無効になり、DamageLevelに従ったゲージ増減となります。\n" + @@ -656,19 +656,19 @@ namespace DTXMania "なお、この設定は、StageFailedの設定と併用できます。", "Risky mode:\n" + "It means the Poor/Miss times to be FAILED.\n" + - "Set 0 to disable Risky mode." ); - this.list項目リスト.Add( this.iSystemRisky ); + "Set 0 to disable Risky mode."); + this.list項目リスト.Add(this.iSystemRisky); - this.iDrumsTight = new CItemToggle( "Tight", CDTXMania.app.ConfigIni.bTight, + this.iDrumsTight = new CItemToggle("Tight", CDTXMania.app.ConfigIni.bTight, "ドラムチップのないところでパッドを叩くとミスになります。", - "It becomes MISS to hit pad without chip." ); - this.list項目リスト.Add( this.iDrumsTight ); + "It becomes MISS to hit pad without chip."); + this.list項目リスト.Add(this.iDrumsTight); #region [ Position ] #region [ DrumsLanePosition ] - this.iDrumsLanePosition = new CItemList( "LanePosition", CItemBase.Eパネル種別.通常, (int) CDTXMania.app.ConfigIni.eドラムレーン表示位置, - "ドラムレーンの位置を指定します。\n" + + this.iDrumsLanePosition = new CItemList("LanePosition", CItemBase.Eパネル種別.通常, (int)CDTXMania.app.ConfigIni.eドラムレーン表示位置, + "ドラムレーンの位置を指定します。\n" + "\n" + "Left: 画面の左側にドラムレーンを表示します。\n" + "Center: 画面の中央にドラムレーンを表示します。\n", @@ -677,19 +677,19 @@ namespace DTXMania " Left: Drums lanes are shown in the left of screen.\n" + " Center: Drums lanes are shown in the center of screen.", //"Note that it doesn't take effect at Autoplay ([Left] is forcely used).", - new string[] { "Left", "Center" } ); - this.list項目リスト.Add( this.iDrumsLanePosition ); + new string[] { "Left", "Center" }); + this.list項目リスト.Add(this.iDrumsLanePosition); #endregion #region [ ComboPosition ] - this.iDrumsComboPosition = new CItemList( "ComboPosition", CItemBase.Eパネル種別.通常, (int) CDTXMania.app.ConfigIni.ドラムコンボ文字の表示位置, + this.iDrumsComboPosition = new CItemList("ComboPosition", CItemBase.Eパネル種別.通常, (int)CDTXMania.app.ConfigIni.ドラムコンボ文字の表示位置, "演奏時のドラムコンボ文字列の位置を指定します。", "The display position for Drums Combo.", //"Note that it doesn't take effect at Autoplay ([Left] is forcely used).", - new string[] { "Left", "Center", "Right", "OFF" } ); - this.list項目リスト.Add( this.iDrumsComboPosition ); + new string[] { "Left", "Center", "Right", "OFF" }); + this.list項目リスト.Add(this.iDrumsComboPosition); #endregion #region [ Position ] - this.iDrumsPosition = new CItemList( "Position", CItemBase.Eパネル種別.通常, (int) CDTXMania.app.ConfigIni.判定文字表示位置.Drums, + this.iDrumsPosition = new CItemList("Position", CItemBase.Eパネル種別.通常, (int)CDTXMania.app.ConfigIni.判定文字表示位置.Drums, "ドラムの判定文字の表示位置を指定\n" + "します。\n" + " P-A: レーン上\n" + @@ -701,8 +701,8 @@ namespace DTXMania " P-A: on the lanes.\n" + " P-B: under the hit bar.\n" + " OFF: no judgement mark.", - new string[] { "OFF", "P-A", "P-B" } ); - this.list項目リスト.Add( this.iDrumsPosition ); + new string[] { "OFF", "P-A", "P-B" }); + this.list項目リスト.Add(this.iDrumsPosition); #endregion //this.iDrumsJudgeDispPriority = new CItemList( "JudgePriority", CItemBase.Eパネル種別.通常, (int) CDTXMania.app.ConfigIni.e判定表示優先度.Drums, @@ -721,7 +721,7 @@ namespace DTXMania #endregion #region [ Group ] - this.iSystemHHGroup = new CItemList( "HH Group", CItemBase.Eパネル種別.通常, (int) CDTXMania.app.ConfigIni.eHHGroup, + this.iSystemHHGroup = new CItemList("HH Group", CItemBase.Eパネル種別.通常, (int)CDTXMania.app.ConfigIni.eHHGroup, "ハイハットレーン打ち分け設定:\n" + "左シンバル、ハイハットオープン、ハイハットクローズの打ち分け方法を指定します。\n" + " HH-0 ... LC | HHC | HHO\n" + @@ -741,10 +741,10 @@ namespace DTXMania "HH-3: LC&HC&HO; all are grouped.\n" + "\n" + "* This value cannot be changed while BD Group is set as BD-1.", - new string[] { "HH-0", "HH-1", "HH-2", "HH-3" } ); - this.list項目リスト.Add( this.iSystemHHGroup ); + new string[] { "HH-0", "HH-1", "HH-2", "HH-3" }); + this.list項目リスト.Add(this.iSystemHHGroup); - this.iSystemFTGroup = new CItemList( "FT Group", CItemBase.Eパネル種別.通常, (int) CDTXMania.app.ConfigIni.eFTGroup, + this.iSystemFTGroup = new CItemList("FT Group", CItemBase.Eパネル種別.通常, (int)CDTXMania.app.ConfigIni.eFTGroup, "フロアタム打ち分け設定:\n" + "ロータムとフロアタムの打ち分け方法を指定します。\n" + " FT-0 ... LT | FT\n" + @@ -753,10 +753,10 @@ namespace DTXMania " LT and FT are separated.\n" + "FT-1: LT&FT\n" + " LT and FT are grouped.", - new string[] { "FT-0", "FT-1" } ); - this.list項目リスト.Add( this.iSystemFTGroup ); + new string[] { "FT-0", "FT-1" }); + this.list項目リスト.Add(this.iSystemFTGroup); - this.iSystemCYGroup = new CItemList( "CY Group", CItemBase.Eパネル種別.通常, (int) CDTXMania.app.ConfigIni.eCYGroup, + this.iSystemCYGroup = new CItemList("CY Group", CItemBase.Eパネル種別.通常, (int)CDTXMania.app.ConfigIni.eCYGroup, "シンバルレーン打ち分け設定:\n" + "右シンバルとライドシンバルの打ち分け方法を指定します。\n" + " CY-0 ... CY | RD\n" + @@ -765,10 +765,10 @@ namespace DTXMania " CY and RD are separated.\n" + "CY-1: CY&RD\n" + " CY and RD are grouped.", - new string[] { "CY-0", "CY-1" } ); - this.list項目リスト.Add( this.iSystemCYGroup ); + new string[] { "CY-0", "CY-1" }); + this.list項目リスト.Add(this.iSystemCYGroup); - this.iSystemBDGroup = new CItemList( "BD Group", CItemBase.Eパネル種別.通常, (int) CDTXMania.app.ConfigIni.eBDGroup, // #27029 2012.1.4 from + this.iSystemBDGroup = new CItemList("BD Group", CItemBase.Eパネル種別.通常, (int)CDTXMania.app.ConfigIni.eBDGroup, // #27029 2012.1.4 from "バス数設定:\n" + "ハイハットペダルをバスとして利用する方法を指定します。\n" + " BD-0 ... HP | BD\n" + @@ -783,19 +783,19 @@ namespace DTXMania "\n" + "Warning: You should not use BD-1 with HitSound OFF.\n" + "And you cannot change some options while using BD-1.", - new string[] { "BD-0", "BD-1" } ); - this.list項目リスト.Add( this.iSystemBDGroup ); + new string[] { "BD-0", "BD-1" }); + this.list項目リスト.Add(this.iSystemBDGroup); #endregion - this.iSystemCymbalFree = new CItemToggle( "CymbalFree", CDTXMania.app.ConfigIni.bシンバルフリー, + this.iSystemCymbalFree = new CItemToggle("CymbalFree", CDTXMania.app.ConfigIni.bシンバルフリー, "シンバルフリーモード:\n" + "左シンバル・右シンバルの区別をなくします。ライドシンバルまで区別をなくすか否かは、CYGroup に従います。\n", "Turn ON to group LC (left cymbal) and CY (right cymbal).\n" + - "Whether RD (ride cymbal) is also grouped or not depends on the 'CY Group' setting." ); - this.list項目リスト.Add( this.iSystemCymbalFree ); + "Whether RD (ride cymbal) is also grouped or not depends on the 'CY Group' setting."); + this.list項目リスト.Add(this.iSystemCymbalFree); #region [ SoundPriority ] - this.iSystemHitSoundPriorityHH = new CItemList( "HH Priority", CItemBase.Eパネル種別.通常, (int) CDTXMania.app.ConfigIni.eHitSoundPriorityHH, + this.iSystemHitSoundPriorityHH = new CItemList("HH Priority", CItemBase.Eパネル種別.通常, (int)CDTXMania.app.ConfigIni.eHitSoundPriorityHH, "発声音決定の優先順位:\n" + "ハイハットレーン打ち分け有効時に、チップの発声音をどのように決定するかを指定します。\n" + " C > P ... チップの音が優先\n" + @@ -810,10 +810,10 @@ namespace DTXMania " Pad sound is prior to the chip sound.\n" + "\n" + "* This value cannot be changed while BD Group is set as BD-1.", - new string[] { "C>P", "P>C" } ); - this.list項目リスト.Add( this.iSystemHitSoundPriorityHH ); + new string[] { "C>P", "P>C" }); + this.list項目リスト.Add(this.iSystemHitSoundPriorityHH); - this.iSystemHitSoundPriorityFT = new CItemList( "FT Priority", CItemBase.Eパネル種別.通常, (int) CDTXMania.app.ConfigIni.eHitSoundPriorityFT, + this.iSystemHitSoundPriorityFT = new CItemList("FT Priority", CItemBase.Eパネル種別.通常, (int)CDTXMania.app.ConfigIni.eHitSoundPriorityFT, "発声音決定の優先順位:\n" + "フロアタム打ち分け有効時に、チップの発声音をどのように決定するかを指定します。\n" + " C > P ... チップの音が優先\n" + @@ -824,10 +824,10 @@ namespace DTXMania " Chip sound is prior to the pad sound.\n" + "P>C:\n" + " Pad sound is prior to the chip sound.", - new string[] { "C>P", "P>C" } ); - this.list項目リスト.Add( this.iSystemHitSoundPriorityFT ); + new string[] { "C>P", "P>C" }); + this.list項目リスト.Add(this.iSystemHitSoundPriorityFT); - this.iSystemHitSoundPriorityCY = new CItemList( "CY Priority", CItemBase.Eパネル種別.通常, (int) CDTXMania.app.ConfigIni.eHitSoundPriorityCY, + this.iSystemHitSoundPriorityCY = new CItemList("CY Priority", CItemBase.Eパネル種別.通常, (int)CDTXMania.app.ConfigIni.eHitSoundPriorityCY, "発声音決定の優先順位:\n" + "シンバルレーン打ち分け有効時に、チップの発声音をどのように決定するかを指定します。\n" + " C > P ... チップの音が優先\n" + @@ -838,18 +838,18 @@ namespace DTXMania " Chip sound is prior to the pad sound.\n" + "P>C:\n" + " Pad sound is prior to the chip sound.", - new string[] { "C>P", "P>C" } ); - this.list項目リスト.Add( this.iSystemHitSoundPriorityCY ); + new string[] { "C>P", "P>C" }); + this.list項目リスト.Add(this.iSystemHitSoundPriorityCY); #endregion - this.iSystemFillIn = new CItemToggle( "FillIn", CDTXMania.app.ConfigIni.bフィルイン有効, + this.iSystemFillIn = new CItemToggle("FillIn", CDTXMania.app.ConfigIni.bフィルイン有効, "フィルインエフェクトの使用:\n" + "フィルイン区間の爆発パターンに特別のエフェクトを使用します。\n" + "フィルインエフェクトの描画にはそれなりのマシンパワーが必要とされます。", - "To show bursting effects at the fill-in zone." ); - this.list項目リスト.Add( this.iSystemFillIn ); + "To show bursting effects at the fill-in zone."); + this.list項目リスト.Add(this.iSystemFillIn); - this.iSystemHitSound = new CItemToggle( "HitSound", CDTXMania.app.ConfigIni.bドラム打音を発声する, + this.iSystemHitSound = new CItemToggle("HitSound", CDTXMania.app.ConfigIni.bドラム打音を発声する, "打撃音の再生:\n" + "これをOFFにすると、パッドを叩いたときの音を再生しなくなります(ドラムのみ)。\n" + "電子ドラム本来の音色で演奏したい場合などにOFF にします。\n" + @@ -858,46 +858,46 @@ namespace DTXMania "Turn OFF if you don't want to play hitting chip sound.\n" + "It is useful to play with real/electric drums kit.\n" + "\n" + - "Warning: You should not use BD Group BD-1 with HitSound OFF.\n" ); - this.list項目リスト.Add( this.iSystemHitSound ); + "Warning: You should not use BD Group BD-1 with HitSound OFF.\n"); + this.list項目リスト.Add(this.iSystemHitSound); - this.iSystemSoundMonitorDrums = new CItemToggle( "DrumsMonitor", CDTXMania.app.ConfigIni.b演奏音を強調する.Drums, + this.iSystemSoundMonitorDrums = new CItemToggle("DrumsMonitor", CDTXMania.app.ConfigIni.b演奏音を強調する.Drums, "ドラム音モニタ:\n" + "ドラム音を他の音より大きめの音量で発声します。\n" + "ただし、オートプレイの場合は通常音量で発声されます。", - "To enhance the drums chip sound (except autoplay)." ); - this.list項目リスト.Add( this.iSystemSoundMonitorDrums ); + "To enhance the drums chip sound (except autoplay)."); + this.list項目リスト.Add(this.iSystemSoundMonitorDrums); - this.iSystemMinComboDrums = new CItemInteger( "D-MinCombo", 1, 0x1869f, CDTXMania.app.ConfigIni.n表示可能な最小コンボ数.Drums, + this.iSystemMinComboDrums = new CItemInteger("D-MinCombo", 1, 0x1869f, CDTXMania.app.ConfigIni.n表示可能な最小コンボ数.Drums, "表示可能な最小コンボ数(ドラム):\n" + "画面に表示されるコンボの最小の数を指定します。\n" + "1 ~ 99999 の値が指定可能です。", "Initial number to show the combo for the drums.\n" + - "You can specify from 1 to 99999." ); - this.list項目リスト.Add( this.iSystemMinComboDrums ); + "You can specify from 1 to 99999."); + this.list項目リスト.Add(this.iSystemMinComboDrums); // #23580 2011.1.3 yyagi - this.iDrumsInputAdjustTimeMs = new CItemInteger( "InputAdjust", -99, 99, CDTXMania.app.ConfigIni.nInputAdjustTimeMs.Drums, + this.iDrumsInputAdjustTimeMs = new CItemInteger("InputAdjust", -99, 99, CDTXMania.app.ConfigIni.nInputAdjustTimeMs.Drums, "ドラムの入力タイミングの微調整を行います。\n" + "-99 ~ 99ms まで指定可能です。\n" + "入力ラグを軽減するためには、負の値を指定してください。", "To adjust the drums input timing.\n" + "You can set from -99 to 99ms.\n" + - "To decrease input lag, set minus value." ); - this.list項目リスト.Add( this.iDrumsInputAdjustTimeMs ); + "To decrease input lag, set minus value."); + this.list項目リスト.Add(this.iDrumsInputAdjustTimeMs); // #24074 2011.01.23 add ikanick - this.iDrumsGraph = new CItemToggle( "Graph", CDTXMania.app.ConfigIni.bGraph.Drums, + this.iDrumsGraph = new CItemToggle("Graph", CDTXMania.app.ConfigIni.bGraph.Drums, "最高スキルと比較できるグラフを表示します。\n" + "オートプレイだと表示されません。", - "To draw Graph or not." ); - this.list項目リスト.Add( this.iDrumsGraph ); + "To draw Graph or not."); + this.list項目リスト.Add(this.iDrumsGraph); - this.iDrumsGoToKeyAssign = new CItemBase( "Drums Keys", CItemBase.Eパネル種別.通常, + this.iDrumsGoToKeyAssign = new CItemBase("Drums Keys", CItemBase.Eパネル種別.通常, "ドラムのキー入力に関する項目を設定します。", - "Settings for the drums key/pad inputs." ); - this.list項目リスト.Add( this.iDrumsGoToKeyAssign ); + "Settings for the drums key/pad inputs."); + this.list項目リスト.Add(this.iDrumsGoToKeyAssign); OnListMenuの初期化(); this.n現在の選択項目 = 0; @@ -912,46 +912,46 @@ namespace DTXMania // #27029 2012.1.5 from: 説明文は最大9行→13行に変更。 - this.iGuitarReturnToMenu = new CItemBase( "<< Return To Menu", CItemBase.Eパネル種別.その他, + this.iGuitarReturnToMenu = new CItemBase("<< Return To Menu", CItemBase.Eパネル種別.その他, "左側のメニューに戻ります。", - "Return to left menu." ); - this.list項目リスト.Add( this.iGuitarReturnToMenu ); + "Return to left menu."); + this.list項目リスト.Add(this.iGuitarReturnToMenu); #region [ AutoPlay ] - this.iGuitarAutoPlayAll = new CItemThreeState( "AutoPlay (All)", CItemThreeState.E状態.不定, + this.iGuitarAutoPlayAll = new CItemThreeState("AutoPlay (All)", CItemThreeState.E状態.不定, "全ネック/ピックの自動演奏の ON/OFF をまとめて切り替えます。", - "You can change whether Auto or not for all guitar neck/pick at once." ); - this.list項目リスト.Add( this.iGuitarAutoPlayAll ); - this.iGuitarR = new CItemToggle( " R", CDTXMania.app.ConfigIni.bAutoPlay.GtR, + "You can change whether Auto or not for all guitar neck/pick at once."); + this.list項目リスト.Add(this.iGuitarAutoPlayAll); + this.iGuitarR = new CItemToggle(" R", CDTXMania.app.ConfigIni.bAutoPlay.GtR, "Rネックを自動で演奏します。", - "To play R neck automatically." ); - this.list項目リスト.Add( this.iGuitarR ); - this.iGuitarG = new CItemToggle( " G", CDTXMania.app.ConfigIni.bAutoPlay.GtG, + "To play R neck automatically."); + this.list項目リスト.Add(this.iGuitarR); + this.iGuitarG = new CItemToggle(" G", CDTXMania.app.ConfigIni.bAutoPlay.GtG, "Gネックを自動で演奏します。", - "To play G neck automatically." ); - this.list項目リスト.Add( this.iGuitarG ); - this.iGuitarB = new CItemToggle( " B", CDTXMania.app.ConfigIni.bAutoPlay.GtB, + "To play G neck automatically."); + this.list項目リスト.Add(this.iGuitarG); + this.iGuitarB = new CItemToggle(" B", CDTXMania.app.ConfigIni.bAutoPlay.GtB, "Bネックを自動で演奏します。", - "To play B neck automatically." ); - this.list項目リスト.Add( this.iGuitarB ); - this.iGuitarPick = new CItemToggle( " Pick", CDTXMania.app.ConfigIni.bAutoPlay.GtPick, + "To play B neck automatically."); + this.list項目リスト.Add(this.iGuitarB); + this.iGuitarPick = new CItemToggle(" Pick", CDTXMania.app.ConfigIni.bAutoPlay.GtPick, "ピックを自動で演奏します。", - "To play Pick automatically." ); - this.list項目リスト.Add( this.iGuitarPick ); - this.iGuitarW = new CItemToggle( " Wailing", CDTXMania.app.ConfigIni.bAutoPlay.GtW, + "To play Pick automatically."); + this.list項目リスト.Add(this.iGuitarPick); + this.iGuitarW = new CItemToggle(" Wailing", CDTXMania.app.ConfigIni.bAutoPlay.GtW, "ウェイリングを自動で演奏します。", - "To play wailing automatically." ); - this.list項目リスト.Add( this.iGuitarW ); + "To play wailing automatically."); + this.list項目リスト.Add(this.iGuitarW); #endregion - this.iGuitarScrollSpeed = new CItemInteger( "ScrollSpeed", 0, 0x7cf, CDTXMania.app.ConfigIni.n譜面スクロール速度.Guitar, + this.iGuitarScrollSpeed = new CItemInteger("ScrollSpeed", 0, 0x7cf, CDTXMania.app.ConfigIni.n譜面スクロール速度.Guitar, "演奏時のギター譜面のスクロールの速度を指定します。\n" + "x0.5 ~ x1000.0 までを指定可能です。", "To change the scroll speed for the guitar lanes.\n" + "You can set it from x0.5 to x1000.0.\n" + - "(ScrollSpeed=x0.5 means half speed)" ); - this.list項目リスト.Add( this.iGuitarScrollSpeed ); + "(ScrollSpeed=x0.5 means half speed)"); + this.list項目リスト.Add(this.iGuitarScrollSpeed); - this.iGuitarSudHid = new CItemList( "Sud+Hid", CItemBase.Eパネル種別.通常, getDefaultSudHidValue( E楽器パート.GUITAR ), + this.iGuitarSudHid = new CItemList("Sud+Hid", CItemBase.Eパネル種別.通常, getDefaultSudHidValue(E楽器パート.GUITAR), "ギターチップの表示方式:\n" + "OFF:  チップを常に表示します。\n" + "Sudden: チップがヒットバー付近に来るまで表示\n" + @@ -980,8 +980,8 @@ namespace DTXMania " you've gotten Bad.\n" + "F(ull)-Invisible:\n" + " You can't see the chips at all.", - new string[] { "OFF", "Sudden", "Hidden", "Sud+Hid", "S-Invisible", "F-Invisible" } ); - this.list項目リスト.Add( this.iGuitarSudHid ); + new string[] { "OFF", "Sudden", "Hidden", "Sud+Hid", "S-Invisible", "F-Invisible" }); + this.list項目リスト.Add(this.iGuitarSudHid); //this.iGuitarSudden = new CItemToggle( "Sudden", CDTXMania.app.ConfigIni.bSudden.Guitar, // "ギターチップがヒットバー付近にくる\nまで表示されなくなります。", @@ -1002,20 +1002,20 @@ namespace DTXMania // new string[] { "OFF", "HALF", "ON" } ); //this.list項目リスト.Add( this.iGuitarInvisible ); - this.iGuitarReverse = new CItemToggle( "Reverse", CDTXMania.app.ConfigIni.bReverse.Guitar, + this.iGuitarReverse = new CItemToggle("Reverse", CDTXMania.app.ConfigIni.bReverse.Guitar, "ギターチップが譜面の上から下に流れるようになります。", - "The scroll way is reversed. Guitar chips flow from the top to the bottom." ); - this.list項目リスト.Add( this.iGuitarReverse ); + "The scroll way is reversed. Guitar chips flow from the top to the bottom."); + this.list項目リスト.Add(this.iGuitarReverse); - this.iSystemJudgePosGuitar = new CItemList( "JudgePos", CItemBase.Eパネル種別.通常, (int) CDTXMania.app.ConfigIni.e判定位置.Guitar, + this.iSystemJudgePosGuitar = new CItemList("JudgePos", CItemBase.Eパネル種別.通常, (int)CDTXMania.app.ConfigIni.e判定位置.Guitar, "判定ライン表示位置:\n" + "判定ラインとRGBボタンが、少し下側に表示されるようになります。", "Judge Line position:\n" + "The judge line and RGB buttons will be displayed lower position.", - new string[] { "Normal", "Lower" } ); - this.list項目リスト.Add( this.iSystemJudgePosGuitar ); + new string[] { "Normal", "Lower" }); + this.list項目リスト.Add(this.iSystemJudgePosGuitar); - this.iGuitarPosition = new CItemList( "Position", CItemBase.Eパネル種別.通常, (int) CDTXMania.app.ConfigIni.判定文字表示位置.Guitar, + this.iGuitarPosition = new CItemList("Position", CItemBase.Eパネル種別.通常, (int)CDTXMania.app.ConfigIni.判定文字表示位置.Guitar, "ギターの判定文字の表示位置を指定します。\n" + " P-A: レーン上\n" + " P-B: 判定ラインの上\n" + @@ -1028,8 +1028,8 @@ namespace DTXMania " P-B: over the hit bar.\n" + " P-C: under the COMBO indication.\n" + " OFF: no judgement mark.", - new string[] { "OFF", "P-A", "P-B", "P-C" } ); - this.list項目リスト.Add( this.iGuitarPosition ); + new string[] { "OFF", "P-A", "P-B", "P-C" }); + this.list項目リスト.Add(this.iGuitarPosition); //this.iGuitarJudgeDispPriority = new CItemList( "JudgePriority", CItemBase.Eパネル種別.通常, (int) CDTXMania.app.ConfigIni.e判定表示優先度.Guitar, // "判定文字列とコンボ表示の優先順位を\n" + @@ -1045,7 +1045,7 @@ namespace DTXMania // new string[] { "Under", "Over" } ); //this.list項目リスト.Add( this.iGuitarJudgeDispPriority ); - this.iGuitarRandom = new CItemList( "Random", CItemBase.Eパネル種別.通常, (int) CDTXMania.app.ConfigIni.eRandom.Guitar, + this.iGuitarRandom = new CItemList("Random", CItemBase.Eパネル種別.通常, (int)CDTXMania.app.ConfigIni.eRandom.Guitar, "ギターのチップがランダムに降ってきます。\n" + " Part: 小節・レーン単位で交換\n" + " Super: チップ単位で交換\n" + @@ -1055,46 +1055,46 @@ namespace DTXMania " Part: swapping lanes randomly for each measures.\n" + " Super: swapping chip randomly\n" + " Hyper: swapping randomly (number of lanes also changes)", - new string[] { "OFF", "Part", "Super", "Hyper" } ); - this.list項目リスト.Add( this.iGuitarRandom ); - this.iGuitarLight = new CItemToggle( "Light", CDTXMania.app.ConfigIni.bLight.Guitar, + new string[] { "OFF", "Part", "Super", "Hyper" }); + this.list項目リスト.Add(this.iGuitarRandom); + this.iGuitarLight = new CItemToggle("Light", CDTXMania.app.ConfigIni.bLight.Guitar, "ギターチップのないところでピッキングしても BAD になりません。", - "Even if you pick without any chips, it doesn't become BAD." ); - this.list項目リスト.Add( this.iGuitarLight ); - this.iGuitarLeft = new CItemToggle( "Left", CDTXMania.app.ConfigIni.bLeft.Guitar, + "Even if you pick without any chips, it doesn't become BAD."); + this.list項目リスト.Add(this.iGuitarLight); + this.iGuitarLeft = new CItemToggle("Left", CDTXMania.app.ConfigIni.bLeft.Guitar, "ギターの RGB の並びが左右反転します。(左利きモード)", - "Lane order 'R-G-B' becomes 'B-G-R' for lefty." ); - this.list項目リスト.Add( this.iGuitarLeft ); + "Lane order 'R-G-B' becomes 'B-G-R' for lefty."); + this.list項目リスト.Add(this.iGuitarLeft); - this.iSystemSoundMonitorGuitar = new CItemToggle( "GuitarMonitor", CDTXMania.app.ConfigIni.b演奏音を強調する.Guitar, + this.iSystemSoundMonitorGuitar = new CItemToggle("GuitarMonitor", CDTXMania.app.ConfigIni.b演奏音を強調する.Guitar, "ギター音モニタ:\n" + "ギター音を他の音より大きめの音量で発声します。\n" + "ただし、オートプレイの場合は通常音量で発声されます。", - "To enhance the guitar chip sound (except autoplay)." ); - this.list項目リスト.Add( this.iSystemSoundMonitorGuitar ); - this.iSystemMinComboGuitar = new CItemInteger( "G-MinCombo", 1, 0x1869f, CDTXMania.app.ConfigIni.n表示可能な最小コンボ数.Guitar, + "To enhance the guitar chip sound (except autoplay)."); + this.list項目リスト.Add(this.iSystemSoundMonitorGuitar); + this.iSystemMinComboGuitar = new CItemInteger("G-MinCombo", 1, 0x1869f, CDTXMania.app.ConfigIni.n表示可能な最小コンボ数.Guitar, "表示可能な最小コンボ数(ギター):\n" + "画面に表示されるコンボの最小の数を指定します。\n" + "1 ~ 99999 の値が指定可能です。", "Initial number to show the combo for the guitar.\n" + - "You can specify from 1 to 99999." ); - this.list項目リスト.Add( this.iSystemMinComboGuitar ); + "You can specify from 1 to 99999."); + this.list項目リスト.Add(this.iSystemMinComboGuitar); // #23580 2011.1.3 yyagi - this.iGuitarInputAdjustTimeMs = new CItemInteger( "InputAdjust", -99, 99, CDTXMania.app.ConfigIni.nInputAdjustTimeMs.Guitar, + this.iGuitarInputAdjustTimeMs = new CItemInteger("InputAdjust", -99, 99, CDTXMania.app.ConfigIni.nInputAdjustTimeMs.Guitar, "ギターの入力タイミングの微調整を行います。\n" + "-99 ~ 99ms まで指定可能です。\n" + "入力ラグを軽減するためには、負の値を指定してください。", "To adjust the guitar input timing.\n" + "You can set from -99 to 99ms.\n" + - "To decrease input lag, set minus value." ); - this.list項目リスト.Add( this.iGuitarInputAdjustTimeMs ); + "To decrease input lag, set minus value."); + this.list項目リスト.Add(this.iGuitarInputAdjustTimeMs); - this.iGuitarGoToKeyAssign = new CItemBase( "Guitar Keys", CItemBase.Eパネル種別.通常, + this.iGuitarGoToKeyAssign = new CItemBase("Guitar Keys", CItemBase.Eパネル種別.通常, "ギターのキー入力に関する項目を設定します。", - "Settings for the guitar key/pad inputs." ); - this.list項目リスト.Add( this.iGuitarGoToKeyAssign ); + "Settings for the guitar key/pad inputs."); + this.list項目リスト.Add(this.iGuitarGoToKeyAssign); OnListMenuの初期化(); this.n現在の選択項目 = 0; @@ -1109,47 +1109,47 @@ namespace DTXMania // #27029 2012.1.5 from: 説明文は最大9行→13行に変更。 - this.iBassReturnToMenu = new CItemBase( "<< Return To Menu", CItemBase.Eパネル種別.その他, + this.iBassReturnToMenu = new CItemBase("<< Return To Menu", CItemBase.Eパネル種別.その他, "左側のメニューに戻ります。", - "Return to left menu." ); - this.list項目リスト.Add( this.iBassReturnToMenu ); + "Return to left menu."); + this.list項目リスト.Add(this.iBassReturnToMenu); #region [ AutoPlay ] - this.iBassAutoPlayAll = new CItemThreeState( "AutoPlay (All)", CItemThreeState.E状態.不定, + this.iBassAutoPlayAll = new CItemThreeState("AutoPlay (All)", CItemThreeState.E状態.不定, "全ネック/ピックの自動演奏の ON/OFF をまとめて切り替えます。", - "You can change whether Auto or not for all bass neck/pick at once." ); - this.list項目リスト.Add( this.iBassAutoPlayAll ); - this.iBassR = new CItemToggle( " R", CDTXMania.app.ConfigIni.bAutoPlay.BsR, + "You can change whether Auto or not for all bass neck/pick at once."); + this.list項目リスト.Add(this.iBassAutoPlayAll); + this.iBassR = new CItemToggle(" R", CDTXMania.app.ConfigIni.bAutoPlay.BsR, "Rネックを自動で演奏します。", - "To play R neck automatically." ); - this.list項目リスト.Add( this.iBassR ); - this.iBassG = new CItemToggle( " G", CDTXMania.app.ConfigIni.bAutoPlay.BsG, + "To play R neck automatically."); + this.list項目リスト.Add(this.iBassR); + this.iBassG = new CItemToggle(" G", CDTXMania.app.ConfigIni.bAutoPlay.BsG, "Gネックを自動で演奏します。", - "To play G neck automatically." ); - this.list項目リスト.Add( this.iBassG ); - this.iBassB = new CItemToggle( " B", CDTXMania.app.ConfigIni.bAutoPlay.BsB, + "To play G neck automatically."); + this.list項目リスト.Add(this.iBassG); + this.iBassB = new CItemToggle(" B", CDTXMania.app.ConfigIni.bAutoPlay.BsB, "Bネックを自動で演奏します。", - "To play B neck automatically." ); - this.list項目リスト.Add( this.iBassB ); - this.iBassPick = new CItemToggle( " Pick", CDTXMania.app.ConfigIni.bAutoPlay.BsPick, + "To play B neck automatically."); + this.list項目リスト.Add(this.iBassB); + this.iBassPick = new CItemToggle(" Pick", CDTXMania.app.ConfigIni.bAutoPlay.BsPick, "ピックを自動で演奏します。", - "To play Pick automatically." ); - this.list項目リスト.Add( this.iBassPick ); - this.iBassW = new CItemToggle( " Wailing", CDTXMania.app.ConfigIni.bAutoPlay.BsW, + "To play Pick automatically."); + this.list項目リスト.Add(this.iBassPick); + this.iBassW = new CItemToggle(" Wailing", CDTXMania.app.ConfigIni.bAutoPlay.BsW, "ウェイリングを自動で演奏します。", - "To play wailing automatically." ); - this.list項目リスト.Add( this.iBassW ); + "To play wailing automatically."); + this.list項目リスト.Add(this.iBassW); #endregion - this.iBassScrollSpeed = new CItemInteger( "ScrollSpeed", 0, 0x7cf, CDTXMania.app.ConfigIni.n譜面スクロール速度.Bass, + this.iBassScrollSpeed = new CItemInteger("ScrollSpeed", 0, 0x7cf, CDTXMania.app.ConfigIni.n譜面スクロール速度.Bass, "演奏時のベース譜面のスクロールの速度を指定します。\n" + "x0.5 ~ x1000.0 までを指定可能です。", "To change the scroll speed for the bass lanes.\n" + "You can set it from x0.5 to x1000.0.\n" + - "(ScrollSpeed=x0.5 means half speed)" ); - this.list項目リスト.Add( this.iBassScrollSpeed ); + "(ScrollSpeed=x0.5 means half speed)"); + this.list項目リスト.Add(this.iBassScrollSpeed); - this.iBassSudHid = new CItemList( "Sud+Hid", CItemBase.Eパネル種別.通常, getDefaultSudHidValue( E楽器パート.BASS ), + this.iBassSudHid = new CItemList("Sud+Hid", CItemBase.Eパネル種別.通常, getDefaultSudHidValue(E楽器パート.BASS), "ベースチップの表示方式:\n" + "OFF:  チップを常に表示します。\n" + "Sudden: チップがヒットバー付近に来るまで表示\n" + @@ -1178,8 +1178,8 @@ namespace DTXMania " you've gotten Bad.\n" + "F(ull)-Invisible:\n" + " You can't see the chips at all.", - new string[] { "OFF", "Sudden", "Hidden", "Sud+Hid", "S-Invisible", "F-Invisible" } ); - this.list項目リスト.Add( this.iBassSudHid ); + new string[] { "OFF", "Sudden", "Hidden", "Sud+Hid", "S-Invisible", "F-Invisible" }); + this.list項目リスト.Add(this.iBassSudHid); //this.iBassSudden = new CItemToggle( "Sudden", CDTXMania.app.ConfigIni.bSudden.Bass, // "ベースチップがヒットバー付近にくる\nまで表示されなくなります。", @@ -1200,21 +1200,21 @@ namespace DTXMania // new string[] { "OFF", "HALF", "ON"} ); //this.list項目リスト.Add( this.iBassInvisible ); - this.iBassReverse = new CItemToggle( "Reverse", CDTXMania.app.ConfigIni.bReverse.Bass, + this.iBassReverse = new CItemToggle("Reverse", CDTXMania.app.ConfigIni.bReverse.Bass, "ベースチップが譜面の上から下に流れるようになります。", - "The scroll way is reversed. Bass chips flow from the top to the bottom." ); - this.list項目リスト.Add( this.iBassReverse ); + "The scroll way is reversed. Bass chips flow from the top to the bottom."); + this.list項目リスト.Add(this.iBassReverse); - this.iSystemJudgePosBass = new CItemList( "JudgePos", CItemBase.Eパネル種別.通常, (int) CDTXMania.app.ConfigIni.e判定位置.Bass, + this.iSystemJudgePosBass = new CItemList("JudgePos", CItemBase.Eパネル種別.通常, (int)CDTXMania.app.ConfigIni.e判定位置.Bass, "判定ライン表示位置:\n" + "判定ラインとRGBボタンが、少し下側に表示されるようになります。", "Judge Line position:\n" + "The judge line and RGB buttons will be displayed lower position.", - new string[] { "Normal", "Lower" } ); - this.list項目リスト.Add( this.iSystemJudgePosBass ); - - this.iBassPosition = new CItemList( "Position", CItemBase.Eパネル種別.通常, - (int) CDTXMania.app.ConfigIni.判定文字表示位置.Bass, + new string[] { "Normal", "Lower" }); + this.list項目リスト.Add(this.iSystemJudgePosBass); + + this.iBassPosition = new CItemList("Position", CItemBase.Eパネル種別.通常, + (int)CDTXMania.app.ConfigIni.判定文字表示位置.Bass, "ベースの判定文字の表示位置を指定します。\n" + " P-A: レーン上\n" + " P-B: 判定ラインの上\n" + @@ -1227,8 +1227,8 @@ namespace DTXMania " P-B: over the hit bar.\n" + " P-C: under the COMBO indication.\n" + " OFF: no judgement mark.", - new string[] { "OFF", "P-A", "P-B", "P-C" } ); - this.list項目リスト.Add( this.iBassPosition ); + new string[] { "OFF", "P-A", "P-B", "P-C" }); + this.list項目リスト.Add(this.iBassPosition); //this.iBassJudgeDispPriority = new CItemList( "JudgePriority", CItemBase.Eパネル種別.通常, (int) CDTXMania.app.ConfigIni.e判定表示優先度.Bass, //"判定文字列とコンボ表示の優先順位を\n" + @@ -1244,8 +1244,8 @@ namespace DTXMania //new string[] { "Under", "Over" } ); //this.list項目リスト.Add( this.iBassJudgeDispPriority ); - this.iBassRandom = new CItemList( "Random", CItemBase.Eパネル種別.通常, - (int) CDTXMania.app.ConfigIni.eRandom.Bass, + this.iBassRandom = new CItemList("Random", CItemBase.Eパネル種別.通常, + (int)CDTXMania.app.ConfigIni.eRandom.Bass, "ベースのチップがランダムに降ってきます。\n" + " Part: 小節・レーン単位で交換\n" + " Super: チップ単位で交換\n" + @@ -1255,47 +1255,47 @@ namespace DTXMania " Part: swapping lanes randomly for each measures.\n" + " Super: swapping chip randomly\n" + " Hyper: swapping randomly (number of lanes also changes)", - new string[] { "OFF", "Part", "Super", "Hyper" } ); - this.list項目リスト.Add( this.iBassRandom ); - this.iBassLight = new CItemToggle( "Light", CDTXMania.app.ConfigIni.bLight.Bass, + new string[] { "OFF", "Part", "Super", "Hyper" }); + this.list項目リスト.Add(this.iBassRandom); + this.iBassLight = new CItemToggle("Light", CDTXMania.app.ConfigIni.bLight.Bass, "ベースチップのないところでピッキングしても BAD になりません。", - "Even if you pick without any chips, it doesn't become BAD." ); - this.list項目リスト.Add( this.iBassLight ); - this.iBassLeft = new CItemToggle( "Left", CDTXMania.app.ConfigIni.bLeft.Bass, + "Even if you pick without any chips, it doesn't become BAD."); + this.list項目リスト.Add(this.iBassLight); + this.iBassLeft = new CItemToggle("Left", CDTXMania.app.ConfigIni.bLeft.Bass, "ベースの RGB の並びが左右反転します。(左利きモード)", - "Lane order 'R-G-B' becomes 'B-G-R' for lefty." ); - this.list項目リスト.Add( this.iBassLeft ); + "Lane order 'R-G-B' becomes 'B-G-R' for lefty."); + this.list項目リスト.Add(this.iBassLeft); - this.iSystemSoundMonitorBass = new CItemToggle( "BassMonitor", CDTXMania.app.ConfigIni.b演奏音を強調する.Bass, + this.iSystemSoundMonitorBass = new CItemToggle("BassMonitor", CDTXMania.app.ConfigIni.b演奏音を強調する.Bass, "ベース音モニタ:\n" + "ベース音を他の音より大きめの音量で発声します。\n" + "ただし、オートプレイの場合は通常音量で発声されます。", - "To enhance the bass chip sound (except autoplay)." ); - this.list項目リスト.Add( this.iSystemSoundMonitorBass ); + "To enhance the bass chip sound (except autoplay)."); + this.list項目リスト.Add(this.iSystemSoundMonitorBass); - this.iSystemMinComboBass = new CItemInteger( "B-MinCombo", 1, 0x1869f, CDTXMania.app.ConfigIni.n表示可能な最小コンボ数.Bass, + this.iSystemMinComboBass = new CItemInteger("B-MinCombo", 1, 0x1869f, CDTXMania.app.ConfigIni.n表示可能な最小コンボ数.Bass, "表示可能な最小コンボ数(ベース):\n" + "画面に表示されるコンボの最小の数を指定します。\n" + "1 ~ 99999 の値が指定可能です。", "Initial number to show the combo for the bass.\n" + - "You can specify from 1 to 99999." ); - this.list項目リスト.Add( this.iSystemMinComboBass ); + "You can specify from 1 to 99999."); + this.list項目リスト.Add(this.iSystemMinComboBass); // #23580 2011.1.3 yyagi - this.iBassInputAdjustTimeMs = new CItemInteger( "InputAdjust", -99, 99, CDTXMania.app.ConfigIni.nInputAdjustTimeMs.Bass, + this.iBassInputAdjustTimeMs = new CItemInteger("InputAdjust", -99, 99, CDTXMania.app.ConfigIni.nInputAdjustTimeMs.Bass, "ベースの入力タイミングの微調整を行います。\n" + "-99 ~ 99ms まで指定可能です。\n" + "入力ラグを軽減するためには、負の値を指定してください。", "To adjust the bass input timing.\n" + "You can set from -99 to 99ms.\n" + - "To decrease input lag, set minus value." ); - this.list項目リスト.Add( this.iBassInputAdjustTimeMs ); + "To decrease input lag, set minus value."); + this.list項目リスト.Add(this.iBassInputAdjustTimeMs); - this.iBassGoToKeyAssign = new CItemBase( "Bass Keys", CItemBase.Eパネル種別.通常, + this.iBassGoToKeyAssign = new CItemBase("Bass Keys", CItemBase.Eパネル種別.通常, "ベースのキー入力に関する項目を設定します。", - "Settings for the bass key/pad inputs." ); - this.list項目リスト.Add( this.iBassGoToKeyAssign ); + "Settings for the bass key/pad inputs."); + this.list項目リスト.Add(this.iBassGoToKeyAssign); OnListMenuの初期化(); this.n現在の選択項目 = 0; @@ -1313,18 +1313,18 @@ namespace DTXMania /// 4: Semi-Invisible /// 5: Full-Invisible /// - private int getDefaultSudHidValue( E楽器パート eInst ) + private int getDefaultSudHidValue(E楽器パート eInst) { int defvar; - int nInst = (int) eInst; - if ( CDTXMania.app.ConfigIni.eInvisible[ nInst ] != EInvisible.OFF ) + int nInst = (int)eInst; + if (CDTXMania.app.ConfigIni.eInvisible[nInst] != EInvisible.OFF) { - defvar = (int) CDTXMania.app.ConfigIni.eInvisible[ nInst ] + 3; + defvar = (int)CDTXMania.app.ConfigIni.eInvisible[nInst] + 3; } else { - defvar = ( CDTXMania.app.ConfigIni.bSudden[ nInst ] ? 1 : 0 ) + - ( CDTXMania.app.ConfigIni.bHidden[ nInst ] ? 2 : 0 ); + defvar = (CDTXMania.app.ConfigIni.bSudden[nInst] ? 1 : 0) + + (CDTXMania.app.ConfigIni.bHidden[nInst] ? 2 : 0); } return defvar; } @@ -1334,24 +1334,24 @@ namespace DTXMania /// public void tEsc押下() { - if ( this.b要素値にフォーカス中 ) // #32059 2013.9.17 add yyagi + if (this.b要素値にフォーカス中) // #32059 2013.9.17 add yyagi { this.b要素値にフォーカス中 = false; } - if ( this.eメニュー種別 == Eメニュー種別.KeyAssignSystem ) + if (this.eメニュー種別 == Eメニュー種別.KeyAssignSystem) { t項目リストの設定_System(); } - else if ( this.eメニュー種別 == Eメニュー種別.KeyAssignDrums ) + else if (this.eメニュー種別 == Eメニュー種別.KeyAssignDrums) { t項目リストの設定_Drums(); } - else if ( this.eメニュー種別 == Eメニュー種別.KeyAssignGuitar ) + else if (this.eメニュー種別 == Eメニュー種別.KeyAssignGuitar) { t項目リストの設定_Guitar(); } - else if ( this.eメニュー種別 == Eメニュー種別.KeyAssignBass ) + else if (this.eメニュー種別 == Eメニュー種別.KeyAssignBass) { t項目リストの設定_Bass(); } @@ -1360,244 +1360,245 @@ namespace DTXMania public void tEnter押下() { CDTXMania.app.Skin.sound決定音.t再生する(); - if( this.b要素値にフォーカス中 ) + if (this.b要素値にフォーカス中) { this.b要素値にフォーカス中 = false; } - else if( this.list項目リスト[ this.n現在の選択項目 ].e種別 == CItemBase.E種別.整数 ) + else if (this.list項目リスト[this.n現在の選択項目].e種別 == CItemBase.E種別.整数) { this.b要素値にフォーカス中 = true; } - else if( this.b現在選択されている項目はReturnToMenuである ) + else if (this.b現在選択されている項目はReturnToMenuである) { //this.tConfigIniへ記録する(); //CONFIG中にスキン変化が発生すると面倒なので、一旦マスクした。 } #region [ 個々のキーアサイン ] - else if( this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignDrumsLC ) + else if (this.list項目リスト[this.n現在の選択項目] == this.iKeyAssignDrumsLC) { - CDTXMania.app.stageコンフィグ.tパッド選択通知( EKeyConfigPart.DRUMS, EKeyConfigPad.LC ); + CDTXMania.app.stageコンフィグ.tパッド選択通知(EKeyConfigPart.DRUMS, EKeyConfigPad.LC); } - else if( this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignDrumsHHC ) + else if (this.list項目リスト[this.n現在の選択項目] == this.iKeyAssignDrumsHHC) { CDTXMania.app.stageコンフィグ.tパッド選択通知(EKeyConfigPart.DRUMS, EKeyConfigPad.HH); } - else if( this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignDrumsHHO ) + else if (this.list項目リスト[this.n現在の選択項目] == this.iKeyAssignDrumsHHO) { CDTXMania.app.stageコンフィグ.tパッド選択通知(EKeyConfigPart.DRUMS, EKeyConfigPad.HHO); } - else if( this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignDrumsSD ) + else if (this.list項目リスト[this.n現在の選択項目] == this.iKeyAssignDrumsSD) { CDTXMania.app.stageコンフィグ.tパッド選択通知(EKeyConfigPart.DRUMS, EKeyConfigPad.SD); } - else if( this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignDrumsBD ) + else if (this.list項目リスト[this.n現在の選択項目] == this.iKeyAssignDrumsBD) { CDTXMania.app.stageコンフィグ.tパッド選択通知(EKeyConfigPart.DRUMS, EKeyConfigPad.BD); } - else if( this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignDrumsHT ) + else if (this.list項目リスト[this.n現在の選択項目] == this.iKeyAssignDrumsHT) { CDTXMania.app.stageコンフィグ.tパッド選択通知(EKeyConfigPart.DRUMS, EKeyConfigPad.HT); } - else if( this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignDrumsLT ) + else if (this.list項目リスト[this.n現在の選択項目] == this.iKeyAssignDrumsLT) { CDTXMania.app.stageコンフィグ.tパッド選択通知(EKeyConfigPart.DRUMS, EKeyConfigPad.LT); } - else if( this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignDrumsFT ) + else if (this.list項目リスト[this.n現在の選択項目] == this.iKeyAssignDrumsFT) { CDTXMania.app.stageコンフィグ.tパッド選択通知(EKeyConfigPart.DRUMS, EKeyConfigPad.FT); } - else if( this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignDrumsCY ) + else if (this.list項目リスト[this.n現在の選択項目] == this.iKeyAssignDrumsCY) { CDTXMania.app.stageコンフィグ.tパッド選択通知(EKeyConfigPart.DRUMS, EKeyConfigPad.CY); } - else if( this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignDrumsRD ) + else if (this.list項目リスト[this.n現在の選択項目] == this.iKeyAssignDrumsRD) { CDTXMania.app.stageコンフィグ.tパッド選択通知(EKeyConfigPart.DRUMS, EKeyConfigPad.RD); } - else if( this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignDrumsHP ) // #27029 2012.1.4 from + else if (this.list項目リスト[this.n現在の選択項目] == this.iKeyAssignDrumsHP) // #27029 2012.1.4 from { // CDTXMania.app.stageコンフィグ.tパッド選択通知(EKeyConfigPart.DRUMS, EKeyConfigPad.HP); // } // - else if( this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignGuitarR ) + else if (this.list項目リスト[this.n現在の選択項目] == this.iKeyAssignGuitarR) { CDTXMania.app.stageコンフィグ.tパッド選択通知(EKeyConfigPart.GUITAR, EKeyConfigPad.R); } - else if( this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignGuitarG ) + else if (this.list項目リスト[this.n現在の選択項目] == this.iKeyAssignGuitarG) { CDTXMania.app.stageコンフィグ.tパッド選択通知(EKeyConfigPart.GUITAR, EKeyConfigPad.G); } - else if( this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignGuitarB ) + else if (this.list項目リスト[this.n現在の選択項目] == this.iKeyAssignGuitarB) { CDTXMania.app.stageコンフィグ.tパッド選択通知(EKeyConfigPart.GUITAR, EKeyConfigPad.B); } - else if( this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignGuitarPick ) + else if (this.list項目リスト[this.n現在の選択項目] == this.iKeyAssignGuitarPick) { CDTXMania.app.stageコンフィグ.tパッド選択通知(EKeyConfigPart.GUITAR, EKeyConfigPad.Pick); } - else if( this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignGuitarWail ) + else if (this.list項目リスト[this.n現在の選択項目] == this.iKeyAssignGuitarWail) { CDTXMania.app.stageコンフィグ.tパッド選択通知(EKeyConfigPart.GUITAR, EKeyConfigPad.Wail); } - else if( this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignGuitarDecide ) + else if (this.list項目リスト[this.n現在の選択項目] == this.iKeyAssignGuitarDecide) { CDTXMania.app.stageコンフィグ.tパッド選択通知(EKeyConfigPart.GUITAR, EKeyConfigPad.Decide); } - else if( this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignGuitarCancel ) + else if (this.list項目リスト[this.n現在の選択項目] == this.iKeyAssignGuitarCancel) { CDTXMania.app.stageコンフィグ.tパッド選択通知(EKeyConfigPart.GUITAR, EKeyConfigPad.Cancel); } - else if( this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignBassR ) + else if (this.list項目リスト[this.n現在の選択項目] == this.iKeyAssignBassR) { CDTXMania.app.stageコンフィグ.tパッド選択通知(EKeyConfigPart.BASS, EKeyConfigPad.R); } - else if( this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignBassG ) + else if (this.list項目リスト[this.n現在の選択項目] == this.iKeyAssignBassG) { CDTXMania.app.stageコンフィグ.tパッド選択通知(EKeyConfigPart.BASS, EKeyConfigPad.G); } - else if( this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignBassB ) + else if (this.list項目リスト[this.n現在の選択項目] == this.iKeyAssignBassB) { CDTXMania.app.stageコンフィグ.tパッド選択通知(EKeyConfigPart.BASS, EKeyConfigPad.B); } - else if( this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignBassPick ) + else if (this.list項目リスト[this.n現在の選択項目] == this.iKeyAssignBassPick) { CDTXMania.app.stageコンフィグ.tパッド選択通知(EKeyConfigPart.BASS, EKeyConfigPad.Pick); } - else if( this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignBassWail ) + else if (this.list項目リスト[this.n現在の選択項目] == this.iKeyAssignBassWail) { CDTXMania.app.stageコンフィグ.tパッド選択通知(EKeyConfigPart.BASS, EKeyConfigPad.Wail); } - else if( this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignBassDecide ) + else if (this.list項目リスト[this.n現在の選択項目] == this.iKeyAssignBassDecide) { CDTXMania.app.stageコンフィグ.tパッド選択通知(EKeyConfigPart.BASS, EKeyConfigPad.Decide); } - else if ( this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignBassCancel ) + else if (this.list項目リスト[this.n現在の選択項目] == this.iKeyAssignBassCancel) { CDTXMania.app.stageコンフィグ.tパッド選択通知(EKeyConfigPart.BASS, EKeyConfigPad.Cancel); } - else if ( this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignSystemCapture ) + else if (this.list項目リスト[this.n現在の選択項目] == this.iKeyAssignSystemCapture) { CDTXMania.app.stageコンフィグ.tパッド選択通知(EKeyConfigPart.SYSTEM, EKeyConfigPad.Capture); } #endregion else { - // #27029 2012.1.5 from - if( ( this.iSystemBDGroup.n現在選択されている項目番号 == (int) EBDGroup.どっちもBD ) && - ( ( this.list項目リスト[ this.n現在の選択項目 ] == this.iSystemHHGroup ) || ( this.list項目リスト[ this.n現在の選択項目 ] == this.iSystemHitSoundPriorityHH ) ) ) + // #27029 2012.1.5 from + if ((this.iSystemBDGroup.n現在選択されている項目番号 == (int)EBDGroup.どっちもBD) && + ((this.list項目リスト[this.n現在の選択項目] == this.iSystemHHGroup) || (this.list項目リスト[this.n現在の選択項目] == this.iSystemHitSoundPriorityHH))) { // 変更禁止(何もしない) } else { // 変更許可 - this.list項目リスト[ this.n現在の選択項目 ].tEnter押下(); + this.list項目リスト[this.n現在の選択項目].tEnter押下(); } // Enter押下後の後処理 - if( this.list項目リスト[ this.n現在の選択項目 ] == this.iSystemFullscreen ) + if (this.list項目リスト[this.n現在の選択項目] == this.iSystemFullscreen) { CDTXMania.app.b次のタイミングで全画面_ウィンドウ切り替えを行う = true; } - else if( this.list項目リスト[ this.n現在の選択項目 ] == this.iSystemVSyncWait ) + else if (this.list項目リスト[this.n現在の選択項目] == this.iSystemVSyncWait) { CDTXMania.app.ConfigIni.b垂直帰線待ちを行う = this.iSystemVSyncWait.bON; CDTXMania.app.b次のタイミングで垂直帰線同期切り替えを行う = true; } #region [ AutoPlay #23886 2012.5.8 yyagi ] - else if ( this.list項目リスト[ this.n現在の選択項目 ] == this.iDrumsAutoPlayAll ) + else if (this.list項目リスト[this.n現在の選択項目] == this.iDrumsAutoPlayAll) { - this.t全部のドラムパッドのAutoを切り替える( this.iDrumsAutoPlayAll.e現在の状態 == CItemThreeState.E状態.ON ); + this.t全部のドラムパッドのAutoを切り替える(this.iDrumsAutoPlayAll.e現在の状態 == CItemThreeState.E状態.ON); } - else if ( this.list項目リスト[ this.n現在の選択項目 ] == this.iGuitarAutoPlayAll ) + else if (this.list項目リスト[this.n現在の選択項目] == this.iGuitarAutoPlayAll) { - this.t全部のギターパッドのAutoを切り替える( this.iGuitarAutoPlayAll.e現在の状態 == CItemThreeState.E状態.ON ); + this.t全部のギターパッドのAutoを切り替える(this.iGuitarAutoPlayAll.e現在の状態 == CItemThreeState.E状態.ON); } - else if ( this.list項目リスト[ this.n現在の選択項目 ] == this.iBassAutoPlayAll ) + else if (this.list項目リスト[this.n現在の選択項目] == this.iBassAutoPlayAll) { - this.t全部のベースパッドのAutoを切り替える( this.iBassAutoPlayAll.e現在の状態 == CItemThreeState.E状態.ON ); + this.t全部のベースパッドのAutoを切り替える(this.iBassAutoPlayAll.e現在の状態 == CItemThreeState.E状態.ON); } #endregion #region [ キーアサインへの遷移と脱出 ] - else if ( this.list項目リスト[ this.n現在の選択項目 ] == this.iSystemGoToKeyAssign ) // #24609 2011.4.12 yyagi + else if (this.list項目リスト[this.n現在の選択項目] == this.iSystemGoToKeyAssign) // #24609 2011.4.12 yyagi { t項目リストの設定_KeyAssignSystem(); } - else if ( this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignSystemReturnToMenu ) // #24609 2011.4.12 yyagi + else if (this.list項目リスト[this.n現在の選択項目] == this.iKeyAssignSystemReturnToMenu) // #24609 2011.4.12 yyagi { t項目リストの設定_System(); } - else if ( this.list項目リスト[ this.n現在の選択項目 ] == this.iDrumsGoToKeyAssign ) // #24525 2011.3.15 yyagi + else if (this.list項目リスト[this.n現在の選択項目] == this.iDrumsGoToKeyAssign) // #24525 2011.3.15 yyagi { t項目リストの設定_KeyAssignDrums(); } - else if ( this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignDrumsReturnToMenu ) // #24525 2011.3.15 yyagi + else if (this.list項目リスト[this.n現在の選択項目] == this.iKeyAssignDrumsReturnToMenu) // #24525 2011.3.15 yyagi { t項目リストの設定_Drums(); } - else if ( this.list項目リスト[ this.n現在の選択項目 ] == this.iGuitarGoToKeyAssign ) // #24525 2011.3.15 yyagi + else if (this.list項目リスト[this.n現在の選択項目] == this.iGuitarGoToKeyAssign) // #24525 2011.3.15 yyagi { t項目リストの設定_KeyAssignGuitar(); } - else if ( this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignGuitarReturnToMenu ) // #24525 2011.3.15 yyagi + else if (this.list項目リスト[this.n現在の選択項目] == this.iKeyAssignGuitarReturnToMenu) // #24525 2011.3.15 yyagi { t項目リストの設定_Guitar(); } - else if ( this.list項目リスト[ this.n現在の選択項目 ] == this.iBassGoToKeyAssign ) // #24525 2011.3.15 yyagi + else if (this.list項目リスト[this.n現在の選択項目] == this.iBassGoToKeyAssign) // #24525 2011.3.15 yyagi { t項目リストの設定_KeyAssignBass(); } - else if ( this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignBassReturnToMenu ) // #24525 2011.3.15 yyagi + else if (this.list項目リスト[this.n現在の選択項目] == this.iKeyAssignBassReturnToMenu) // #24525 2011.3.15 yyagi { t項目リストの設定_Bass(); } #endregion #region [ BDGroup #27029 2012.1.4 from ] - else if( this.list項目リスト[ this.n現在の選択項目 ] == this.iSystemBDGroup ) // #27029 2012.1.4 from + else if (this.list項目リスト[this.n現在の選択項目] == this.iSystemBDGroup) // #27029 2012.1.4 from { - if( this.iSystemBDGroup.n現在選択されている項目番号 == (int) EBDGroup.どっちもBD ) + if (this.iSystemBDGroup.n現在選択されている項目番号 == (int)EBDGroup.どっちもBD) { // #27029 2012.1.5 from: 変更前の状態をバックアップする。 - CDTXMania.app.ConfigIni.BackupOf1BD = new CConfigIni.CBackupOf1BD() { - eHHGroup = (EHHGroup) this.iSystemHHGroup.n現在選択されている項目番号, - eHitSoundPriorityHH = (E打ち分け時の再生の優先順位) this.iSystemHitSoundPriorityHH.n現在選択されている項目番号, + CDTXMania.app.ConfigIni.BackupOf1BD = new CConfigIni.CBackupOf1BD() + { + eHHGroup = (EHHGroup)this.iSystemHHGroup.n現在選択されている項目番号, + eHitSoundPriorityHH = (E打ち分け時の再生の優先順位)this.iSystemHitSoundPriorityHH.n現在選択されている項目番号, }; // HH Group ... HH-0 → HH-2 / HH-1 → HH-3 / HH-2 → 変更なし / HH-3 → 変更なし - if( this.iSystemHHGroup.n現在選択されている項目番号 == (int) EHHGroup.全部打ち分ける ) - this.iSystemHHGroup.n現在選択されている項目番号 = (int) EHHGroup.左シンバルのみ打ち分ける; - if( this.iSystemHHGroup.n現在選択されている項目番号 == (int) EHHGroup.ハイハットのみ打ち分ける ) - this.iSystemHHGroup.n現在選択されている項目番号 = (int) EHHGroup.全部共通; + if (this.iSystemHHGroup.n現在選択されている項目番号 == (int)EHHGroup.全部打ち分ける) + this.iSystemHHGroup.n現在選択されている項目番号 = (int)EHHGroup.左シンバルのみ打ち分ける; + if (this.iSystemHHGroup.n現在選択されている項目番号 == (int)EHHGroup.ハイハットのみ打ち分ける) + this.iSystemHHGroup.n現在選択されている項目番号 = (int)EHHGroup.全部共通; // HH Priority ... C>P → 変更なし / P>C → C>P - if( this.iSystemHitSoundPriorityHH.n現在選択されている項目番号 == (int) E打ち分け時の再生の優先順位.PadがChipより優先 ) - this.iSystemHitSoundPriorityHH.n現在選択されている項目番号 = (int) E打ち分け時の再生の優先順位.ChipがPadより優先; + if (this.iSystemHitSoundPriorityHH.n現在選択されている項目番号 == (int)E打ち分け時の再生の優先順位.PadがChipより優先) + this.iSystemHitSoundPriorityHH.n現在選択されている項目番号 = (int)E打ち分け時の再生の優先順位.ChipがPadより優先; } else { // #27029 2012.1.5 from: 変更前の状態に戻す。 - this.iSystemHHGroup.n現在選択されている項目番号 = (int) CDTXMania.app.ConfigIni.BackupOf1BD.eHHGroup; - this.iSystemHitSoundPriorityHH.n現在選択されている項目番号 = (int) CDTXMania.app.ConfigIni.BackupOf1BD.eHitSoundPriorityHH; - + this.iSystemHHGroup.n現在選択されている項目番号 = (int)CDTXMania.app.ConfigIni.BackupOf1BD.eHHGroup; + this.iSystemHitSoundPriorityHH.n現在選択されている項目番号 = (int)CDTXMania.app.ConfigIni.BackupOf1BD.eHitSoundPriorityHH; + CDTXMania.app.ConfigIni.BackupOf1BD = null; } } #endregion - else if ( this.list項目リスト[ this.n現在の選択項目 ] == this.iSystemUseBoxDefSkin ) // #28195 2012.5.6 yyagi + else if (this.list項目リスト[this.n現在の選択項目] == this.iSystemUseBoxDefSkin) // #28195 2012.5.6 yyagi { CSkin.bUseBoxDefSkin = this.iSystemUseBoxDefSkin.bON; } #region [ スキン項目でEnterを押下した場合に限り、スキンの縮小サンプルを生成する。] - else if ( this.list項目リスト[ this.n現在の選択項目 ] == this.iSystemSkinSubfolder ) // #28195 2012.5.2 yyagi + else if (this.list項目リスト[this.n現在の選択項目] == this.iSystemSkinSubfolder) // #28195 2012.5.2 yyagi { tGenerateSkinSample(); } #endregion #region [ 曲データ一覧の再読み込み ] - else if ( this.list項目リスト[ this.n現在の選択項目 ] == this.iSystemReloadDTX ) // #32081 2013.10.21 yyagi + else if (this.list項目リスト[this.n現在の選択項目] == this.iSystemReloadDTX) // #32081 2013.10.21 yyagi { - if ( CDTXMania.app.EnumSongs.IsEnumerating ) + if (CDTXMania.app.EnumSongs.IsEnumerating) { // Debug.WriteLine( "バックグラウンドでEnumeratingSongs中だったので、一旦中断します。" ); CDTXMania.app.EnumSongs.Abort(); @@ -1605,7 +1606,7 @@ namespace DTXMania } CDTXMania.app.EnumSongs.StartEnumFromDisk(); - CDTXMania.app.EnumSongs.ChangeEnumeratePriority( ThreadPriority.Normal ); + CDTXMania.app.EnumSongs.ChangeEnumeratePriority(ThreadPriority.Normal); CDTXMania.app.actEnumSongs.bコマンドでの曲データ取得 = true; CDTXMania.app.actEnumSongs.On活性化(); } @@ -1615,22 +1616,22 @@ namespace DTXMania private void tGenerateSkinSample() { - nSkinIndex = ( ( CItemList ) this.list項目リスト[ this.n現在の選択項目 ] ).n現在選択されている項目番号; - if ( nSkinSampleIndex != nSkinIndex ) + nSkinIndex = ((CItemList)this.list項目リスト[this.n現在の選択項目]).n現在選択されている項目番号; + if (nSkinSampleIndex != nSkinIndex) { - string path = skinSubFolders[ nSkinIndex ]; - path = System.IO.Path.Combine( path, @"Graphics\ScreenTitle background.jpg" ); - Bitmap bmSrc = new Bitmap( path ); - Bitmap bmDest = new Bitmap( bmSrc.Width / 4, bmSrc.Height / 4 ); - Graphics g = Graphics.FromImage( bmDest ); + string path = skinSubFolders[nSkinIndex]; + path = System.IO.Path.Combine(path, @"Graphics\ScreenTitle background.jpg"); + Bitmap bmSrc = new Bitmap(path); + Bitmap bmDest = new Bitmap(bmSrc.Width / 4, bmSrc.Height / 4); + Graphics g = Graphics.FromImage(bmDest); g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic; - g.DrawImage( bmSrc, new Rectangle( 0, 0, bmSrc.Width / 4, bmSrc.Height / 4 ), - 0, 0, bmSrc.Width, bmSrc.Height, GraphicsUnit.Pixel ); - if ( txSkinSample1 != null ) + g.DrawImage(bmSrc, new Rectangle(0, 0, bmSrc.Width / 4, bmSrc.Height / 4), + 0, 0, bmSrc.Width, bmSrc.Height, GraphicsUnit.Pixel); + if (txSkinSample1 != null) { - TextureFactory.t安全にDisposeする( ref txSkinSample1 ); + TextureFactory.t安全にDisposeする(ref txSkinSample1); } - txSkinSample1 = TextureFactory.tテクスチャの生成( bmDest, false ); + txSkinSample1 = TextureFactory.tテクスチャの生成(bmDest, false); g.Dispose(); bmDest.Dispose(); bmSrc.Dispose(); @@ -1651,17 +1652,17 @@ namespace DTXMania // #27029 2012.1.5 from: 説明文は最大9行→13行に変更。 - this.iKeyAssignSystemReturnToMenu = new CItemBase( "<< Return To Menu", CItemBase.Eパネル種別.その他, + this.iKeyAssignSystemReturnToMenu = new CItemBase("<< Return To Menu", CItemBase.Eパネル種別.その他, "左側のメニューに戻ります。", - "Return to left menu." ); - this.list項目リスト.Add( this.iKeyAssignSystemReturnToMenu ); - this.iKeyAssignSystemCapture = new CItemBase( "Capture", + "Return to left menu."); + this.list項目リスト.Add(this.iKeyAssignSystemReturnToMenu); + this.iKeyAssignSystemCapture = new CItemBase("Capture", "キャプチャキー設定:\n" + "画面キャプチャのキーの割り当てを設定します。", "Capture key assign:\n" + "To assign key for screen capture.\n" + - "(You can assign keyboard only. You can't use pads to capture screenshot.)" ); - this.list項目リスト.Add( this.iKeyAssignSystemCapture ); + "(You can assign keyboard only. You can't use pads to capture screenshot.)"); + this.list項目リスト.Add(this.iKeyAssignSystemCapture); OnListMenuの初期化(); this.n現在の選択項目 = 0; @@ -1674,76 +1675,76 @@ namespace DTXMania // #27029 2012.1.5 from: 説明文は最大9行→13行に変更。 - this.iKeyAssignDrumsReturnToMenu = new CItemBase( "<< Return To Menu", CItemBase.Eパネル種別.その他, + this.iKeyAssignDrumsReturnToMenu = new CItemBase("<< Return To Menu", CItemBase.Eパネル種別.その他, "左側のメニューに戻ります。", - "Return to left menu." ); - this.list項目リスト.Add( this.iKeyAssignDrumsReturnToMenu ); - this.iKeyAssignDrumsLC = new CItemBase( "LeftCymbal", + "Return to left menu."); + this.list項目リスト.Add(this.iKeyAssignDrumsReturnToMenu); + this.iKeyAssignDrumsLC = new CItemBase("LeftCymbal", "ドラムのキー設定:\n" + "左シンバルへのキーの割り当てを設定します。", "Drums key assign:\n" + - "To assign key/pads for LeftCymbal button." ); - this.list項目リスト.Add( this.iKeyAssignDrumsLC ); - this.iKeyAssignDrumsHHC = new CItemBase( "HiHat(Close)", + "To assign key/pads for LeftCymbal button."); + this.list項目リスト.Add(this.iKeyAssignDrumsLC); + this.iKeyAssignDrumsHHC = new CItemBase("HiHat(Close)", "ドラムのキー設定:\n" + "ハイハット(クローズ)へのキーの割り当てを設定します。", "Drums key assign:\n" + - "To assign key/pads for HiHat(Close) button." ); - this.list項目リスト.Add( this.iKeyAssignDrumsHHC ); - this.iKeyAssignDrumsHHO = new CItemBase( "HiHat(Open)", + "To assign key/pads for HiHat(Close) button."); + this.list項目リスト.Add(this.iKeyAssignDrumsHHC); + this.iKeyAssignDrumsHHO = new CItemBase("HiHat(Open)", "ドラムのキー設定:\n" + "ハイハット(オープン)へのキーの割り当てを設定します。", "Drums key assign:\n" + - "To assign key/pads for HiHat(Open) button." ); - this.list項目リスト.Add( this.iKeyAssignDrumsHHO ); - this.iKeyAssignDrumsSD = new CItemBase( "Snare", + "To assign key/pads for HiHat(Open) button."); + this.list項目リスト.Add(this.iKeyAssignDrumsHHO); + this.iKeyAssignDrumsSD = new CItemBase("Snare", "ドラムのキー設定:\n" + "スネアへのキーの割り当てを設定します。", "Drums key assign:\n" + - "To assign key/pads for Snare button." ); - this.list項目リスト.Add( this.iKeyAssignDrumsSD ); - this.iKeyAssignDrumsBD = new CItemBase( "Bass", + "To assign key/pads for Snare button."); + this.list項目リスト.Add(this.iKeyAssignDrumsSD); + this.iKeyAssignDrumsBD = new CItemBase("Bass", "ドラムのキー設定:\n" + "バスドラムへのキーの割り当てを設定します。", "Drums key assign:\n" + - "To assign key/pads for Bass button." ); - this.list項目リスト.Add( this.iKeyAssignDrumsBD ); - this.iKeyAssignDrumsHT = new CItemBase( "HighTom", + "To assign key/pads for Bass button."); + this.list項目リスト.Add(this.iKeyAssignDrumsBD); + this.iKeyAssignDrumsHT = new CItemBase("HighTom", "ドラムのキー設定:\n" + "ハイタムへのキーの割り当てを設定します。", "Drums key assign:\n" + - "To assign key/pads for HighTom button." ); - this.list項目リスト.Add( this.iKeyAssignDrumsHT ); - this.iKeyAssignDrumsLT = new CItemBase( "LowTom", + "To assign key/pads for HighTom button."); + this.list項目リスト.Add(this.iKeyAssignDrumsHT); + this.iKeyAssignDrumsLT = new CItemBase("LowTom", "ドラムのキー設定:\n" + "ロータムへのキーの割り当てを設定します。", "Drums key assign:\n" + - "To assign key/pads for LowTom button." ); - this.list項目リスト.Add( this.iKeyAssignDrumsLT ); - this.iKeyAssignDrumsFT = new CItemBase( "FloorTom", + "To assign key/pads for LowTom button."); + this.list項目リスト.Add(this.iKeyAssignDrumsLT); + this.iKeyAssignDrumsFT = new CItemBase("FloorTom", "ドラムのキー設定:\n" + "フロアタムへのキーの割り当てを設定します。", "Drums key assign:\n" + - "To assign key/pads for FloorTom button." ); - this.list項目リスト.Add( this.iKeyAssignDrumsFT ); - this.iKeyAssignDrumsCY = new CItemBase( "RightCymbal", + "To assign key/pads for FloorTom button."); + this.list項目リスト.Add(this.iKeyAssignDrumsFT); + this.iKeyAssignDrumsCY = new CItemBase("RightCymbal", "ドラムのキー設定:\n" + "右シンバルへのキーの割り当てを設定します。", "Drums key assign:\n" + - "To assign key/pads for RightCymbal button." ); - this.list項目リスト.Add( this.iKeyAssignDrumsCY ); - this.iKeyAssignDrumsRD = new CItemBase( "RideCymbal", + "To assign key/pads for RightCymbal button."); + this.list項目リスト.Add(this.iKeyAssignDrumsCY); + this.iKeyAssignDrumsRD = new CItemBase("RideCymbal", "ドラムのキー設定:\n" + "ライドシンバルへのキーの割り当てを設定します。", "Drums key assign:\n" + - "To assign key/pads for RideCymbal button." ); - this.list項目リスト.Add( this.iKeyAssignDrumsRD ); - this.iKeyAssignDrumsHP = new CItemBase( "HiHatPedal", // #27029 2012.1.4 from + "To assign key/pads for RideCymbal button."); + this.list項目リスト.Add(this.iKeyAssignDrumsRD); + this.iKeyAssignDrumsHP = new CItemBase("HiHatPedal", // #27029 2012.1.4 from "ドラムのキー設定:\n" + // "ハイハットのフットペダルへのキーの割り当てを設定します。", // "Drums key assign:\n" + // - "To assign key/pads for HiHatPedal button." ); // - this.list項目リスト.Add( this.iKeyAssignDrumsHP ); // + "To assign key/pads for HiHatPedal button."); // + this.list項目リスト.Add(this.iKeyAssignDrumsHP); // OnListMenuの初期化(); this.n現在の選択項目 = 0; @@ -1756,50 +1757,50 @@ namespace DTXMania // #27029 2012.1.5 from: 説明文は最大9行→13行に変更。 - this.iKeyAssignGuitarReturnToMenu = new CItemBase( "<< Return To Menu", CItemBase.Eパネル種別.その他, + this.iKeyAssignGuitarReturnToMenu = new CItemBase("<< Return To Menu", CItemBase.Eパネル種別.その他, "左側のメニューに戻ります。", - "Return to left menu." ); - this.list項目リスト.Add( this.iKeyAssignGuitarReturnToMenu ); - this.iKeyAssignGuitarR = new CItemBase( "R", + "Return to left menu."); + this.list項目リスト.Add(this.iKeyAssignGuitarReturnToMenu); + this.iKeyAssignGuitarR = new CItemBase("R", "ギターのキー設定:\n" + "Rボタンへのキーの割り当てを設定します。", "Guitar key assign:\n" + - "To assign key/pads for R button." ); - this.list項目リスト.Add( this.iKeyAssignGuitarR ); - this.iKeyAssignGuitarG = new CItemBase( "G", + "To assign key/pads for R button."); + this.list項目リスト.Add(this.iKeyAssignGuitarR); + this.iKeyAssignGuitarG = new CItemBase("G", "ギターのキー設定:\n" + "Gボタンへのキーの割り当てを設定します。", "Guitar key assign:\n" + - "To assign key/pads for G button." ); - this.list項目リスト.Add( this.iKeyAssignGuitarG ); - this.iKeyAssignGuitarB = new CItemBase( "B", + "To assign key/pads for G button."); + this.list項目リスト.Add(this.iKeyAssignGuitarG); + this.iKeyAssignGuitarB = new CItemBase("B", "ギターのキー設定:\n" + "Bボタンへのキーの割り当てを設定します。", "Guitar key assign:\n" + - "To assign key/pads for B button." ); - this.list項目リスト.Add( this.iKeyAssignGuitarB ); - this.iKeyAssignGuitarPick = new CItemBase( "Pick", + "To assign key/pads for B button."); + this.list項目リスト.Add(this.iKeyAssignGuitarB); + this.iKeyAssignGuitarPick = new CItemBase("Pick", "ギターのキー設定:\n" + "ピックボタンへのキーの割り当てを設定します。", "Guitar key assign:\n" + - "To assign key/pads for Pick button." ); - this.list項目リスト.Add( this.iKeyAssignGuitarPick ); - this.iKeyAssignGuitarWail = new CItemBase( "Wailing", + "To assign key/pads for Pick button."); + this.list項目リスト.Add(this.iKeyAssignGuitarPick); + this.iKeyAssignGuitarWail = new CItemBase("Wailing", "ギターのキー設定:\n" + "Wailingボタンへのキーの割り当てを設定します。", - "Guitar key assign:\nTo assign key/pads for Wailing button." ); - this.list項目リスト.Add( this.iKeyAssignGuitarWail ); - this.iKeyAssignGuitarDecide = new CItemBase( "Decide", + "Guitar key assign:\nTo assign key/pads for Wailing button."); + this.list項目リスト.Add(this.iKeyAssignGuitarWail); + this.iKeyAssignGuitarDecide = new CItemBase("Decide", "ギターのキー設定:\n" + "決定ボタンへのキーの割り当てを設定します。", - "Guitar key assign:\nTo assign key/pads for Decide button." ); - this.list項目リスト.Add( this.iKeyAssignGuitarDecide ); - this.iKeyAssignGuitarCancel = new CItemBase( "Cancel", + "Guitar key assign:\nTo assign key/pads for Decide button."); + this.list項目リスト.Add(this.iKeyAssignGuitarDecide); + this.iKeyAssignGuitarCancel = new CItemBase("Cancel", "ギターのキー設定:\n" + "キャンセルボタンへのキーの割り当てを設定します。", "Guitar key assign:\n" + - "To assign key/pads for Cancel button." ); - this.list項目リスト.Add( this.iKeyAssignGuitarCancel ); + "To assign key/pads for Cancel button."); + this.list項目リスト.Add(this.iKeyAssignGuitarCancel); OnListMenuの初期化(); this.n現在の選択項目 = 0; @@ -1812,52 +1813,52 @@ namespace DTXMania // #27029 2012.1.5 from: 説明文は最大9行→13行に変更。 - this.iKeyAssignBassReturnToMenu = new CItemBase( "<< Return To Menu", CItemBase.Eパネル種別.その他, + this.iKeyAssignBassReturnToMenu = new CItemBase("<< Return To Menu", CItemBase.Eパネル種別.その他, "左側のメニューに戻ります。", - "Return to left menu." ); - this.list項目リスト.Add( this.iKeyAssignBassReturnToMenu ); - this.iKeyAssignBassR = new CItemBase( "R", + "Return to left menu."); + this.list項目リスト.Add(this.iKeyAssignBassReturnToMenu); + this.iKeyAssignBassR = new CItemBase("R", "ベースのキー設定:\n" + "Rボタンへのキーの割り当てを設定します。", "Bass key assign:\n" + - "To assign key/pads for R button." ); - this.list項目リスト.Add( this.iKeyAssignBassR ); - this.iKeyAssignBassG = new CItemBase( "G", + "To assign key/pads for R button."); + this.list項目リスト.Add(this.iKeyAssignBassR); + this.iKeyAssignBassG = new CItemBase("G", "ベースのキー設定:\n" + "Gボタンへのキーの割り当てを設定します。", "Bass key assign:\n" + - "To assign key/pads for G button." ); - this.list項目リスト.Add( this.iKeyAssignBassG ); - this.iKeyAssignBassB = new CItemBase( "B", + "To assign key/pads for G button."); + this.list項目リスト.Add(this.iKeyAssignBassG); + this.iKeyAssignBassB = new CItemBase("B", "ベースのキー設定:\n" + "Bボタンへのキーの割り当てを設定します。", "Bass key assign:\n" + - "To assign key/pads for B button." ); - this.list項目リスト.Add( this.iKeyAssignBassB ); - this.iKeyAssignBassPick = new CItemBase( "Pick", + "To assign key/pads for B button."); + this.list項目リスト.Add(this.iKeyAssignBassB); + this.iKeyAssignBassPick = new CItemBase("Pick", "ベースのキー設定:\n" + "ピックボタンへのキーの割り当てを設定します。", "Bass key assign:\n" + - "To assign key/pads for Pick button." ); - this.list項目リスト.Add( this.iKeyAssignBassPick ); - this.iKeyAssignBassWail = new CItemBase( "Wailing", + "To assign key/pads for Pick button."); + this.list項目リスト.Add(this.iKeyAssignBassPick); + this.iKeyAssignBassWail = new CItemBase("Wailing", "ベースのキー設定:\n" + "Wailingボタンへのキーの割り当てを設定します。", "Bass key assign:\n" + - "To assign key/pads for Wailing button." ); - this.list項目リスト.Add( this.iKeyAssignBassWail ); - this.iKeyAssignBassDecide = new CItemBase( "Decide", + "To assign key/pads for Wailing button."); + this.list項目リスト.Add(this.iKeyAssignBassWail); + this.iKeyAssignBassDecide = new CItemBase("Decide", "ベースのキー設定:\n" + "決定ボタンへのキーの割り当てを設定します。", "Bass key assign:\n" + - "To assign key/pads for Decide button." ); - this.list項目リスト.Add( this.iKeyAssignBassDecide ); - this.iKeyAssignBassCancel = new CItemBase( "Cancel", + "To assign key/pads for Decide button."); + this.list項目リスト.Add(this.iKeyAssignBassDecide); + this.iKeyAssignBassCancel = new CItemBase("Cancel", "ベースのキー設定:\n" + "キャンセルボタンへのキーの割り当てを設定します。", "Bass key assign:\n" + - "To assign key/pads for Cancel button." ); - this.list項目リスト.Add( this.iKeyAssignBassCancel ); + "To assign key/pads for Cancel button."); + this.list項目リスト.Add(this.iKeyAssignBassCancel); OnListMenuの初期化(); this.n現在の選択項目 = 0; @@ -1867,9 +1868,9 @@ namespace DTXMania public void t次に移動() { CDTXMania.app.Skin.soundカーソル移動音.t再生する(); - if( this.b要素値にフォーカス中 ) + if (this.b要素値にフォーカス中) { - this.list項目リスト[ this.n現在の選択項目 ].t項目値を前へ移動(); + this.list項目リスト[this.n現在の選択項目].t項目値を前へ移動(); t要素値を上下に変更中の処理(); } else @@ -1880,9 +1881,9 @@ namespace DTXMania public void t前に移動() { CDTXMania.app.Skin.soundカーソル移動音.t再生する(); - if( this.b要素値にフォーカス中 ) + if (this.b要素値にフォーカス中) { - this.list項目リスト[ this.n現在の選択項目 ].t項目値を次へ移動(); + this.list項目リスト[this.n現在の選択項目].t項目値を次へ移動(); t要素値を上下に変更中の処理(); } else @@ -1892,7 +1893,7 @@ namespace DTXMania } private void t要素値を上下に変更中の処理() { - if ( this.list項目リスト[ this.n現在の選択項目 ] == this.iSystemMasterVolume ) // #33700 2014.4.26 yyagi + if (this.list項目リスト[this.n現在の選択項目] == this.iSystemMasterVolume) // #33700 2014.4.26 yyagi { CDTXMania.app.Sound管理.nMasterVolume = this.iSystemMasterVolume.n現在の値; } @@ -1903,37 +1904,37 @@ namespace DTXMania public override void On活性化() { - if( this.b活性化してる ) + if (this.b活性化してる) return; this.list項目リスト = new List(); this.eメニュー種別 = Eメニュー種別.Unknown; #region [ スキン選択肢と、現在選択中のスキン(index)の準備 #28195 2012.5.2 yyagi ] - int ns = ( CDTXMania.app.Skin.strSystemSkinSubfolders == null ) ? 0 : CDTXMania.app.Skin.strSystemSkinSubfolders.Length; - int nb = ( CDTXMania.app.Skin.strBoxDefSkinSubfolders == null ) ? 0 : CDTXMania.app.Skin.strBoxDefSkinSubfolders.Length; - skinSubFolders = new string[ ns + nb ]; - for ( int i = 0; i < ns; i++ ) + int ns = (CDTXMania.app.Skin.strSystemSkinSubfolders == null) ? 0 : CDTXMania.app.Skin.strSystemSkinSubfolders.Length; + int nb = (CDTXMania.app.Skin.strBoxDefSkinSubfolders == null) ? 0 : CDTXMania.app.Skin.strBoxDefSkinSubfolders.Length; + skinSubFolders = new string[ns + nb]; + for (int i = 0; i < ns; i++) { - skinSubFolders[ i ] = CDTXMania.app.Skin.strSystemSkinSubfolders[ i ]; + skinSubFolders[i] = CDTXMania.app.Skin.strSystemSkinSubfolders[i]; } - for ( int i = 0; i < nb; i++ ) + for (int i = 0; i < nb; i++) { - skinSubFolders[ ns + i ] = CDTXMania.app.Skin.strBoxDefSkinSubfolders[ i ]; + skinSubFolders[ns + i] = CDTXMania.app.Skin.strBoxDefSkinSubfolders[i]; } - skinSubFolder_org = CDTXMania.app.Skin.GetCurrentSkinSubfolderFullName( true ); - Array.Sort( skinSubFolders ); - skinNames = CSkin.GetSkinName( skinSubFolders ); - nSkinIndex = Array.BinarySearch( skinSubFolders, skinSubFolder_org ); - if ( nSkinIndex < 0 ) // 念のため + skinSubFolder_org = CDTXMania.app.Skin.GetCurrentSkinSubfolderFullName(true); + Array.Sort(skinSubFolders); + skinNames = CSkin.GetSkinName(skinSubFolders); + nSkinIndex = Array.BinarySearch(skinSubFolders, skinSubFolder_org); + if (nSkinIndex < 0) // 念のため { nSkinIndex = 0; } nSkinSampleIndex = -1; #endregion - this.prvFont = new CPrivateFastFont( CSkin.Path( @"Graphics\fonts\mplus-1p-heavy.ttf" ), (int) ( 18 * Scale.Y ) ); // t項目リストの設定 の前に必要 -// this.listMenu = new List(); + this.prvFont = new CPrivateFastFont(CSkin.Path(@"Graphics\fonts\mplus-1p-heavy.ttf"), (int)(18 * Scale.Y)); // t項目リストの設定 の前に必要 + // this.listMenu = new List(); this.t項目リストの設定_Bass(); // #27795 2012.3.11 yyagi; System設定の中でDrumsの設定を参照しているため、 @@ -1946,16 +1947,16 @@ namespace DTXMania this.nスクロール用タイマ値 = -1; this.ct三角矢印アニメ = new CCounter(); - this.iSystemSoundType_initial = this.iSystemSoundType.n現在選択されている項目番号; // CONFIGに入ったときの値を保持しておく - this.iSystemWASAPIBufferSizeMs_initial = this.iSystemWASAPIBufferSizeMs.n現在の値; // CONFIG脱出時にこの値から変更されているようなら + this.iSystemSoundType_initial = this.iSystemSoundType.n現在選択されている項目番号; // CONFIGに入ったときの値を保持しておく + this.iSystemWASAPIBufferSizeMs_initial = this.iSystemWASAPIBufferSizeMs.n現在の値; // CONFIG脱出時にこの値から変更されているようなら // this.iSystemASIOBufferSizeMs_initial = this.iSystemASIOBufferSizeMs.n現在の値; // サウンドデバイスを再構築する - this.iSystemASIODevice_initial = this.iSystemASIODevice.n現在選択されている項目番号; // - this.iSystemSoundTimerType_initial = this.iSystemSoundTimerType.GetIndex(); // + this.iSystemASIODevice_initial = this.iSystemASIODevice.n現在選択されている項目番号; // + this.iSystemSoundTimerType_initial = this.iSystemSoundTimerType.GetIndex(); // base.On活性化(); } public override void On非活性化() { - if( this.b活性化してない ) + if (this.b活性化してない) return; this.tConfigIniへ記録する(); @@ -1967,7 +1968,7 @@ namespace DTXMania base.On非活性化(); #region [ Skin変更 ] - if ( CDTXMania.app.Skin.GetCurrentSkinSubfolderFullName( true ) != this.skinSubFolder_org ) + if (CDTXMania.app.Skin.GetCurrentSkinSubfolderFullName(true) != this.skinSubFolder_org) { CDTXMania.app.stageChangeSkin.tChangeSkinMain(); // #28195 2012.6.11 yyagi CONFIG脱出時にSkin更新 } @@ -1976,14 +1977,14 @@ namespace DTXMania // #24820 2013.1.22 yyagi CONFIGでWASAPI/ASIO/DirectSound関連の設定を変更した場合、サウンドデバイスを再構築する。 // #33689 2014.6.17 yyagi CONFIGでSoundTimerTypeの設定を変更した場合も、サウンドデバイスを再構築する。 #region [ サウンドデバイス変更 ] - if ( this.iSystemSoundType_initial != this.iSystemSoundType.n現在選択されている項目番号 || + if (this.iSystemSoundType_initial != this.iSystemSoundType.n現在選択されている項目番号 || this.iSystemWASAPIBufferSizeMs_initial != this.iSystemWASAPIBufferSizeMs.n現在の値 || // this.iSystemASIOBufferSizeMs_initial != this.iSystemASIOBufferSizeMs.n現在の値 || this.iSystemASIODevice_initial != this.iSystemASIODevice.n現在選択されている項目番号 || - this.iSystemSoundTimerType_initial != this.iSystemSoundTimerType.GetIndex() ) + this.iSystemSoundTimerType_initial != this.iSystemSoundTimerType.GetIndex()) { ESoundDeviceType soundDeviceType; - switch ( this.iSystemSoundType.n現在選択されている項目番号 ) + switch (this.iSystemSoundType.n現在選択されている項目番号) { case 0: soundDeviceType = ESoundDeviceType.DirectSound; @@ -1999,12 +2000,12 @@ namespace DTXMania break; } - CDTXMania.app.Sound管理.t初期化( soundDeviceType, + CDTXMania.app.Sound管理.t初期化(soundDeviceType, this.iSystemWASAPIBufferSizeMs.n現在の値, 0, - // this.iSystemASIOBufferSizeMs.n現在の値, + // this.iSystemASIOBufferSizeMs.n現在の値, this.iSystemASIODevice.n現在選択されている項目番号, - this.iSystemSoundTimerType.bON ); + this.iSystemSoundTimerType.bON); CDTXMania.app.ShowWindowTitleWithSoundType(); } #endregion @@ -2014,32 +2015,32 @@ namespace DTXMania } public override void OnManagedリソースの作成() { - if( this.b活性化してない ) + if (this.b活性化してない) return; - this.tx通常項目行パネル = TextureFactory.tテクスチャの生成Af( CSkin.Path( @"Graphics\ScreenConfig itembox.png" ), false ); - this.txその他項目行パネル = TextureFactory.tテクスチャの生成Af( CSkin.Path( @"Graphics\ScreenConfig itembox other.png" ), false ); - this.tx三角矢印 = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenConfig triangle arrow.png" ), false ); + this.tx通常項目行パネル = TextureFactory.tテクスチャの生成Af(CSkin.Path(@"Graphics\ScreenConfig itembox.png"), false); + this.txその他項目行パネル = TextureFactory.tテクスチャの生成Af(CSkin.Path(@"Graphics\ScreenConfig itembox other.png"), false); + this.tx三角矢印 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenConfig triangle arrow.png"), false); this.txSkinSample1 = null; // スキン選択時に動的に設定するため、ここでは初期化しない base.OnManagedリソースの作成(); } public override void OnManagedリソースの解放() { - if( this.b活性化してない ) + if (this.b活性化してない) return; - TextureFactory.tテクスチャの解放( ref this.txSkinSample1 ); - TextureFactory.tテクスチャの解放( ref this.tx通常項目行パネル ); - TextureFactory.tテクスチャの解放( ref this.txその他項目行パネル ); - TextureFactory.tテクスチャの解放( ref this.tx三角矢印 ); - + TextureFactory.tテクスチャの解放(ref this.txSkinSample1); + TextureFactory.tテクスチャの解放(ref this.tx通常項目行パネル); + TextureFactory.tテクスチャの解放(ref this.txその他項目行パネル); + TextureFactory.tテクスチャの解放(ref this.tx三角矢印); + base.OnManagedリソースの解放(); } private void OnListMenuの初期化() { OnListMenuの解放(); - this.listMenu = new stMenuItemRight[ this.list項目リスト.Count ]; + this.listMenu = new stMenuItemRight[this.list項目リスト.Count]; } /// @@ -2047,17 +2048,17 @@ namespace DTXMania /// private void OnListMenuの解放() { - if ( listMenu != null ) + if (listMenu != null) { - for ( int i = 0; i < listMenu.Length; i++ ) + for (int i = 0; i < listMenu.Length; i++) { - if ( listMenu[ i ].txParam != null ) + if (listMenu[i].txParam != null) { - listMenu[ i ].txParam.Dispose(); + listMenu[i].txParam.Dispose(); } - if ( listMenu[ i ].txMenuItemRight != null ) + if (listMenu[i].txMenuItemRight != null) { - listMenu[ i ].txMenuItemRight.Dispose(); + listMenu[i].txMenuItemRight.Dispose(); } } this.listMenu = null; @@ -2065,22 +2066,22 @@ namespace DTXMania } public override int On進行描画() { - throw new InvalidOperationException( "t進行描画(bool)のほうを使用してください。" ); + throw new InvalidOperationException("t進行描画(bool)のほうを使用してください。"); } - public int t進行描画( bool b項目リスト側にフォーカスがある ) + public int t進行描画(bool b項目リスト側にフォーカスがある) { - if( this.b活性化してない ) + if (this.b活性化してない) return 0; // 進行 #region [ 初めての進行描画 ] //----------------- - if( base.b初めての進行描画 ) + if (base.b初めての進行描画) { - this.nスクロール用タイマ値 = CSound管理.rc演奏用タイマ.n現在時刻; - this.ct三角矢印アニメ.t開始( 0, 9, 50, CDTXMania.app.Timer ); - + this.nスクロール用タイマ値 = CSound管理.rc演奏用タイマ.n現在時刻; + this.ct三角矢印アニメ.t開始(0, 9, 50, CDTXMania.app.Timer); + base.b初めての進行描画 = false; } //----------------- @@ -2091,25 +2092,25 @@ namespace DTXMania #region [ 項目スクロールの進行 ] //----------------- long n現在時刻 = CDTXMania.app.Timer.n現在時刻; - if( n現在時刻 < this.nスクロール用タイマ値 ) this.nスクロール用タイマ値 = n現在時刻; + if (n現在時刻 < this.nスクロール用タイマ値) this.nスクロール用タイマ値 = n現在時刻; const int INTERVAL = 2; // [ms] - while( ( n現在時刻 - this.nスクロール用タイマ値 ) >= INTERVAL ) + while ((n現在時刻 - this.nスクロール用タイマ値) >= INTERVAL) { - int n目標項目までのスクロール量 = Math.Abs( (int) ( this.n目標のスクロールカウンタ - this.n現在のスクロールカウンタ ) ); + int n目標項目までのスクロール量 = Math.Abs((int)(this.n目標のスクロールカウンタ - this.n現在のスクロールカウンタ)); int n加速度 = 0; #region [ n加速度の決定;目標まで遠いほど加速する。] //----------------- - if( n目標項目までのスクロール量 <= 100 ) + if (n目標項目までのスクロール量 <= 100) { n加速度 = 2; } - else if( n目標項目までのスクロール量 <= 300 ) + else if (n目標項目までのスクロール量 <= 300) { n加速度 = 3; } - else if( n目標項目までのスクロール量 <= 500 ) + else if (n目標項目までのスクロール量 <= 500) { n加速度 = 4; } @@ -2121,19 +2122,19 @@ namespace DTXMania #endregion #region [ this.n現在のスクロールカウンタに n加速度 を加減算。] //----------------- - if( this.n現在のスクロールカウンタ < this.n目標のスクロールカウンタ ) + if (this.n現在のスクロールカウンタ < this.n目標のスクロールカウンタ) { this.n現在のスクロールカウンタ += n加速度; - if( this.n現在のスクロールカウンタ > this.n目標のスクロールカウンタ ) + if (this.n現在のスクロールカウンタ > this.n目標のスクロールカウンタ) { // 目標を超えたら目標値で停止。 this.n現在のスクロールカウンタ = this.n目標のスクロールカウンタ; } } - else if( this.n現在のスクロールカウンタ > this.n目標のスクロールカウンタ ) + else if (this.n現在のスクロールカウンタ > this.n目標のスクロールカウンタ) { this.n現在のスクロールカウンタ -= n加速度; - if( this.n現在のスクロールカウンタ < this.n目標のスクロールカウンタ ) + if (this.n現在のスクロールカウンタ < this.n目標のスクロールカウンタ) { // 目標を超えたら目標値で停止。 this.n現在のスクロールカウンタ = this.n目標のスクロールカウンタ; @@ -2143,22 +2144,22 @@ namespace DTXMania #endregion #region [ 行超え処理、ならびに目標位置に到達したらスクロールを停止して項目変更通知を発行。] //----------------- - if( this.n現在のスクロールカウンタ >= 100 ) + if (this.n現在のスクロールカウンタ >= 100) { - this.n現在の選択項目 = this.t次の項目( this.n現在の選択項目 ); + this.n現在の選択項目 = this.t次の項目(this.n現在の選択項目); this.n現在のスクロールカウンタ -= 100; this.n目標のスクロールカウンタ -= 100; - if( this.n目標のスクロールカウンタ == 0 ) + if (this.n目標のスクロールカウンタ == 0) { CDTXMania.app.stageコンフィグ.t項目変更通知(); } } - else if( this.n現在のスクロールカウンタ <= -100 ) + else if (this.n現在のスクロールカウンタ <= -100) { - this.n現在の選択項目 = this.t前の項目( this.n現在の選択項目 ); + this.n現在の選択項目 = this.t前の項目(this.n現在の選択項目); this.n現在のスクロールカウンタ += 100; this.n目標のスクロールカウンタ += 100; - if( this.n目標のスクロールカウンタ == 0 ) + if (this.n目標のスクロールカウンタ == 0) { CDTXMania.app.stageコンフィグ.t項目変更通知(); } @@ -2170,10 +2171,10 @@ namespace DTXMania } //----------------- #endregion - + #region [ ▲印アニメの進行 ] //----------------- - if( this.b項目リスト側にフォーカスがある && ( this.n目標のスクロールカウンタ == 0 ) ) + if (this.b項目リスト側にフォーカスがある && (this.n目標のスクロールカウンタ == 0)) this.ct三角矢印アニメ.t進行Loop(); //----------------- #endregion @@ -2181,61 +2182,61 @@ namespace DTXMania // 描画 - this.ptパネルの基本座標[ 4 ].X = this.b項目リスト側にフォーカスがある ? 276 : 301; // メニューにフォーカスがあるなら、項目リストの中央は頭を出さない。 + this.ptパネルの基本座標[4].X = this.b項目リスト側にフォーカスがある ? 276 : 301; // メニューにフォーカスがあるなら、項目リストの中央は頭を出さない。 #region [ 計11個の項目パネルを描画する。] //----------------- int nItem = this.n現在の選択項目; - for( int i = 0; i < 4; i++ ) - nItem = this.t前の項目( nItem ); + for (int i = 0; i < 4; i++) + nItem = this.t前の項目(nItem); - for( int n行番号 = -4; n行番号 < 6; n行番号++ ) // n行番号 == 0 がフォーカスされている項目パネル。 + for (int n行番号 = -4; n行番号 < 6; n行番号++) // n行番号 == 0 がフォーカスされている項目パネル。 { #region [ 今まさに画面外に飛びだそうとしている項目パネルは描画しない。] //----------------- - if( ( ( n行番号 == -4 ) && ( this.n現在のスクロールカウンタ > 0 ) ) || // 上に飛び出そうとしている - ( ( n行番号 == +5 ) && ( this.n現在のスクロールカウンタ < 0 ) ) ) // 下に飛び出そうとしている + if (((n行番号 == -4) && (this.n現在のスクロールカウンタ > 0)) || // 上に飛び出そうとしている + ((n行番号 == +5) && (this.n現在のスクロールカウンタ < 0))) // 下に飛び出そうとしている { - nItem = this.t次の項目( nItem ); + nItem = this.t次の項目(nItem); continue; } //----------------- #endregion int n移動元の行の基本位置 = n行番号 + 4; - int n移動先の行の基本位置 = ( this.n現在のスクロールカウンタ <= 0 ) ? ( ( n移動元の行の基本位置 + 1 ) % 10 ) : ( ( ( n移動元の行の基本位置 - 1 ) + 10 ) % 10 ); - int x = this.ptパネルの基本座標[ n移動元の行の基本位置 ].X + ( (int) ( ( this.ptパネルの基本座標[ n移動先の行の基本位置 ].X - this.ptパネルの基本座標[ n移動元の行の基本位置 ].X ) * ( ( (double) Math.Abs( this.n現在のスクロールカウンタ ) ) / 100.0 ) ) ); - int y = this.ptパネルの基本座標[ n移動元の行の基本位置 ].Y + ( (int) ( ( this.ptパネルの基本座標[ n移動先の行の基本位置 ].Y - this.ptパネルの基本座標[ n移動元の行の基本位置 ].Y ) * ( ( (double) Math.Abs( this.n現在のスクロールカウンタ ) ) / 100.0 ) ) ); + int n移動先の行の基本位置 = (this.n現在のスクロールカウンタ <= 0) ? ((n移動元の行の基本位置 + 1) % 10) : (((n移動元の行の基本位置 - 1) + 10) % 10); + int x = this.ptパネルの基本座標[n移動元の行の基本位置].X + ((int)((this.ptパネルの基本座標[n移動先の行の基本位置].X - this.ptパネルの基本座標[n移動元の行の基本位置].X) * (((double)Math.Abs(this.n現在のスクロールカウンタ)) / 100.0))); + int y = this.ptパネルの基本座標[n移動元の行の基本位置].Y + ((int)((this.ptパネルの基本座標[n移動先の行の基本位置].Y - this.ptパネルの基本座標[n移動元の行の基本位置].Y) * (((double)Math.Abs(this.n現在のスクロールカウンタ)) / 100.0))); #region [ 現在の行の項目パネル枠を描画。] //----------------- - switch ( this.list項目リスト[ nItem ].eパネル種別 ) + switch (this.list項目リスト[nItem].eパネル種別) { case CItemBase.Eパネル種別.通常: - if ( this.tx通常項目行パネル != null ) - this.tx通常項目行パネル.t2D描画( CDTXMania.app.Device, x * Scale.X, y * Scale.Y ); + if (this.tx通常項目行パネル != null) + this.tx通常項目行パネル.t2D描画(CDTXMania.app.Device, x * Scale.X, y * Scale.Y); break; case CItemBase.Eパネル種別.その他: - if ( this.txその他項目行パネル != null ) - this.txその他項目行パネル.t2D描画( CDTXMania.app.Device, x * Scale.X, y * Scale.Y ); + if (this.txその他項目行パネル != null) + this.txその他項目行パネル.t2D描画(CDTXMania.app.Device, x * Scale.X, y * Scale.Y); break; } //----------------- #endregion #region [ 現在の行の項目名を描画。] //----------------- - if ( listMenu[ nItem ].txMenuItemRight != null ) // 自前のキャッシュに含まれているようなら、再レンダリングせずキャッシュを使用 + if (listMenu[nItem].txMenuItemRight != null) // 自前のキャッシュに含まれているようなら、再レンダリングせずキャッシュを使用 { - listMenu[ nItem ].txMenuItemRight.t2D描画( CDTXMania.app.Device, ( x + 0x12 ) * Scale.X, ( y + 12 ) * Scale.Y - 20 ); + listMenu[nItem].txMenuItemRight.t2D描画(CDTXMania.app.Device, (x + 0x12) * Scale.X, (y + 12) * Scale.Y - 20); } else { - Bitmap bmpItem = prvFont.DrawPrivateFont( this.list項目リスト[ nItem ].str項目名, Color.White, Color.Black ); - listMenu[ nItem ].txMenuItemRight = TextureFactory.tテクスチャの生成( bmpItem ); + Bitmap bmpItem = prvFont.DrawPrivateFont(this.list項目リスト[nItem].str項目名, Color.White, Color.Black); + listMenu[nItem].txMenuItemRight = TextureFactory.tテクスチャの生成(bmpItem); // ctItem.t2D描画( CDTXMania.app.Device, ( x + 0x12 ) * Scale.X, ( y + 12 ) * Scale.Y - 20 ); // TextureFactory.tテクスチャの解放( ref ctItem ); - TextureFactory.t安全にDisposeする( ref bmpItem ); + TextureFactory.t安全にDisposeする(ref bmpItem); } //CDTXMania.app.stageコンフィグ.actFont.t文字列描画( x + 0x12, y + 12, this.list項目リスト[ nItem ].str項目名 ); //----------------- @@ -2244,13 +2245,13 @@ namespace DTXMania //----------------- string strParam = null; bool b強調 = false; - switch ( this.list項目リスト[ nItem ].e種別 ) + switch (this.list項目リスト[nItem].e種別) { case CItemBase.E種別.ONorOFFトグル: #region [ *** ] //----------------- //CDTXMania.app.stageコンフィグ.actFont.t文字列描画( x + 210, y + 12, ( (CItemToggle) this.list項目リスト[ nItem ] ).bON ? "ON" : "OFF" ); - strParam = ( (CItemToggle) this.list項目リスト[ nItem ] ).bON ? "ON" : "OFF"; + strParam = ((CItemToggle)this.list項目リスト[nItem]).bON ? "ON" : "OFF"; break; //----------------- #endregion @@ -2258,7 +2259,7 @@ namespace DTXMania case CItemBase.E種別.ONorOFFor不定スリーステート: #region [ *** ] //----------------- - switch ( ( (CItemThreeState) this.list項目リスト[ nItem ] ).e現在の状態 ) + switch (((CItemThreeState)this.list項目リスト[nItem]).e現在の状態) { case CItemThreeState.E状態.ON: strParam = "ON"; @@ -2280,24 +2281,24 @@ namespace DTXMania case CItemBase.E種別.整数: // #24789 2011.4.8 yyagi: add PlaySpeed supports (copied them from OPTION) #region [ *** ] //----------------- - if ( this.list項目リスト[ nItem ] == this.iCommonPlaySpeed ) + if (this.list項目リスト[nItem] == this.iCommonPlaySpeed) { - double d = ( (double) ( (CItemInteger) this.list項目リスト[ nItem ] ).n現在の値 ) / 20.0; + double d = ((double)((CItemInteger)this.list項目リスト[nItem]).n現在の値) / 20.0; //CDTXMania.app.stageコンフィグ.actFont.t文字列描画( x + 210, y + 12, d.ToString( "0.000" ), ( n行番号 == 0 ) && this.b要素値にフォーカス中 ); - strParam = d.ToString( "0.000" ); + strParam = d.ToString("0.000"); } - else if ( this.list項目リスト[ nItem ] == this.iDrumsScrollSpeed || this.list項目リスト[ nItem ] == this.iGuitarScrollSpeed || this.list項目リスト[ nItem ] == this.iBassScrollSpeed ) + else if (this.list項目リスト[nItem] == this.iDrumsScrollSpeed || this.list項目リスト[nItem] == this.iGuitarScrollSpeed || this.list項目リスト[nItem] == this.iBassScrollSpeed) { - float f = ( ( (CItemInteger) this.list項目リスト[ nItem ] ).n現在の値 + 1 ) * 0.5f; + float f = (((CItemInteger)this.list項目リスト[nItem]).n現在の値 + 1) * 0.5f; //CDTXMania.app.stageコンフィグ.actFont.t文字列描画( x + 210, y + 12, f.ToString( "x0.0" ), ( n行番号 == 0 ) && this.b要素値にフォーカス中 ); - strParam = f.ToString( "x0.0" ); + strParam = f.ToString("x0.0"); } else { //CDTXMania.app.stageコンフィグ.actFont.t文字列描画( x + 210, y + 12, ( (CItemInteger) this.list項目リスト[ nItem ] ).n現在の値.ToString(), ( n行番号 == 0 ) && this.b要素値にフォーカス中 ); - strParam = ( (CItemInteger) this.list項目リスト[ nItem ] ).n現在の値.ToString(); + strParam = ((CItemInteger)this.list項目リスト[nItem]).n現在の値.ToString(); } - b強調 = ( n行番号 == 0 ) && this.b要素値にフォーカス中; + b強調 = (n行番号 == 0) && this.b要素値にフォーカス中; break; //----------------- #endregion @@ -2306,17 +2307,17 @@ namespace DTXMania #region [ *** ] //----------------- { - CItemList list = (CItemList) this.list項目リスト[ nItem ]; + CItemList list = (CItemList)this.list項目リスト[nItem]; //CDTXMania.app.stageコンフィグ.actFont.t文字列描画( x + 210, y + 12, list.list項目値[ list.n現在選択されている項目番号 ] ); - strParam = list.list項目値[ list.n現在選択されている項目番号 ]; + strParam = list.list項目値[list.n現在選択されている項目番号]; #region [ 必要な場合に、Skinのサンプルを生成・描画する。#28195 2012.5.2 yyagi ] - if ( this.list項目リスト[ this.n現在の選択項目 ] == this.iSystemSkinSubfolder ) + if (this.list項目リスト[this.n現在の選択項目] == this.iSystemSkinSubfolder) { tGenerateSkinSample(); // 最初にSkinの選択肢にきたとき(Enterを押す前)に限り、サンプル生成が発生する。 - if ( txSkinSample1 != null ) + if (txSkinSample1 != null) { - txSkinSample1.t2D描画( CDTXMania.app.Device, 56 * Scale.X, 300 * Scale.Y ); + txSkinSample1.t2D描画(CDTXMania.app.Device, 56 * Scale.X, 300 * Scale.Y); } } #endregion @@ -2325,54 +2326,54 @@ namespace DTXMania //----------------- #endregion } - if ( b強調 ) + if (b強調) { Bitmap bmpStr = b強調 ? - prvFont.DrawPrivateFont( strParam, Color.White, Color.Black, Color.Yellow, Color.OrangeRed ) : - prvFont.DrawPrivateFont( strParam, Color.White, Color.Black ); - CTexture txStr = TextureFactory.tテクスチャの生成( bmpStr, false ); - txStr.t2D描画( CDTXMania.app.Device, ( x + 210 ) * Scale.X, ( y + 12 ) * Scale.Y - 20 ); - TextureFactory.tテクスチャの解放( ref txStr ); - TextureFactory.t安全にDisposeする( ref bmpStr ); + prvFont.DrawPrivateFont(strParam, Color.White, Color.Black, Color.Yellow, Color.OrangeRed) : + prvFont.DrawPrivateFont(strParam, Color.White, Color.Black); + CTexture txStr = TextureFactory.tテクスチャの生成(bmpStr, false); + txStr.t2D描画(CDTXMania.app.Device, (x + 210) * Scale.X, (y + 12) * Scale.Y - 20); + TextureFactory.tテクスチャの解放(ref txStr); + TextureFactory.t安全にDisposeする(ref bmpStr); } else { - int nIndex = this.list項目リスト[ nItem ].GetIndex(); - if ( listMenu[ nItem ].nParam != nIndex || listMenu[ nItem ].txParam == null ) + int nIndex = this.list項目リスト[nItem].GetIndex(); + if (listMenu[nItem].nParam != nIndex || listMenu[nItem].txParam == null) { - stMenuItemRight stm = listMenu[ nItem ]; + stMenuItemRight stm = listMenu[nItem]; stm.nParam = nIndex; - object o = this.list項目リスト[ nItem ].obj現在値(); - stm.strParam = ( o == null ) ? "" : o.ToString(); + object o = this.list項目リスト[nItem].obj現在値(); + stm.strParam = (o == null) ? "" : o.ToString(); Bitmap bmpStr = - prvFont.DrawPrivateFont( strParam, Color.White, Color.Black ); - stm.txParam = TextureFactory.tテクスチャの生成( bmpStr, false ); - TextureFactory.t安全にDisposeする( ref bmpStr ); + prvFont.DrawPrivateFont(strParam, Color.White, Color.Black); + stm.txParam = TextureFactory.tテクスチャの生成(bmpStr, false); + TextureFactory.t安全にDisposeする(ref bmpStr); - listMenu[ nItem ] = stm; + listMenu[nItem] = stm; } - listMenu[ nItem ].txParam.t2D描画( CDTXMania.app.Device, ( x + 210 ) * Scale.X, ( y + 12 ) * Scale.Y - 20 ); + listMenu[nItem].txParam.t2D描画(CDTXMania.app.Device, (x + 210) * Scale.X, (y + 12) * Scale.Y - 20); } //----------------- #endregion - - nItem = this.t次の項目( nItem ); + + nItem = this.t次の項目(nItem); } //----------------- #endregion - + #region [ 項目リストにフォーカスがあって、かつスクロールが停止しているなら、パネルの上下に▲印を描画する。] //----------------- - if( this.b項目リスト側にフォーカスがある && ( this.n目標のスクロールカウンタ == 0 ) ) + if (this.b項目リスト側にフォーカスがある && (this.n目標のスクロールカウンタ == 0)) { int x; int y_upper; int y_lower; - + // 位置決定。 - if( this.b要素値にフォーカス中 ) + if (this.b要素値にフォーカス中) { x = 528; // 要素値の上下あたり。 y_upper = 198 - this.ct三角矢印アニメ.n現在の値; @@ -2387,17 +2388,17 @@ namespace DTXMania // 描画。 - if ( this.tx三角矢印 != null ) + if (this.tx三角矢印 != null) { - this.tx三角矢印.t2D描画( CDTXMania.app.Device, x * Scale.X, y_upper * Scale.Y, new Rectangle( 0, 0, (int) ( 32 * Scale.X ), (int) ( 16 * Scale.Y ) ) ); - this.tx三角矢印.t2D描画( CDTXMania.app.Device, x * Scale.X, y_lower * Scale.Y, new Rectangle( 0, (int) ( 16 * Scale.Y ), (int) ( 32 * Scale.X ), (int) ( 16 * Scale.Y ) ) ); + this.tx三角矢印.t2D描画(CDTXMania.app.Device, x * Scale.X, y_upper * Scale.Y, new Rectangle(0, 0, (int)(32 * Scale.X), (int)(16 * Scale.Y))); + this.tx三角矢印.t2D描画(CDTXMania.app.Device, x * Scale.X, y_lower * Scale.Y, new Rectangle(0, (int)(16 * Scale.Y), (int)(32 * Scale.X), (int)(16 * Scale.Y))); } } //----------------- #endregion return 0; } - + // その他 @@ -2460,7 +2461,7 @@ namespace DTXMania private CItemToggle iSystemAVI; private CItemToggle iSystemForceAVIFullscreen; private CItemToggle iSystemBGA; -// private CItemToggle iSystemGraph; #24074 2011.01.23 comment-out ikanick オプション(Drums)へ移行 + // private CItemToggle iSystemGraph; #24074 2011.01.23 comment-out ikanick オプション(Drums)へ移行 private CItemInteger iSystemBGAlpha; private CItemToggle iSystemBGMSound; private CItemInteger iSystemChipVolume; @@ -2468,11 +2469,11 @@ namespace DTXMania private CItemToggle iSystemCymbalFree; private CItemList iSystemDamageLevel; private CItemToggle iSystemDebugInfo; -// private CItemToggle iSystemDrums; + // private CItemToggle iSystemDrums; private CItemToggle iSystemFillIn; private CItemList iSystemFTGroup; private CItemToggle iSystemFullscreen; -// private CItemToggle iSystemGuitar; + // private CItemToggle iSystemGuitar; private CItemList iSystemHHGroup; private CItemList iSystemBDGroup; // #27029 2012.1.4 from private CItemToggle iSystemHitSound; @@ -2493,18 +2494,18 @@ namespace DTXMania private CItemToggle iSystemStageFailed; private CItemToggle iSystemStoicMode; private CItemToggle iSystemVSyncWait; - private CItemList iSystemShowLag; // #25370 2011.6.3 yyagi + private CItemList iSystemShowLag; // #25370 2011.6.3 yyagi private CItemToggle iSystemAutoResultCapture; // #25399 2011.6.9 yyagi private CItemToggle iSystemBufferedInput; private CItemInteger iSystemRisky; // #23559 2011.7.27 yyagi private CItemList iSystemSoundType; // #24820 2013.1.3 yyagi private CItemInteger iSystemWASAPIBufferSizeMs; // #24820 2013.1.15 yyagi -// private CItemInteger iSystemASIOBufferSizeMs; // #24820 2013.1.3 yyagi - private CItemList iSystemASIODevice; // #24820 2013.1.17 yyagi + // private CItemInteger iSystemASIOBufferSizeMs; // #24820 2013.1.3 yyagi + private CItemList iSystemASIODevice; // #24820 2013.1.17 yyagi private int iSystemSoundType_initial; private int iSystemWASAPIBufferSizeMs_initial; -// private int iSystemASIOBufferSizeMs_initial; + // private int iSystemASIOBufferSizeMs_initial; private int iSystemASIODevice_initial; private CItemToggle iSystemSoundTimerType; // #33689 2014.6.17 yyagi private int iSystemSoundTimerType_initial; // #33689 2014.6.17 yyagi @@ -2522,7 +2523,7 @@ namespace DTXMania private long nスクロール用タイマ値; private int n現在のスクロールカウンタ; private int n目標のスクロールカウンタ; - private Point[] ptパネルの基本座標 = new Point[] { new Point( 0x12d, 3 ), new Point( 0x12d, 0x35 ), new Point( 0x12d, 0x67 ), new Point( 0x12d, 0x99 ), new Point( 0x114, 0xcb ), new Point( 0x12d, 0xfd ), new Point( 0x12d, 0x12f ), new Point( 0x12d, 0x161 ), new Point( 0x12d, 0x193 ), new Point( 0x12d, 0x1c5 ) }; + private Point[] ptパネルの基本座標 = new Point[] { new Point(0x12d, 3), new Point(0x12d, 0x35), new Point(0x12d, 0x67), new Point(0x12d, 0x99), new Point(0x114, 0xcb), new Point(0x12d, 0xfd), new Point(0x12d, 0x12f), new Point(0x12d, 0x161), new Point(0x12d, 0x193), new Point(0x12d, 0x1c5) }; private CTextureAf txその他項目行パネル; private CTexture tx三角矢印; private CTextureAf tx通常項目行パネル; @@ -2560,7 +2561,7 @@ namespace DTXMania private CItemToggle iBassB; // private CItemToggle iBassPick; // private CItemToggle iBassW; // - + //private CItemToggle iBassHidden; private CItemToggle iBassLeft; private CItemToggle iBassLight; @@ -2572,7 +2573,7 @@ namespace DTXMania //private CItemToggle iBassSudden; private CItemList iCommonDark; private CItemInteger iCommonPlaySpeed; -// private CItemBase iCommonReturnToMenu; + // private CItemBase iCommonReturnToMenu; private CItemThreeState iDrumsAutoPlayAll; private CItemToggle iDrumsBass; @@ -2623,37 +2624,37 @@ namespace DTXMania private CItemInteger iSystemMasterVolume; // #33700 2014.4.26 yyagi private CItemToggle iSystemLoadsoundspeed; // #36046 2016.2.21 ikanick - private int t前の項目( int nItem ) + private int t前の項目(int nItem) { - if( --nItem < 0 ) + if (--nItem < 0) { nItem = this.list項目リスト.Count - 1; } return nItem; } - private int t次の項目( int nItem ) + private int t次の項目(int nItem) { - if( ++nItem >= this.list項目リスト.Count ) + if (++nItem >= this.list項目リスト.Count) { nItem = 0; } return nItem; } - private void t全部のドラムパッドのAutoを切り替える( bool bAutoON ) + private void t全部のドラムパッドのAutoを切り替える(bool bAutoON) { this.iDrumsLeftCymbal.bON = this.iDrumsHiHat.bON = this.iDrumsSnare.bON = this.iDrumsBass.bON = this.iDrumsHighTom.bON = this.iDrumsLowTom.bON = this.iDrumsFloorTom.bON = this.iDrumsCymbalRide.bON = bAutoON; } - private void t全部のギターパッドのAutoを切り替える( bool bAutoON ) + private void t全部のギターパッドのAutoを切り替える(bool bAutoON) { this.iGuitarR.bON = this.iGuitarG.bON = this.iGuitarB.bON = this.iGuitarPick.bON = this.iGuitarW.bON = bAutoON; } - private void t全部のベースパッドのAutoを切り替える( bool bAutoON ) + private void t全部のベースパッドのAutoを切り替える(bool bAutoON) { this.iBassR.bON = this.iBassG.bON = this.iBassB.bON = this.iBassPick.bON = this.iBassW.bON = bAutoON; } private void tConfigIniへ記録する() { - switch( this.eメニュー種別 ) + switch (this.eメニュー種別) { case Eメニュー種別.System: this.tConfigIniへ記録する_System(); @@ -2690,13 +2691,13 @@ namespace DTXMania } private void tConfigIniへ記録する_System() { - CDTXMania.app.ConfigIni.eDark = (Eダークモード) this.iCommonDark.n現在選択されている項目番号; + CDTXMania.app.ConfigIni.eDark = (Eダークモード)this.iCommonDark.n現在選択されている項目番号; CDTXMania.app.ConfigIni.n演奏速度 = this.iCommonPlaySpeed.n現在の値; - CDTXMania.app.ConfigIni.bGuitar有効 = ( ( ( this.iSystemGRmode.n現在選択されている項目番号 + 1 ) / 2 ) == 1 ); - //this.iSystemGuitar.bON; - CDTXMania.app.ConfigIni.bDrums有効 = ( ( ( this.iSystemGRmode.n現在選択されている項目番号 + 1 ) % 2 ) == 1 ); - //this.iSystemDrums.bON; + CDTXMania.app.ConfigIni.bGuitar有効 = (((this.iSystemGRmode.n現在選択されている項目番号 + 1) / 2) == 1); + //this.iSystemGuitar.bON; + CDTXMania.app.ConfigIni.bDrums有効 = (((this.iSystemGRmode.n現在選択されている項目番号 + 1) % 2) == 1); + //this.iSystemDrums.bON; CDTXMania.app.ConfigIni.b全画面モード = this.iSystemFullscreen.bON; CDTXMania.app.ConfigIni.bSTAGEFAILED有効 = this.iSystemStageFailed.bON; @@ -2708,14 +2709,14 @@ namespace DTXMania CDTXMania.app.ConfigIni.bAVI有効 = this.iSystemAVI.bON; CDTXMania.app.ConfigIni.bForceAVIFullscreen = this.iSystemForceAVIFullscreen.bON; CDTXMania.app.ConfigIni.bBGA有効 = this.iSystemBGA.bON; -// CDTXMania.app.ConfigIni.bGraph有効 = this.iSystemGraph.bON;#24074 2011.01.23 comment-out ikanick オプション(Drums)へ移行 + // CDTXMania.app.ConfigIni.bGraph有効 = this.iSystemGraph.bON;#24074 2011.01.23 comment-out ikanick オプション(Drums)へ移行 CDTXMania.app.ConfigIni.n曲が選択されてからプレビュー音が鳴るまでのウェイトms = this.iSystemPreviewSoundWait.n現在の値; CDTXMania.app.ConfigIni.n曲が選択されてからプレビュー画像が表示開始されるまでのウェイトms = this.iSystemPreviewImageWait.n現在の値; CDTXMania.app.ConfigIni.b演奏情報を表示する = this.iSystemDebugInfo.bON; CDTXMania.app.ConfigIni.n背景の透過度 = this.iSystemBGAlpha.n現在の値; CDTXMania.app.ConfigIni.bBGM音を発声する = this.iSystemBGMSound.bON; CDTXMania.app.ConfigIni.b歓声を発声する = this.iSystemAudienceSound.bON; - CDTXMania.app.ConfigIni.eダメージレベル = (Eダメージレベル) this.iSystemDamageLevel.n現在選択されている項目番号; + CDTXMania.app.ConfigIni.eダメージレベル = (Eダメージレベル)this.iSystemDamageLevel.n現在選択されている項目番号; CDTXMania.app.ConfigIni.bScoreIniを出力する = this.iSystemSaveScore.bON; CDTXMania.app.ConfigIni.bログ出力 = this.iLogOutputLog.bON; @@ -2728,24 +2729,24 @@ namespace DTXMania CDTXMania.app.ConfigIni.nRisky = this.iSystemRisky.n現在の値; // #23559 2011.7.27 yyagi - CDTXMania.app.ConfigIni.strSystemSkinSubfolderFullName = skinSubFolders[ nSkinIndex ]; // #28195 2012.5.2 yyagi - CDTXMania.app.Skin.SetCurrentSkinSubfolderFullName( CDTXMania.app.ConfigIni.strSystemSkinSubfolderFullName, true ); + CDTXMania.app.ConfigIni.strSystemSkinSubfolderFullName = skinSubFolders[nSkinIndex]; // #28195 2012.5.2 yyagi + CDTXMania.app.Skin.SetCurrentSkinSubfolderFullName(CDTXMania.app.ConfigIni.strSystemSkinSubfolderFullName, true); CDTXMania.app.ConfigIni.bUseBoxDefSkin = this.iSystemUseBoxDefSkin.bON; // #28195 2012.5.6 yyagi CDTXMania.app.ConfigIni.nSoundDeviceType = this.iSystemSoundType.n現在選択されている項目番号; // #24820 2013.1.3 yyagi CDTXMania.app.ConfigIni.nWASAPIBufferSizeMs = this.iSystemWASAPIBufferSizeMs.n現在の値; // #24820 2013.1.15 yyagi -// CDTXMania.app.ConfigIni.nASIOBufferSizeMs = this.iSystemASIOBufferSizeMs.n現在の値; // #24820 2013.1.3 yyagi + // CDTXMania.app.ConfigIni.nASIOBufferSizeMs = this.iSystemASIOBufferSizeMs.n現在の値; // #24820 2013.1.3 yyagi CDTXMania.app.ConfigIni.nASIODevice = this.iSystemASIODevice.n現在選択されている項目番号; // #24820 2013.1.17 yyagi CDTXMania.app.ConfigIni.bUseOSTimer = this.iSystemSoundTimerType.bON; // #33689 2014.6.17 yyagi CDTXMania.app.ConfigIni.bTimeStretch = this.iSystemTimeStretch.bON; // #23664 2013.2.24 yyagi -//Trace.TraceInformation( "saved" ); -//Trace.TraceInformation( "Skin現在Current : " + CDTXMania.app.Skin.GetCurrentSkinSubfolderFullName(true) ); -//Trace.TraceInformation( "Skin現在System : " + CSkin.strSystemSkinSubfolderFullName ); -//Trace.TraceInformation( "Skin現在BoxDef : " + CSkin.strBoxDefSkinSubfolderFullName ); + //Trace.TraceInformation( "saved" ); + //Trace.TraceInformation( "Skin現在Current : " + CDTXMania.app.Skin.GetCurrentSkinSubfolderFullName(true) ); + //Trace.TraceInformation( "Skin現在System : " + CSkin.strSystemSkinSubfolderFullName ); + //Trace.TraceInformation( "Skin現在BoxDef : " + CSkin.strBoxDefSkinSubfolderFullName ); CDTXMania.app.ConfigIni.nMasterVolume = this.iSystemMasterVolume.n現在の値; // #33700 2014.4.26 yyagi - CDTXMania.app.ConfigIni.e判定表示優先度 = (E判定表示優先度) this.iSystemJudgeDispPriority.n現在選択されている項目番号; - + CDTXMania.app.ConfigIni.e判定表示優先度 = (E判定表示優先度)this.iSystemJudgeDispPriority.n現在選択されている項目番号; + CDTXMania.app.ConfigIni.b曲読み込みを高速化する = this.iSystemLoadsoundspeed.bON;// #36046 2016.2.21 ikanick } private void tConfigIniへ記録する_Bass() @@ -2757,23 +2758,23 @@ namespace DTXMania CDTXMania.app.ConfigIni.bAutoPlay.BsPick = this.iBassPick.bON; CDTXMania.app.ConfigIni.bAutoPlay.BsW = this.iBassW.bON; CDTXMania.app.ConfigIni.n譜面スクロール速度.Bass = this.iBassScrollSpeed.n現在の値; - // "Sudden" || "Sud+Hid" - CDTXMania.app.ConfigIni.bSudden.Bass = ( this.iBassSudHid.n現在選択されている項目番号 == 1 || this.iBassSudHid.n現在選択されている項目番号 == 3 ) ? true : false; - // "Hidden" || "Sud+Hid" - CDTXMania.app.ConfigIni.bHidden.Bass = ( this.iBassSudHid.n現在選択されている項目番号 == 2 || this.iBassSudHid.n現在選択されている項目番号 == 3 ) ? true : false; - if ( this.iBassSudHid.n現在選択されている項目番号 == 4 ) CDTXMania.app.ConfigIni.eInvisible.Bass = EInvisible.SEMI; // "S-Invisible" - else if ( this.iBassSudHid.n現在選択されている項目番号 == 5 ) CDTXMania.app.ConfigIni.eInvisible.Bass = EInvisible.FULL; // "F-Invisible" - else CDTXMania.app.ConfigIni.eInvisible.Bass = EInvisible.OFF; + // "Sudden" || "Sud+Hid" + CDTXMania.app.ConfigIni.bSudden.Bass = (this.iBassSudHid.n現在選択されている項目番号 == 1 || this.iBassSudHid.n現在選択されている項目番号 == 3) ? true : false; + // "Hidden" || "Sud+Hid" + CDTXMania.app.ConfigIni.bHidden.Bass = (this.iBassSudHid.n現在選択されている項目番号 == 2 || this.iBassSudHid.n現在選択されている項目番号 == 3) ? true : false; + if (this.iBassSudHid.n現在選択されている項目番号 == 4) CDTXMania.app.ConfigIni.eInvisible.Bass = EInvisible.SEMI; // "S-Invisible" + else if (this.iBassSudHid.n現在選択されている項目番号 == 5) CDTXMania.app.ConfigIni.eInvisible.Bass = EInvisible.FULL; // "F-Invisible" + else CDTXMania.app.ConfigIni.eInvisible.Bass = EInvisible.OFF; CDTXMania.app.ConfigIni.bReverse.Bass = this.iBassReverse.bON; - CDTXMania.app.ConfigIni.判定文字表示位置.Bass = (E判定文字表示位置) this.iBassPosition.n現在選択されている項目番号; - CDTXMania.app.ConfigIni.eRandom.Bass = (Eランダムモード) this.iBassRandom.n現在選択されている項目番号; + CDTXMania.app.ConfigIni.判定文字表示位置.Bass = (E判定文字表示位置)this.iBassPosition.n現在選択されている項目番号; + CDTXMania.app.ConfigIni.eRandom.Bass = (Eランダムモード)this.iBassRandom.n現在選択されている項目番号; CDTXMania.app.ConfigIni.bLight.Bass = this.iBassLight.bON; CDTXMania.app.ConfigIni.bLeft.Bass = this.iBassLeft.bON; CDTXMania.app.ConfigIni.nInputAdjustTimeMs.Bass = this.iBassInputAdjustTimeMs.n現在の値; // #23580 2011.1.3 yyagi CDTXMania.app.ConfigIni.b演奏音を強調する.Bass = this.iSystemSoundMonitorBass.bON; CDTXMania.app.ConfigIni.n表示可能な最小コンボ数.Bass = this.iSystemMinComboBass.n現在の値; - CDTXMania.app.ConfigIni.e判定位置.Bass = (E判定位置) this.iSystemJudgePosBass.n現在選択されている項目番号; // #33891 2014.6.26 yyagi + CDTXMania.app.ConfigIni.e判定位置.Bass = (E判定位置)this.iSystemJudgePosBass.n現在選択されている項目番号; // #33891 2014.6.26 yyagi //CDTXMania.app.ConfigIni.e判定表示優先度.Bass = (E判定表示優先度) this.iBassJudgeDispPriority.n現在選択されている項目番号; } private void tConfigIniへ記録する_Drums() @@ -2787,27 +2788,27 @@ namespace DTXMania CDTXMania.app.ConfigIni.bAutoPlay.FT = this.iDrumsFloorTom.bON; CDTXMania.app.ConfigIni.bAutoPlay.CY = this.iDrumsCymbalRide.bON; CDTXMania.app.ConfigIni.n譜面スクロール速度.Drums = this.iDrumsScrollSpeed.n現在の値; - CDTXMania.app.ConfigIni.ドラムコンボ文字の表示位置 = (Eドラムコンボ文字の表示位置) this.iDrumsComboPosition.n現在選択されている項目番号; - // "Sudden" || "Sud+Hid" - CDTXMania.app.ConfigIni.bSudden.Drums = ( this.iDrumsSudHid.n現在選択されている項目番号 == 1 || this.iDrumsSudHid.n現在選択されている項目番号 == 3 ) ? true : false; - // "Hidden" || "Sud+Hid" - CDTXMania.app.ConfigIni.bHidden.Drums = ( this.iDrumsSudHid.n現在選択されている項目番号 == 2 || this.iDrumsSudHid.n現在選択されている項目番号 == 3 ) ? true : false; - if ( this.iDrumsSudHid.n現在選択されている項目番号 == 4 ) CDTXMania.app.ConfigIni.eInvisible.Drums = EInvisible.SEMI; // "S-Invisible" - else if ( this.iDrumsSudHid.n現在選択されている項目番号 == 5 ) CDTXMania.app.ConfigIni.eInvisible.Drums = EInvisible.FULL; // "F-Invisible" - else CDTXMania.app.ConfigIni.eInvisible.Drums = EInvisible.OFF; + CDTXMania.app.ConfigIni.ドラムコンボ文字の表示位置 = (Eドラムコンボ文字の表示位置)this.iDrumsComboPosition.n現在選択されている項目番号; + // "Sudden" || "Sud+Hid" + CDTXMania.app.ConfigIni.bSudden.Drums = (this.iDrumsSudHid.n現在選択されている項目番号 == 1 || this.iDrumsSudHid.n現在選択されている項目番号 == 3) ? true : false; + // "Hidden" || "Sud+Hid" + CDTXMania.app.ConfigIni.bHidden.Drums = (this.iDrumsSudHid.n現在選択されている項目番号 == 2 || this.iDrumsSudHid.n現在選択されている項目番号 == 3) ? true : false; + if (this.iDrumsSudHid.n現在選択されている項目番号 == 4) CDTXMania.app.ConfigIni.eInvisible.Drums = EInvisible.SEMI; // "S-Invisible" + else if (this.iDrumsSudHid.n現在選択されている項目番号 == 5) CDTXMania.app.ConfigIni.eInvisible.Drums = EInvisible.FULL; // "F-Invisible" + else CDTXMania.app.ConfigIni.eInvisible.Drums = EInvisible.OFF; CDTXMania.app.ConfigIni.bReverse.Drums = this.iDrumsReverse.bON; - CDTXMania.app.ConfigIni.判定文字表示位置.Drums = (E判定文字表示位置) this.iDrumsPosition.n現在選択されている項目番号; + CDTXMania.app.ConfigIni.判定文字表示位置.Drums = (E判定文字表示位置)this.iDrumsPosition.n現在選択されている項目番号; CDTXMania.app.ConfigIni.bTight = this.iDrumsTight.bON; CDTXMania.app.ConfigIni.nInputAdjustTimeMs.Drums = this.iDrumsInputAdjustTimeMs.n現在の値; // #23580 2011.1.3 yyagi CDTXMania.app.ConfigIni.bGraph.Drums = this.iDrumsGraph.bON;// #24074 2011.01.23 add ikanick - CDTXMania.app.ConfigIni.eHHGroup = (EHHGroup) this.iSystemHHGroup.n現在選択されている項目番号; - CDTXMania.app.ConfigIni.eFTGroup = (EFTGroup) this.iSystemFTGroup.n現在選択されている項目番号; - CDTXMania.app.ConfigIni.eCYGroup = (ECYGroup) this.iSystemCYGroup.n現在選択されている項目番号; - CDTXMania.app.ConfigIni.eBDGroup = (EBDGroup) this.iSystemBDGroup.n現在選択されている項目番号; - CDTXMania.app.ConfigIni.eHitSoundPriorityHH = (E打ち分け時の再生の優先順位) this.iSystemHitSoundPriorityHH.n現在選択されている項目番号; - CDTXMania.app.ConfigIni.eHitSoundPriorityFT = (E打ち分け時の再生の優先順位) this.iSystemHitSoundPriorityFT.n現在選択されている項目番号; - CDTXMania.app.ConfigIni.eHitSoundPriorityCY = (E打ち分け時の再生の優先順位) this.iSystemHitSoundPriorityCY.n現在選択されている項目番号; + CDTXMania.app.ConfigIni.eHHGroup = (EHHGroup)this.iSystemHHGroup.n現在選択されている項目番号; + CDTXMania.app.ConfigIni.eFTGroup = (EFTGroup)this.iSystemFTGroup.n現在選択されている項目番号; + CDTXMania.app.ConfigIni.eCYGroup = (ECYGroup)this.iSystemCYGroup.n現在選択されている項目番号; + CDTXMania.app.ConfigIni.eBDGroup = (EBDGroup)this.iSystemBDGroup.n現在選択されている項目番号; + CDTXMania.app.ConfigIni.eHitSoundPriorityHH = (E打ち分け時の再生の優先順位)this.iSystemHitSoundPriorityHH.n現在選択されている項目番号; + CDTXMania.app.ConfigIni.eHitSoundPriorityFT = (E打ち分け時の再生の優先順位)this.iSystemHitSoundPriorityFT.n現在選択されている項目番号; + CDTXMania.app.ConfigIni.eHitSoundPriorityCY = (E打ち分け時の再生の優先順位)this.iSystemHitSoundPriorityCY.n現在選択されている項目番号; CDTXMania.app.ConfigIni.bフィルイン有効 = this.iSystemFillIn.bON; CDTXMania.app.ConfigIni.b演奏音を強調する.Drums = this.iSystemSoundMonitorDrums.bON; CDTXMania.app.ConfigIni.bドラム打音を発声する = this.iSystemHitSound.bON; @@ -2817,7 +2818,7 @@ namespace DTXMania CDTXMania.app.ConfigIni.eDark = (Eダークモード)this.iCommonDark.n現在選択されている項目番号; CDTXMania.app.ConfigIni.nRisky = this.iSystemRisky.n現在の値; // #23559 2911.7.27 yyagi //CDTXMania.app.ConfigIni.e判定表示優先度.Drums = (E判定表示優先度) this.iDrumsJudgeDispPriority.n現在選択されている項目番号; - CDTXMania.app.ConfigIni.eドラムレーン表示位置 = (Eドラムレーン表示位置) this.iDrumsLanePosition.n現在選択されている項目番号; + CDTXMania.app.ConfigIni.eドラムレーン表示位置 = (Eドラムレーン表示位置)this.iDrumsLanePosition.n現在選択されている項目番号; } private void tConfigIniへ記録する_Guitar() { @@ -2828,23 +2829,23 @@ namespace DTXMania CDTXMania.app.ConfigIni.bAutoPlay.GtPick = this.iGuitarPick.bON; CDTXMania.app.ConfigIni.bAutoPlay.GtW = this.iGuitarW.bON; CDTXMania.app.ConfigIni.n譜面スクロール速度.Guitar = this.iGuitarScrollSpeed.n現在の値; - // "Sudden" || "Sud+Hid" - CDTXMania.app.ConfigIni.bSudden.Guitar = ( this.iGuitarSudHid.n現在選択されている項目番号 == 1 || this.iGuitarSudHid.n現在選択されている項目番号 == 3 ) ? true : false; - // "Hidden" || "Sud+Hid" - CDTXMania.app.ConfigIni.bHidden.Guitar = ( this.iGuitarSudHid.n現在選択されている項目番号 == 2 || this.iGuitarSudHid.n現在選択されている項目番号 == 3 ) ? true : false; - if ( this.iGuitarSudHid.n現在選択されている項目番号 == 4 ) CDTXMania.app.ConfigIni.eInvisible.Guitar = EInvisible.SEMI; // "S-Invisible" - else if ( this.iGuitarSudHid.n現在選択されている項目番号 == 5 ) CDTXMania.app.ConfigIni.eInvisible.Guitar = EInvisible.FULL; // "F-Invisible" - else CDTXMania.app.ConfigIni.eInvisible.Guitar = EInvisible.OFF; + // "Sudden" || "Sud+Hid" + CDTXMania.app.ConfigIni.bSudden.Guitar = (this.iGuitarSudHid.n現在選択されている項目番号 == 1 || this.iGuitarSudHid.n現在選択されている項目番号 == 3) ? true : false; + // "Hidden" || "Sud+Hid" + CDTXMania.app.ConfigIni.bHidden.Guitar = (this.iGuitarSudHid.n現在選択されている項目番号 == 2 || this.iGuitarSudHid.n現在選択されている項目番号 == 3) ? true : false; + if (this.iGuitarSudHid.n現在選択されている項目番号 == 4) CDTXMania.app.ConfigIni.eInvisible.Guitar = EInvisible.SEMI; // "S-Invisible" + else if (this.iGuitarSudHid.n現在選択されている項目番号 == 5) CDTXMania.app.ConfigIni.eInvisible.Guitar = EInvisible.FULL; // "F-Invisible" + else CDTXMania.app.ConfigIni.eInvisible.Guitar = EInvisible.OFF; CDTXMania.app.ConfigIni.bReverse.Guitar = this.iGuitarReverse.bON; - CDTXMania.app.ConfigIni.判定文字表示位置.Guitar = (E判定文字表示位置) this.iGuitarPosition.n現在選択されている項目番号; - CDTXMania.app.ConfigIni.eRandom.Guitar = (Eランダムモード) this.iGuitarRandom.n現在選択されている項目番号; + CDTXMania.app.ConfigIni.判定文字表示位置.Guitar = (E判定文字表示位置)this.iGuitarPosition.n現在選択されている項目番号; + CDTXMania.app.ConfigIni.eRandom.Guitar = (Eランダムモード)this.iGuitarRandom.n現在選択されている項目番号; CDTXMania.app.ConfigIni.bLight.Guitar = this.iGuitarLight.bON; CDTXMania.app.ConfigIni.bLeft.Guitar = this.iGuitarLeft.bON; CDTXMania.app.ConfigIni.nInputAdjustTimeMs.Guitar = this.iGuitarInputAdjustTimeMs.n現在の値; // #23580 2011.1.3 yyagi CDTXMania.app.ConfigIni.n表示可能な最小コンボ数.Guitar = this.iSystemMinComboGuitar.n現在の値; CDTXMania.app.ConfigIni.b演奏音を強調する.Guitar = this.iSystemSoundMonitorGuitar.bON; - CDTXMania.app.ConfigIni.e判定位置.Guitar = (E判定位置) this.iSystemJudgePosGuitar.n現在選択されている項目番号; // #33891 2014.6.26 yyagi + CDTXMania.app.ConfigIni.e判定位置.Guitar = (E判定位置)this.iSystemJudgePosGuitar.n現在選択されている項目番号; // #33891 2014.6.26 yyagi //CDTXMania.app.ConfigIni.e判定表示優先度.Guitar = (E判定表示優先度) this.iGuitarJudgeDispPriority.n現在選択されている項目番号; } //----------------- diff --git a/DTXManiaプロジェクト/コード/ステージ/04.コンフィグ/CStageコンフィグ.cs b/DTXManiaプロジェクト/コード/ステージ/04.コンフィグ/CStageコンフィグ.cs index 06ad0924..b647d577 100644 --- a/DTXManiaプロジェクト/コード/ステージ/04.コンフィグ/CStageコンフィグ.cs +++ b/DTXManiaプロジェクト/コード/ステージ/04.コンフィグ/CStageコンフィグ.cs @@ -21,23 +21,23 @@ namespace DTXMania base.eフェーズID = CStage.Eフェーズ.共通_通常状態; //this.actFont = font = new CActDFPFont(); //base.list子Activities.Add( font ); - base.list子Activities.Add( this.actFIFO = new CActFIFOWhite() ); - base.list子Activities.Add( this.actList = new CActConfigList() ); - base.list子Activities.Add( this.actKeyAssign = new CActConfigKeyAssign() ); - base.list子Activities.Add( this.actオプションパネル = new CActオプションパネル() ); + base.list子Activities.Add(this.actFIFO = new CActFIFOWhite()); + base.list子Activities.Add(this.actList = new CActConfigList()); + base.list子Activities.Add(this.actKeyAssign = new CActConfigKeyAssign()); + base.list子Activities.Add(this.actオプションパネル = new CActオプションパネル()); base.b活性化してない = true; } - - + + // メソッド public void tアサイン完了通知() // CONFIGにのみ存在 { // this.eItemPanelモード = EItemPanelモード.パッド一覧; // } // - public void tパッド選択通知( EKeyConfigPart part, EKeyConfigPad pad ) // + public void tパッド選択通知(EKeyConfigPart part, EKeyConfigPad pad) // { // - this.actKeyAssign.t開始( part, pad, this.actList.ib現在の選択項目.str項目名 ); // + this.actKeyAssign.t開始(part, pad, this.actList.ib現在の選択項目.str項目名); // this.eItemPanelモード = EItemPanelモード.キーコード一覧; // } // public void t項目変更通知() // OPTIONと共通 @@ -45,95 +45,95 @@ namespace DTXMania this.t説明文パネルに現在選択されている項目の説明を描画する(); // } // - + // CStage 実装 public override void On活性化() { - Trace.TraceInformation( "コンフィグステージを活性化します。" ); + Trace.TraceInformation("コンフィグステージを活性化します。"); Trace.Indent(); try { this.n現在のメニュー番号 = 0; // - this.ftフォント = new Font( "MS PGothic", 26f / 2 * Scale.Y, FontStyle.Bold, GraphicsUnit.Pixel ); // - for ( int i = 0; i < 4; i++ ) // + this.ftフォント = new Font("MS PGothic", 26f / 2 * Scale.Y, FontStyle.Bold, GraphicsUnit.Pixel); // + for (int i = 0; i < 4; i++) // { // - this.ctキー反復用[ i ] = new CCounter( 0, 0, 0, CDTXMania.app.Timer ); // + this.ctキー反復用[i] = new CCounter(0, 0, 0, CDTXMania.app.Timer); // } // this.bメニューにフォーカス中 = true; // ここまでOPTIONと共通 this.eItemPanelモード = EItemPanelモード.パッド一覧; - fDisplayLagTimeBaseMs.Drums = (float) CDTXMania.app.ConfigIni.nJudgeLinePosOffset.Drums / ( CDTXMania.app.ConfigIni.n譜面スクロール速度.Drums + 1 ); - fDisplayLagTimeBaseMs.Guitar = (float) CDTXMania.app.ConfigIni.nJudgeLinePosOffset.Guitar / ( CDTXMania.app.ConfigIni.n譜面スクロール速度.Guitar + 1 ); - fDisplayLagTimeBaseMs.Bass = (float) CDTXMania.app.ConfigIni.nJudgeLinePosOffset.Bass / ( CDTXMania.app.ConfigIni.n譜面スクロール速度.Bass + 1 ); + fDisplayLagTimeBaseMs.Drums = (float)CDTXMania.app.ConfigIni.nJudgeLinePosOffset.Drums / (CDTXMania.app.ConfigIni.n譜面スクロール速度.Drums + 1); + fDisplayLagTimeBaseMs.Guitar = (float)CDTXMania.app.ConfigIni.nJudgeLinePosOffset.Guitar / (CDTXMania.app.ConfigIni.n譜面スクロール速度.Guitar + 1); + fDisplayLagTimeBaseMs.Bass = (float)CDTXMania.app.ConfigIni.nJudgeLinePosOffset.Bass / (CDTXMania.app.ConfigIni.n譜面スクロール速度.Bass + 1); } finally { - Trace.TraceInformation( "コンフィグステージの活性化を完了しました。" ); + Trace.TraceInformation("コンフィグステージの活性化を完了しました。"); Trace.Unindent(); } base.On活性化(); // 2011.3.14 yyagi: On活性化()をtryの中から外に移動 } public override void On非活性化() { - Trace.TraceInformation( "コンフィグステージを非活性化します。" ); + Trace.TraceInformation("コンフィグステージを非活性化します。"); Trace.Indent(); try { - CDTXMania.app.ConfigIni.t書き出し( CDTXMania.app.strEXEのあるフォルダ + "Config.ini" ); // CONFIGだけ - if( this.ftフォント != null ) // 以下OPTIONと共通 + CDTXMania.app.ConfigIni.t書き出し(CDTXMania.app.strEXEのあるフォルダ + "Config.ini"); // CONFIGだけ + if (this.ftフォント != null) // 以下OPTIONと共通 { this.ftフォント.Dispose(); this.ftフォント = null; } - for( int i = 0; i < 4; i++ ) + for (int i = 0; i < 4; i++) { - this.ctキー反復用[ i ] = null; + this.ctキー反復用[i] = null; } - CDTXMania.app.ConfigIni.nJudgeLinePosOffset.Drums = (int) ( fDisplayLagTimeBaseMs.Drums * ( CDTXMania.app.ConfigIni.n譜面スクロール速度.Drums + 1 ) ); - CDTXMania.app.ConfigIni.nJudgeLinePosOffset.Guitar = (int) ( fDisplayLagTimeBaseMs.Guitar * ( CDTXMania.app.ConfigIni.n譜面スクロール速度.Guitar + 1 ) ); - CDTXMania.app.ConfigIni.nJudgeLinePosOffset.Bass = (int) ( fDisplayLagTimeBaseMs.Bass * ( CDTXMania.app.ConfigIni.n譜面スクロール速度.Bass + 1 ) ); + CDTXMania.app.ConfigIni.nJudgeLinePosOffset.Drums = (int)(fDisplayLagTimeBaseMs.Drums * (CDTXMania.app.ConfigIni.n譜面スクロール速度.Drums + 1)); + CDTXMania.app.ConfigIni.nJudgeLinePosOffset.Guitar = (int)(fDisplayLagTimeBaseMs.Guitar * (CDTXMania.app.ConfigIni.n譜面スクロール速度.Guitar + 1)); + CDTXMania.app.ConfigIni.nJudgeLinePosOffset.Bass = (int)(fDisplayLagTimeBaseMs.Bass * (CDTXMania.app.ConfigIni.n譜面スクロール速度.Bass + 1)); base.On非活性化(); } - catch ( UnauthorizedAccessException e ) + catch (UnauthorizedAccessException e) { - Trace.TraceError( e.Message + "ファイルが読み取り専用になっていないか、管理者権限がないと書き込めなくなっていないか等を確認して下さい" ); + Trace.TraceError(e.Message + "ファイルが読み取り専用になっていないか、管理者権限がないと書き込めなくなっていないか等を確認して下さい"); } - catch ( Exception e ) + catch (Exception e) { - Trace.TraceError( e.Message ); + Trace.TraceError(e.Message); } finally { - Trace.TraceInformation( "コンフィグステージの非活性化を完了しました。" ); + Trace.TraceInformation("コンフィグステージの非活性化を完了しました。"); Trace.Unindent(); } } public override void OnManagedリソースの作成() // OPTIONと画像以外共通 { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - this.tx背景 = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenConfig background.jpg" ), false ); - this.tx上部パネル = TextureFactory.tテクスチャの生成Af( CSkin.Path( @"Graphics\ScreenConfig header panel.png" ), true ); - this.tx下部パネル = TextureFactory.tテクスチャの生成Af( CSkin.Path( @"Graphics\ScreenConfig footer panel.png" ), true ); - this.txMenuカーソル = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenConfig menu cursor.png" ), false ); + this.tx背景 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenConfig background.jpg"), false); + this.tx上部パネル = TextureFactory.tテクスチャの生成Af(CSkin.Path(@"Graphics\ScreenConfig header panel.png"), true); + this.tx下部パネル = TextureFactory.tテクスチャの生成Af(CSkin.Path(@"Graphics\ScreenConfig footer panel.png"), true); + this.txMenuカーソル = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenConfig menu cursor.png"), false); - prvFont = new CPrivateFastFont( CSkin.Path( @"Graphics\fonts\mplus-1p-heavy.ttf" ), (int) ( 18 * Scale.Y ) ); + prvFont = new CPrivateFastFont(CSkin.Path(@"Graphics\fonts\mplus-1p-heavy.ttf"), (int)(18 * Scale.Y)); string[] strMenuItem = { "System", "Drums", "Guitar", "Bass", "Exit" }; - txMenuItemLeft = new CTexture[ strMenuItem.Length, 2 ]; - for ( int i = 0; i < strMenuItem.Length; i++ ) + txMenuItemLeft = new CTexture[strMenuItem.Length, 2]; + for (int i = 0; i < strMenuItem.Length; i++) { Bitmap bmpStr; - bmpStr = prvFont.DrawPrivateFont( strMenuItem[ i ], Color.White, Color.Black ); - txMenuItemLeft[ i, 0 ] = TextureFactory.tテクスチャの生成( bmpStr, false ); + bmpStr = prvFont.DrawPrivateFont(strMenuItem[i], Color.White, Color.Black); + txMenuItemLeft[i, 0] = TextureFactory.tテクスチャの生成(bmpStr, false); bmpStr.Dispose(); - bmpStr = prvFont.DrawPrivateFont( strMenuItem[ i ], Color.White, Color.Black, Color.Yellow, Color.OrangeRed ); - txMenuItemLeft[ i, 1 ] = TextureFactory.tテクスチャの生成( bmpStr, false ); + bmpStr = prvFont.DrawPrivateFont(strMenuItem[i], Color.White, Color.Black, Color.Yellow, Color.OrangeRed); + txMenuItemLeft[i, 1] = TextureFactory.tテクスチャの生成(bmpStr, false); bmpStr.Dispose(); } - if( this.bメニューにフォーカス中 ) + if (this.bメニューにフォーカス中) { this.t説明文パネルに現在選択されているメニューの説明を描画する(); } @@ -146,20 +146,20 @@ namespace DTXMania } public override void OnManagedリソースの解放() // OPTIONと同じ(COnfig.iniの書き出しタイミングのみ異なるが、無視して良い) { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.tx背景 ); - TextureFactory.tテクスチャの解放( ref this.tx上部パネル ); - TextureFactory.tテクスチャの解放( ref this.tx下部パネル ); - TextureFactory.tテクスチャの解放( ref this.txMenuカーソル ); - TextureFactory.tテクスチャの解放( ref this.tx説明文パネル ); + TextureFactory.tテクスチャの解放(ref this.tx背景); + TextureFactory.tテクスチャの解放(ref this.tx上部パネル); + TextureFactory.tテクスチャの解放(ref this.tx下部パネル); + TextureFactory.tテクスチャの解放(ref this.txMenuカーソル); + TextureFactory.tテクスチャの解放(ref this.tx説明文パネル); prvFont.Dispose(); - for ( int i = 0; i < txMenuItemLeft.GetLength( 0 ); i++ ) + for (int i = 0; i < txMenuItemLeft.GetLength(0); i++) { - txMenuItemLeft[ i, 0 ].Dispose(); - txMenuItemLeft[ i, 0 ] = null; - txMenuItemLeft[ i, 1 ].Dispose(); - txMenuItemLeft[ i, 1 ] = null; + txMenuItemLeft[i, 0].Dispose(); + txMenuItemLeft[i, 0] = null; + txMenuItemLeft[i, 1].Dispose(); + txMenuItemLeft[i, 1] = null; } txMenuItemLeft = null; base.OnManagedリソースの解放(); @@ -167,10 +167,10 @@ namespace DTXMania } public override int On進行描画() { - if( base.b活性化してない ) + if (base.b活性化してない) return 0; - if( base.b初めての進行描画 ) + if (base.b初めての進行描画) { base.eフェーズID = CStage.Eフェーズ.共通_フェードイン; this.actFIFO.tフェードイン開始(); @@ -181,30 +181,30 @@ namespace DTXMania #region [ 背景 ] //--------------------- - if( this.tx背景 != null ) - this.tx背景.t2D描画( CDTXMania.app.Device, 0, 0 ); + if (this.tx背景 != null) + this.tx背景.t2D描画(CDTXMania.app.Device, 0, 0); //--------------------- #endregion #region [ メニューカーソル ] //--------------------- - if ( this.txMenuカーソル != null ) + if (this.txMenuカーソル != null) { Rectangle rectangle; this.txMenuカーソル.n透明度 = this.bメニューにフォーカス中 ? 0xff : 0x80; - int x = (int) ( 0x37 * Scale.X ); - int y = (int) ( ( 0x61 + ( this.n現在のメニュー番号 * 0x19 ) ) * Scale.Y ); - int num3 = (int) ( 170 * Scale.X ); - this.txMenuカーソル.t2D描画( CDTXMania.app.Device, x, y, new Rectangle( 0, 0, (int) ( 0x10 * Scale.X ), (int) ( 0x20 * Scale.Y ) ) ); - this.txMenuカーソル.t2D描画( CDTXMania.app.Device, ( x + num3 ) - 0x10 * Scale.X, y, new Rectangle( (int) ( 0x10 * Scale.X ), 0, (int) ( 0x10 * Scale.X ), (int) ( 0x20 * Scale.Y ) ) ); - x += (int) ( 0x10 * Scale.X ); - for ( num3 -= (int) ( 0x20 * Scale.X ); num3 > 0; num3 -= rectangle.Width ) + int x = (int)(0x37 * Scale.X); + int y = (int)((0x61 + (this.n現在のメニュー番号 * 0x19)) * Scale.Y); + int num3 = (int)(170 * Scale.X); + this.txMenuカーソル.t2D描画(CDTXMania.app.Device, x, y, new Rectangle(0, 0, (int)(0x10 * Scale.X), (int)(0x20 * Scale.Y))); + this.txMenuカーソル.t2D描画(CDTXMania.app.Device, (x + num3) - 0x10 * Scale.X, y, new Rectangle((int)(0x10 * Scale.X), 0, (int)(0x10 * Scale.X), (int)(0x20 * Scale.Y))); + x += (int)(0x10 * Scale.X); + for (num3 -= (int)(0x20 * Scale.X); num3 > 0; num3 -= rectangle.Width) { - rectangle = new Rectangle( (int) ( 8 * Scale.X ), 0, (int) ( 0x10 * Scale.X ), (int) ( 0x20 * Scale.Y ) ); - if ( num3 < (int) ( 0x10 * Scale.X ) ) + rectangle = new Rectangle((int)(8 * Scale.X), 0, (int)(0x10 * Scale.X), (int)(0x20 * Scale.Y)); + if (num3 < (int)(0x10 * Scale.X)) { - rectangle.Width -= (int) ( 0x10 * Scale.X ) - num3; + rectangle.Width -= (int)(0x10 * Scale.X) - num3; } - this.txMenuカーソル.t2D描画( CDTXMania.app.Device, x, y, rectangle ); + this.txMenuカーソル.t2D描画(CDTXMania.app.Device, x, y, rectangle); x += rectangle.Width; } } @@ -212,17 +212,17 @@ namespace DTXMania #endregion #region [ メニュー ] //--------------------- - int menuY = (int) ( 100 * Scale.Y ) - 20; - int stepY = (int) ( 25 * Scale.Y ); - for ( int i = 0; i < txMenuItemLeft.GetLength( 0 ); i++ ) + int menuY = (int)(100 * Scale.Y) - 20; + int stepY = (int)(25 * Scale.Y); + for (int i = 0; i < txMenuItemLeft.GetLength(0); i++) { //Bitmap bmpStr = (this.n現在のメニュー番号 == i) ? // prvFont.DrawPrivateFont( strMenuItem[ i ], Color.White, Color.Black, Color.Yellow, Color.OrangeRed ) : // prvFont.DrawPrivateFont( strMenuItem[ i ], Color.White, Color.Black ); //txMenuItemLeft = TextureFactory.tテクスチャの生成( bmpStr, false ); - int flag = ( this.n現在のメニュー番号 == i ) ? 1 : 0; - int num4 = txMenuItemLeft[ i, flag ].sz画像サイズ.Width; - txMenuItemLeft[ i, flag ].t2D描画( CDTXMania.app.Device, 0x8a * Scale.X - ( num4 / 2 ), menuY ); //55 + int flag = (this.n現在のメニュー番号 == i) ? 1 : 0; + int num4 = txMenuItemLeft[i, flag].sz画像サイズ.Width; + txMenuItemLeft[i, flag].t2D描画(CDTXMania.app.Device, 0x8a * Scale.X - (num4 / 2), menuY); //55 //txMenuItem.Dispose(); menuY += stepY; } @@ -230,16 +230,16 @@ namespace DTXMania #endregion #region [ 説明文パネル ] //--------------------- - if ( this.tx説明文パネル != null ) - this.tx説明文パネル.t2D描画( CDTXMania.app.Device, 0x1d * Scale.X, 0xf8 * Scale.Y ); + if (this.tx説明文パネル != null) + this.tx説明文パネル.t2D描画(CDTXMania.app.Device, 0x1d * Scale.X, 0xf8 * Scale.Y); //--------------------- #endregion #region [ アイテム ] //--------------------- - switch( this.eItemPanelモード ) + switch (this.eItemPanelモード) { case EItemPanelモード.パッド一覧: - this.actList.t進行描画( !this.bメニューにフォーカス中 ); + this.actList.t進行描画(!this.bメニューにフォーカス中); break; case EItemPanelモード.キーコード一覧: @@ -250,14 +250,14 @@ namespace DTXMania #endregion #region [ 上部パネル ] //--------------------- - if( this.tx上部パネル != null ) - this.tx上部パネル.t2D描画( CDTXMania.app.Device, 0, 0 ); + if (this.tx上部パネル != null) + this.tx上部パネル.t2D描画(CDTXMania.app.Device, 0, 0); //--------------------- #endregion #region [ 下部パネル ] //--------------------- - if( this.tx下部パネル != null ) - this.tx下部パネル.t2D描画( CDTXMania.app.Device, 0, SampleFramework.GameWindowSize.Height - this.tx下部パネル.sz画像サイズ.Height ); + if (this.tx下部パネル != null) + this.tx下部パネル.t2D描画(CDTXMania.app.Device, 0, SampleFramework.GameWindowSize.Height - this.tx下部パネル.sz画像サイズ.Height); //--------------------- #endregion #region [ オプションパネル ] @@ -267,10 +267,10 @@ namespace DTXMania #endregion #region [ フェードイン・アウト ] //--------------------- - switch( base.eフェーズID ) + switch (base.eフェーズID) { case CStage.Eフェーズ.共通_フェードイン: - if( this.actFIFO.On進行描画() != 0 ) + if (this.actFIFO.On進行描画() != 0) { CDTXMania.app.Skin.bgmコンフィグ画面.t再生する(); base.eフェーズID = CStage.Eフェーズ.共通_通常状態; @@ -278,7 +278,7 @@ namespace DTXMania break; case CStage.Eフェーズ.共通_フェードアウト: - if( this.actFIFO.On進行描画() == 0 ) + if (this.actFIFO.On進行描画() == 0) { break; } @@ -293,25 +293,25 @@ namespace DTXMania // キー入力 #region [ キー入力 ] - if ( ( base.eフェーズID != CStage.Eフェーズ.共通_通常状態 ) + if ((base.eフェーズID != CStage.Eフェーズ.共通_通常状態) || this.actKeyAssign.bキー入力待ちの最中である - || CDTXMania.app.act現在入力を占有中のプラグイン != null ) + || CDTXMania.app.act現在入力を占有中のプラグイン != null) return 0; // 曲データの一覧取得中は、キー入力を無効化する - if ( !CDTXMania.app.EnumSongs.IsEnumerating || CDTXMania.app.actEnumSongs.bコマンドでの曲データ取得 != true ) + if (!CDTXMania.app.EnumSongs.IsEnumerating || CDTXMania.app.actEnumSongs.bコマンドでの曲データ取得 != true) { - if ( ( CDTXMania.app.Input管理.Keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.Escape ) || CDTXMania.app.Pad.b押された( E楽器パート.DRUMS, Eパッド.FT ) ) || CDTXMania.app.Pad.b押されたGB( Eパッド.FT ) ) + if ((CDTXMania.app.Input管理.Keyboard.bキーが押された((int)SlimDX.DirectInput.Key.Escape) || CDTXMania.app.Pad.b押された(E楽器パート.DRUMS, Eパッド.FT)) || CDTXMania.app.Pad.b押されたGB(Eパッド.FT)) { CDTXMania.app.Skin.sound取消音.t再生する(); - if ( !this.bメニューにフォーカス中 ) + if (!this.bメニューにフォーカス中) { - if ( this.eItemPanelモード == EItemPanelモード.キーコード一覧 ) + if (this.eItemPanelモード == EItemPanelモード.キーコード一覧) { tアサイン完了通知(); return 0; } - if ( !this.actList.bIsKeyAssignSelected && !this.actList.bIsFocusingParameter ) // #24525 2011.3.15 yyagi, #32059 2013.9.17 yyagi + if (!this.actList.bIsKeyAssignSelected && !this.actList.bIsFocusingParameter) // #24525 2011.3.15 yyagi, #32059 2013.9.17 yyagi { this.bメニューにフォーカス中 = true; } @@ -325,21 +325,21 @@ namespace DTXMania } } #region [ ← ] - else if ( CDTXMania.app.Input管理.Keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.LeftArrow ) ) // 左カーソルキー + else if (CDTXMania.app.Input管理.Keyboard.bキーが押された((int)SlimDX.DirectInput.Key.LeftArrow)) // 左カーソルキー { - if ( !this.bメニューにフォーカス中 ) + if (!this.bメニューにフォーカス中) { - if ( this.eItemPanelモード == EItemPanelモード.キーコード一覧 ) + if (this.eItemPanelモード == EItemPanelモード.キーコード一覧) { //キーコンフィグ画面中は、[←]押下に反応させない return 0; } - if ( this.actList.bIsFocusingParameter ) + if (this.actList.bIsFocusingParameter) { // パラメータを増減している最中も、[←]押下に反応させない return 0; } - if ( !this.actList.bIsKeyAssignSelected && !this.actList.bIsFocusingParameter ) // #24525 2011.3.15 yyagi, #32059 2013.9.17 yyagi + if (!this.actList.bIsKeyAssignSelected && !this.actList.bIsFocusingParameter) // #24525 2011.3.15 yyagi, #32059 2013.9.17 yyagi { this.bメニューにフォーカス中 = true; } @@ -349,17 +349,17 @@ namespace DTXMania } } #endregion - else if ( ( CDTXMania.app.Pad.b押されたDGB( Eパッド.CY ) || CDTXMania.app.Pad.b押された( E楽器パート.DRUMS, Eパッド.RD ) ) || ( CDTXMania.app.Pad.b押された( E楽器パート.DRUMS, Eパッド.LC ) || ( CDTXMania.app.ConfigIni.bEnterがキー割り当てのどこにも使用されていない && CDTXMania.app.Input管理.Keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.Return ) ) ) ) + else if ((CDTXMania.app.Pad.b押されたDGB(Eパッド.CY) || CDTXMania.app.Pad.b押された(E楽器パート.DRUMS, Eパッド.RD)) || (CDTXMania.app.Pad.b押された(E楽器パート.DRUMS, Eパッド.LC) || (CDTXMania.app.ConfigIni.bEnterがキー割り当てのどこにも使用されていない && CDTXMania.app.Input管理.Keyboard.bキーが押された((int)SlimDX.DirectInput.Key.Return)))) { #region [ EXIT ] - if ( this.n現在のメニュー番号 == 4 ) + if (this.n現在のメニュー番号 == 4) { CDTXMania.app.Skin.sound決定音.t再生する(); this.actFIFO.tフェードアウト開始(); base.eフェーズID = CStage.Eフェーズ.共通_フェードアウト; } #endregion - else if ( this.bメニューにフォーカス中 ) + else if (this.bメニューにフォーカス中) { CDTXMania.app.Skin.sound決定音.t再生する(); this.bメニューにフォーカス中 = false; @@ -367,15 +367,15 @@ namespace DTXMania } else { - switch ( this.eItemPanelモード ) + switch (this.eItemPanelモード) { case EItemPanelモード.パッド一覧: bool bIsKeyAssignSelectedBeforeHitEnter = this.actList.bIsKeyAssignSelected; // #24525 2011.3.15 yyagi this.actList.tEnter押下(); - if ( this.actList.b現在選択されている項目はReturnToMenuである ) + if (this.actList.b現在選択されている項目はReturnToMenuである) { this.t説明文パネルに現在選択されているメニューの説明を描画する(); - if ( bIsKeyAssignSelectedBeforeHitEnter == false ) // #24525 2011.3.15 yyagi + if (bIsKeyAssignSelectedBeforeHitEnter == false) // #24525 2011.3.15 yyagi { this.bメニューにフォーカス中 = true; } @@ -389,15 +389,15 @@ namespace DTXMania } } #region [ → ] - else if ( CDTXMania.app.Input管理.Keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.RightArrow ) ) // 右カーソルキー + else if (CDTXMania.app.Input管理.Keyboard.bキーが押された((int)SlimDX.DirectInput.Key.RightArrow)) // 右カーソルキー { #region [ EXIT ] - if ( this.n現在のメニュー番号 == 4 ) + if (this.n現在のメニュー番号 == 4) { // 何もしない } #endregion - else if ( this.bメニューにフォーカス中 ) + else if (this.bメニューにフォーカス中) { CDTXMania.app.Skin.sound決定音.t再生する(); this.bメニューにフォーカス中 = false; @@ -405,15 +405,15 @@ namespace DTXMania } } #endregion - this.ctキー反復用.Up.tキー反復( CDTXMania.app.Input管理.Keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.UpArrow ), new CCounter.DGキー処理( this.tカーソルを上へ移動する ) ); - this.ctキー反復用.R.tキー反復( CDTXMania.app.Pad.b押されているGB( Eパッド.HH ), new CCounter.DGキー処理( this.tカーソルを上へ移動する ) ); - if ( CDTXMania.app.Pad.b押された( E楽器パート.DRUMS, Eパッド.SD ) ) + this.ctキー反復用.Up.tキー反復(CDTXMania.app.Input管理.Keyboard.bキーが押されている((int)SlimDX.DirectInput.Key.UpArrow), new CCounter.DGキー処理(this.tカーソルを上へ移動する)); + this.ctキー反復用.R.tキー反復(CDTXMania.app.Pad.b押されているGB(Eパッド.HH), new CCounter.DGキー処理(this.tカーソルを上へ移動する)); + if (CDTXMania.app.Pad.b押された(E楽器パート.DRUMS, Eパッド.SD)) { this.tカーソルを上へ移動する(); } - this.ctキー反復用.Down.tキー反復( CDTXMania.app.Input管理.Keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.DownArrow ), new CCounter.DGキー処理( this.tカーソルを下へ移動する ) ); - this.ctキー反復用.B.tキー反復( CDTXMania.app.Pad.b押されているGB( Eパッド.BD ), new CCounter.DGキー処理( this.tカーソルを下へ移動する ) ); - if ( CDTXMania.app.Pad.b押された( E楽器パート.DRUMS, Eパッド.LT ) ) + this.ctキー反復用.Down.tキー反復(CDTXMania.app.Input管理.Keyboard.bキーが押されている((int)SlimDX.DirectInput.Key.DownArrow), new CCounter.DGキー処理(this.tカーソルを下へ移動する)); + this.ctキー反復用.B.tキー反復(CDTXMania.app.Pad.b押されているGB(Eパッド.BD), new CCounter.DGキー処理(this.tカーソルを下へ移動する)); + if (CDTXMania.app.Pad.b押された(E楽器パート.DRUMS, Eパッド.LT)) { this.tカーソルを下へ移動する(); } @@ -433,18 +433,18 @@ namespace DTXMania キーコード一覧 } - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] private struct STキー反復用カウンタ { public CCounter Up; public CCounter Down; public CCounter R; public CCounter B; - public CCounter this[ int index ] + public CCounter this[int index] { get { - switch( index ) + switch (index) { case 0: return this.Up; @@ -462,7 +462,7 @@ namespace DTXMania } set { - switch( index ) + switch (index) { case 0: this.Up = value; @@ -502,14 +502,14 @@ namespace DTXMania private CTexture tx説明文パネル; private CTexture tx背景; private CPrivateFastFont prvFont; - private CTexture[ , ] txMenuItemLeft; + private CTexture[,] txMenuItemLeft; private STDGBVALUE fDisplayLagTimeBaseMs; private void tカーソルを下へ移動する() { - if( !this.bメニューにフォーカス中 ) + if (!this.bメニューにフォーカス中) { - switch( this.eItemPanelモード ) + switch (this.eItemPanelモード) { case EItemPanelモード.パッド一覧: this.actList.t次に移動(); @@ -523,8 +523,8 @@ namespace DTXMania else { CDTXMania.app.Skin.soundカーソル移動音.t再生する(); - this.n現在のメニュー番号 = ( this.n現在のメニュー番号 + 1 ) % 5; - switch( this.n現在のメニュー番号 ) + this.n現在のメニュー番号 = (this.n現在のメニュー番号 + 1) % 5; + switch (this.n現在のメニュー番号) { case 0: this.actList.t項目リストの設定_System(); @@ -563,9 +563,9 @@ namespace DTXMania } private void tカーソルを上へ移動する() { - if( !this.bメニューにフォーカス中 ) + if (!this.bメニューにフォーカス中) { - switch( this.eItemPanelモード ) + switch (this.eItemPanelモード) { case EItemPanelモード.パッド一覧: this.actList.t前に移動(); @@ -579,8 +579,8 @@ namespace DTXMania else { CDTXMania.app.Skin.soundカーソル移動音.t再生する(); - this.n現在のメニュー番号 = ( ( this.n現在のメニュー番号 - 1 ) + 5 ) % 5; - switch( this.n現在のメニュー番号 ) + this.n現在のメニュー番号 = ((this.n現在のメニュー番号 - 1) + 5) % 5; + switch (this.n現在のメニュー番号) { case 0: this.actList.t項目リストの設定_System(); @@ -620,17 +620,17 @@ namespace DTXMania { try { - var image = new Bitmap( (int) ( 220 * 2 * Scale.X ), (int) ( 192 * 2 * Scale.Y ) ); // 説明文領域サイズの縦横 2 倍。(描画時に 0.5 倍で表示する。) - var graphics = Graphics.FromImage( image ); + var image = new Bitmap((int)(220 * 2 * Scale.X), (int)(192 * 2 * Scale.Y)); // 説明文領域サイズの縦横 2 倍。(描画時に 0.5 倍で表示する。) + var graphics = Graphics.FromImage(image); graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias; - - string[,] str = new string[ 2, 2 ]; - switch( this.n現在のメニュー番号 ) + + string[,] str = new string[2, 2]; + switch (this.n現在のメニュー番号) { case 0: - str[ 0, 0 ] = "システムに関係する項目を設定します。"; - str[ 0, 1 ] = ""; - str[ 1, 0 ] = "Settings for an overall systems."; + str[0, 0] = "システムに関係する項目を設定します。"; + str[0, 1] = ""; + str[1, 0] = "Settings for an overall systems."; break; //case 1: @@ -654,52 +654,52 @@ namespace DTXMania // str[1, 1] = ""; // break; case 1: - str[ 0, 0 ] = "ドラムの演奏に関する項目を設定します。"; - str[ 0, 1 ] = ""; - str[ 1, 0 ] = "Settings to play the drums."; - str[ 1, 1 ] = ""; + str[0, 0] = "ドラムの演奏に関する項目を設定します。"; + str[0, 1] = ""; + str[1, 0] = "Settings to play the drums."; + str[1, 1] = ""; break; case 2: - str[ 0, 0 ] = "ギターの演奏に関する項目を設定します。"; - str[ 0, 1 ] = ""; - str[ 1, 0 ] = "Settings to play the guitar."; - str[ 1, 1 ] = ""; + str[0, 0] = "ギターの演奏に関する項目を設定します。"; + str[0, 1] = ""; + str[1, 0] = "Settings to play the guitar."; + str[1, 1] = ""; break; case 3: - str[ 0, 0 ] = "ベースの演奏に関する項目を設定します。"; - str[ 0, 1 ] = ""; - str[ 1, 0 ] = "Settings to play the bass."; - str[ 1, 1 ] = ""; + str[0, 0] = "ベースの演奏に関する項目を設定します。"; + str[0, 1] = ""; + str[1, 0] = "Settings to play the bass."; + str[1, 1] = ""; break; case 4: - str[ 0, 0 ] = "設定を保存し、コンフィグ画面を終了します。"; - str[ 0, 1 ] = ""; - str[ 1, 0 ] = "Save the settings and exit from\nCONFIGURATION menu."; - str[ 1, 1 ] = ""; + str[0, 0] = "設定を保存し、コンフィグ画面を終了します。"; + str[0, 1] = ""; + str[1, 0] = "Save the settings and exit from\nCONFIGURATION menu."; + str[1, 1] = ""; break; } - int c = ( CultureInfo.CurrentCulture.TwoLetterISOLanguageName == "ja" ) ? 0 : 1; - for ( int i = 0; i < 2; i++ ) + int c = (CultureInfo.CurrentCulture.TwoLetterISOLanguageName == "ja") ? 0 : 1; + for (int i = 0; i < 2; i++) { - graphics.DrawString( str[ c, i ], this.ftフォント, Brushes.White, new PointF( 4f * Scale.X, ( i * 30 ) * Scale.Y ) ); + graphics.DrawString(str[c, i], this.ftフォント, Brushes.White, new PointF(4f * Scale.X, (i * 30) * Scale.Y)); } graphics.Dispose(); - if ( this.tx説明文パネル != null ) + if (this.tx説明文パネル != null) { this.tx説明文パネル.Dispose(); } - this.tx説明文パネル = new CTexture( CDTXMania.app.Device, image, CDTXMania.app.TextureFormat ); + this.tx説明文パネル = new CTexture(CDTXMania.app.Device, image, CDTXMania.app.TextureFormat); // this.tx説明文パネル.vc拡大縮小倍率.X = 0.5f; // this.tx説明文パネル.vc拡大縮小倍率.Y = 0.5f; image.Dispose(); } - catch ( CTextureCreateFailedException ) + catch (CTextureCreateFailedException) { - Trace.TraceError( "説明文テクスチャの作成に失敗しました。" ); + Trace.TraceError("説明文テクスチャの作成に失敗しました。"); this.tx説明文パネル = null; } } @@ -707,12 +707,12 @@ namespace DTXMania { try { - var image = new Bitmap( (int) ( 220 * Scale.X ), (int) ( 192 * Scale.Y ) ); // 説明文領域サイズの縦横 2 倍。(描画時に 0.5 倍で表示する・・・のは中止。処理速度向上のため。) - var graphics = Graphics.FromImage( image ); + var image = new Bitmap((int)(220 * Scale.X), (int)(192 * Scale.Y)); // 説明文領域サイズの縦横 2 倍。(描画時に 0.5 倍で表示する・・・のは中止。処理速度向上のため。) + var graphics = Graphics.FromImage(image); graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias; CItemBase item = this.actList.ib現在の選択項目; - if ( ( item.str説明文 != null ) && ( item.str説明文.Length > 0 ) ) + if ((item.str説明文 != null) && (item.str説明文.Length > 0)) { //int num = 0; //foreach( string str in item.str説明文.Split( new char[] { '\n' } ) ) @@ -720,21 +720,21 @@ namespace DTXMania // graphics.DrawString( str, this.ftフォント, Brushes.White, new PointF( 4f * Scale.X, (float) num * Scale.Y ) ); // num += 30; //} - graphics.DrawString( item.str説明文, this.ftフォント, Brushes.White, new RectangleF( 4f * Scale.X, (float) 0 * Scale.Y, 630, 430 ) ); + graphics.DrawString(item.str説明文, this.ftフォント, Brushes.White, new RectangleF(4f * Scale.X, (float)0 * Scale.Y, 630, 430)); } graphics.Dispose(); - if( this.tx説明文パネル != null ) + if (this.tx説明文パネル != null) { this.tx説明文パネル.Dispose(); } - this.tx説明文パネル = new CTexture( CDTXMania.app.Device, image, CDTXMania.app.TextureFormat ); + this.tx説明文パネル = new CTexture(CDTXMania.app.Device, image, CDTXMania.app.TextureFormat); //this.tx説明文パネル.vc拡大縮小倍率.X = 0.5f; //this.tx説明文パネル.vc拡大縮小倍率.Y = 0.5f; image.Dispose(); } - catch( CTextureCreateFailedException ) + catch (CTextureCreateFailedException) { - Trace.TraceError( "説明文パネルテクスチャの作成に失敗しました。" ); + Trace.TraceError("説明文パネルテクスチャの作成に失敗しました。"); this.tx説明文パネル = null; } } diff --git a/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectArtistComment.cs b/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectArtistComment.cs index 70a6737e..08aef37e 100644 --- a/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectArtistComment.cs +++ b/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectArtistComment.cs @@ -18,16 +18,16 @@ namespace DTXMania public void t選択曲が変更された() { Cスコア cスコア = CDTXMania.app.stage選曲.r現在選択中のスコア; - if( cスコア != null ) + if (cスコア != null) { - Bitmap image = new Bitmap( 1, 1 ); - TextureFactory.tテクスチャの解放( ref this.txArtist ); + Bitmap image = new Bitmap(1, 1); + TextureFactory.tテクスチャの解放(ref this.txArtist); this.strArtist = cスコア.譜面情報.アーティスト名; - if( ( this.strArtist != null ) && ( this.strArtist.Length > 0 ) ) + if ((this.strArtist != null) && (this.strArtist.Length > 0)) { - Graphics graphics = Graphics.FromImage( image ); + Graphics graphics = Graphics.FromImage(image); graphics.PageUnit = GraphicsUnit.Pixel; - SizeF ef = graphics.MeasureString( this.strArtist, this.ft描画用フォント ); + SizeF ef = graphics.MeasureString(this.strArtist, this.ft描画用フォント); graphics.Dispose(); if (ef.Width > SampleFramework.GameWindowSize.Width) { @@ -35,85 +35,85 @@ namespace DTXMania } try { - Bitmap bitmap2 = new Bitmap( (int) Math.Ceiling( (double) ef.Width ), (int) Math.Ceiling( (double) this.ft描画用フォント.Size ) ); - graphics = Graphics.FromImage( bitmap2 ); + Bitmap bitmap2 = new Bitmap((int)Math.Ceiling((double)ef.Width), (int)Math.Ceiling((double)this.ft描画用フォント.Size)); + graphics = Graphics.FromImage(bitmap2); graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias; - graphics.DrawString( this.strArtist, this.ft描画用フォント, Brushes.White, ( float ) 0f, ( float ) 0f ); + graphics.DrawString(this.strArtist, this.ft描画用フォント, Brushes.White, (float)0f, (float)0f); graphics.Dispose(); - this.txArtist = new CTexture( CDTXMania.app.Device, bitmap2, CDTXMania.app.TextureFormat ); - this.txArtist.vc拡大縮小倍率 = new Vector3( 0.5f, 0.5f, 1f ); + this.txArtist = new CTexture(CDTXMania.app.Device, bitmap2, CDTXMania.app.TextureFormat); + this.txArtist.vc拡大縮小倍率 = new Vector3(0.5f, 0.5f, 1f); bitmap2.Dispose(); } - catch( CTextureCreateFailedException ) + catch (CTextureCreateFailedException) { - Trace.TraceError( "ARTISTテクスチャの生成に失敗しました。" ); + Trace.TraceError("ARTISTテクスチャの生成に失敗しました。"); this.txArtist = null; } } - TextureFactory.tテクスチャの解放( ref this.txComment ); + TextureFactory.tテクスチャの解放(ref this.txComment); this.strComment = cスコア.譜面情報.コメント; - if( ( this.strComment != null ) && ( this.strComment.Length > 0 ) ) + if ((this.strComment != null) && (this.strComment.Length > 0)) { - Graphics graphics2 = Graphics.FromImage( image ); + Graphics graphics2 = Graphics.FromImage(image); graphics2.PageUnit = GraphicsUnit.Pixel; - SizeF ef2 = graphics2.MeasureString( this.strComment, this.ft描画用フォント ); - Size size = new Size( (int) Math.Ceiling( (double) ef2.Width ), (int) Math.Ceiling( (double) ef2.Height ) ); + SizeF ef2 = graphics2.MeasureString(this.strComment, this.ft描画用フォント); + Size size = new Size((int)Math.Ceiling((double)ef2.Width), (int)Math.Ceiling((double)ef2.Height)); graphics2.Dispose(); this.nテクスチャの最大幅 = CDTXMania.app.Device.Capabilities.MaxTextureWidth; int maxTextureHeight = CDTXMania.app.Device.Capabilities.MaxTextureHeight; - Bitmap bitmap3 = new Bitmap( size.Width, (int) Math.Ceiling( (double) this.ft描画用フォント.Size ) ); - graphics2 = Graphics.FromImage( bitmap3 ); + Bitmap bitmap3 = new Bitmap(size.Width, (int)Math.Ceiling((double)this.ft描画用フォント.Size)); + graphics2 = Graphics.FromImage(bitmap3); graphics2.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias; - graphics2.DrawString( this.strComment, this.ft描画用フォント, Brushes.White, ( float ) 0f, ( float ) 0f ); + graphics2.DrawString(this.strComment, this.ft描画用フォント, Brushes.White, (float)0f, (float)0f); graphics2.Dispose(); this.nComment行数 = 1; this.nComment最終行の幅 = size.Width; - while( this.nComment最終行の幅 > this.nテクスチャの最大幅 ) + while (this.nComment最終行の幅 > this.nテクスチャの最大幅) { this.nComment行数++; this.nComment最終行の幅 -= this.nテクスチャの最大幅; } - while( ( this.nComment行数 * ( (int) Math.Ceiling( (double) this.ft描画用フォント.Size ) ) ) > maxTextureHeight ) + while ((this.nComment行数 * ((int)Math.Ceiling((double)this.ft描画用フォント.Size))) > maxTextureHeight) { this.nComment行数--; this.nComment最終行の幅 = this.nテクスチャの最大幅; } - Bitmap bitmap4 = new Bitmap( ( this.nComment行数 > 1 ) ? this.nテクスチャの最大幅 : this.nComment最終行の幅, this.nComment行数 * ( (int) Math.Ceiling( (double) this.ft描画用フォント.Size ) ) ); - graphics2 = Graphics.FromImage( bitmap4 ); + Bitmap bitmap4 = new Bitmap((this.nComment行数 > 1) ? this.nテクスチャの最大幅 : this.nComment最終行の幅, this.nComment行数 * ((int)Math.Ceiling((double)this.ft描画用フォント.Size))); + graphics2 = Graphics.FromImage(bitmap4); Rectangle srcRect = new Rectangle(); Rectangle destRect = new Rectangle(); - for( int i = 0; i < this.nComment行数; i++ ) + for (int i = 0; i < this.nComment行数; i++) { srcRect.X = i * this.nテクスチャの最大幅; srcRect.Y = 0; - srcRect.Width = ( ( i + 1 ) == this.nComment行数 ) ? this.nComment最終行の幅 : this.nテクスチャの最大幅; + srcRect.Width = ((i + 1) == this.nComment行数) ? this.nComment最終行の幅 : this.nテクスチャの最大幅; srcRect.Height = bitmap3.Height; destRect.X = 0; destRect.Y = i * bitmap3.Height; destRect.Width = srcRect.Width; destRect.Height = srcRect.Height; - graphics2.DrawImage( bitmap3, destRect, srcRect, GraphicsUnit.Pixel ); + graphics2.DrawImage(bitmap3, destRect, srcRect, GraphicsUnit.Pixel); } graphics2.Dispose(); try { - this.txComment = new CTexture( CDTXMania.app.Device, bitmap4, CDTXMania.app.TextureFormat ); - this.txComment.vc拡大縮小倍率 = new Vector3( 0.5f, 0.5f, 1f ); + this.txComment = new CTexture(CDTXMania.app.Device, bitmap4, CDTXMania.app.TextureFormat); + this.txComment.vc拡大縮小倍率 = new Vector3(0.5f, 0.5f, 1f); } - catch( CTextureCreateFailedException ) + catch (CTextureCreateFailedException) { - Trace.TraceError( "COMMENTテクスチャの生成に失敗しました。" ); + Trace.TraceError("COMMENTテクスチャの生成に失敗しました。"); this.txComment = null; } bitmap4.Dispose(); bitmap3.Dispose(); } image.Dispose(); - if( this.txComment != null ) + if (this.txComment != null) { this.ctComment = new CCounter( -nComment表示幅, - (int) ( ( ( ( this.nComment行数 - 1 ) * this.nテクスチャの最大幅 ) + this.nComment最終行の幅 ) * this.txComment.vc拡大縮小倍率.X ), + (int)((((this.nComment行数 - 1) * this.nテクスチャの最大幅) + this.nComment最終行の幅) * this.txComment.vc拡大縮小倍率.X), unchecked((int)(10 * 2 / Scale.X)), CDTXMania.app.Timer ); @@ -126,7 +126,7 @@ namespace DTXMania public override void On活性化() { - this.ft描画用フォント = new Font( "MS PGothic", 26f * Scale.Y, GraphicsUnit.Pixel ); + this.ft描画用フォント = new Font("MS PGothic", 26f * Scale.Y, GraphicsUnit.Pixel); this.txArtist = null; this.txComment = null; this.strArtist = ""; @@ -139,9 +139,9 @@ namespace DTXMania } public override void On非活性化() { - TextureFactory.tテクスチャの解放( ref this.txArtist ); - TextureFactory.tテクスチャの解放( ref this.txComment ); - if( this.ft描画用フォント != null ) + TextureFactory.tテクスチャの解放(ref this.txArtist); + TextureFactory.tテクスチャの解放(ref this.txComment); + if (this.ft描画用フォント != null) { this.ft描画用フォント.Dispose(); this.ft描画用フォント = null; @@ -151,7 +151,7 @@ namespace DTXMania } public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { this.t選択曲が変更された(); base.OnManagedリソースの作成(); @@ -159,54 +159,54 @@ namespace DTXMania } public override void OnManagedリソースの解放() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.txArtist ); - TextureFactory.tテクスチャの解放( ref this.txComment ); + TextureFactory.tテクスチャの解放(ref this.txArtist); + TextureFactory.tテクスチャの解放(ref this.txComment); base.OnManagedリソースの解放(); } } public override int On進行描画() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - if( this.ctComment.b進行中 ) + if (this.ctComment.b進行中) { this.ctComment.t進行Loop(); } - if( this.txArtist != null ) + if (this.txArtist != null) { - int x = (int)(SampleFramework.GameWindowSize.Width - (6 + 12) * Scale.X) - ( (int) ( this.txArtist.szテクスチャサイズ.Width * this.txArtist.vc拡大縮小倍率.X ) ); // #27648 2012.3.14 yyagi: -12 for scrollbar + int x = (int)(SampleFramework.GameWindowSize.Width - (6 + 12) * Scale.X) - ((int)(this.txArtist.szテクスチャサイズ.Width * this.txArtist.vc拡大縮小倍率.X)); // #27648 2012.3.14 yyagi: -12 for scrollbar int y = (int)(231 * Scale.Y); - this.txArtist.t2D描画( CDTXMania.app.Device, x, y ); + this.txArtist.t2D描画(CDTXMania.app.Device, x, y); } - if ( ( this.txComment != null ) && ( ( this.ctComment.n現在の値 + nComment表示幅 ) >= 0 ) ) + if ((this.txComment != null) && ((this.ctComment.n現在の値 + nComment表示幅) >= 0)) { int num3 = (int)(0xf8 * Scale.X); int num4 = (int)(0xf5 * Scale.Y); - Rectangle rectangle = new Rectangle( this.ctComment.n現在の値, 0, nComment表示幅, (int) this.ft描画用フォント.Size ); - if( rectangle.X < 0 ) + Rectangle rectangle = new Rectangle(this.ctComment.n現在の値, 0, nComment表示幅, (int)this.ft描画用フォント.Size); + if (rectangle.X < 0) { num3 += -rectangle.X; rectangle.Width -= -rectangle.X; rectangle.X = 0; } - int num5 = ( (int) ( ( (float) rectangle.X ) / this.txComment.vc拡大縮小倍率.X ) ) / this.nテクスチャの最大幅; + int num5 = ((int)(((float)rectangle.X) / this.txComment.vc拡大縮小倍率.X)) / this.nテクスチャの最大幅; Rectangle rectangle2 = new Rectangle(); - while( rectangle.Width > 0 ) + while (rectangle.Width > 0) { - rectangle2.X = ( (int) ( ( (float) rectangle.X ) / this.txComment.vc拡大縮小倍率.X ) ) % this.nテクスチャの最大幅; - rectangle2.Y = num5 * ( (int) this.ft描画用フォント.Size ); - int num6 = ( ( num5 + 1 ) == this.nComment行数 ) ? this.nComment最終行の幅 : this.nテクスチャの最大幅; + rectangle2.X = ((int)(((float)rectangle.X) / this.txComment.vc拡大縮小倍率.X)) % this.nテクスチャの最大幅; + rectangle2.Y = num5 * ((int)this.ft描画用フォント.Size); + int num6 = ((num5 + 1) == this.nComment行数) ? this.nComment最終行の幅 : this.nテクスチャの最大幅; int num7 = num6 - rectangle2.X; rectangle2.Width = num7; - rectangle2.Height = (int) this.ft描画用フォント.Size; - this.txComment.t2D描画( CDTXMania.app.Device, num3, num4, rectangle2 ); - if( ++num5 == this.nComment行数 ) + rectangle2.Height = (int)this.ft描画用フォント.Size; + this.txComment.t2D描画(CDTXMania.app.Device, num3, num4, rectangle2); + if (++num5 == this.nComment行数) { break; } - int num8 = (int) ( rectangle2.Width * this.txComment.vc拡大縮小倍率.X ); + int num8 = (int)(rectangle2.Width * this.txComment.vc拡大縮小倍率.X); rectangle.X += num8; rectangle.Width -= num8; num3 += num8; diff --git a/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectInformation.cs b/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectInformation.cs index 9179517b..8e1b5909 100644 --- a/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectInformation.cs +++ b/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectInformation.cs @@ -34,59 +34,59 @@ namespace DTXMania } public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { string[,] infofiles = { // #25381 2011.6.4 yyagi { @"Graphics\ScreenSelect information 1.png", @"Graphics\ScreenSelect information 2.png" }, { @"Graphics\ScreenSelect information 1e.png", @"Graphics\ScreenSelect information 2e.png" } }; - int c = ( CultureInfo.CurrentCulture.TwoLetterISOLanguageName == "ja" ) ? 0 : 1; - this.txInfo[ 0 ] = TextureFactory.tテクスチャの生成( CSkin.Path( infofiles[ c, 0 ] ), false ); - this.txInfo[ 1 ] = TextureFactory.tテクスチャの生成( CSkin.Path( infofiles[ c, 1 ] ), false ); + int c = (CultureInfo.CurrentCulture.TwoLetterISOLanguageName == "ja") ? 0 : 1; + this.txInfo[0] = TextureFactory.tテクスチャの生成(CSkin.Path(infofiles[c, 0]), false); + this.txInfo[1] = TextureFactory.tテクスチャの生成(CSkin.Path(infofiles[c, 1]), false); base.OnManagedリソースの作成(); } } public override void OnManagedリソースの解放() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.txInfo[ 0 ] ); - TextureFactory.tテクスチャの解放( ref this.txInfo[ 1 ] ); + TextureFactory.tテクスチャの解放(ref this.txInfo[0]); + TextureFactory.tテクスチャの解放(ref this.txInfo[1]); base.OnManagedリソースの解放(); } } public override int On進行描画() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - if( base.b初めての進行描画 ) + if (base.b初めての進行描画) { - this.ctスクロール用 = new CCounter( 0, 6000, 1, CDTXMania.app.Timer ); + this.ctスクロール用 = new CCounter(0, 6000, 1, CDTXMania.app.Timer); base.b初めての進行描画 = false; } this.ctスクロール用.t進行(); - if( this.ctスクロール用.b終了値に達した ) + if (this.ctスクロール用.b終了値に達した) { this.n画像Index上 = this.n画像Index下; - this.n画像Index下 = ( this.n画像Index下 + 1 ) % stInfo.GetLength( 0 ); //8; + this.n画像Index下 = (this.n画像Index下 + 1) % stInfo.GetLength(0); //8; this.ctスクロール用.n現在の値 = 0; } int n現在の値 = this.ctスクロール用.n現在の値; - if( n現在の値 <= 250 ) + if (n現在の値 <= 250) { - double n現在の割合 = ( (double) n現在の値 ) / 250.0; - if( this.n画像Index上 >= 0 ) + double n現在の割合 = ((double)n現在の値) / 250.0; + if (this.n画像Index上 >= 0) { - STINFO stinfo = this.stInfo[ this.n画像Index上 ]; + STINFO stinfo = this.stInfo[this.n画像Index上]; Rectangle rectangle = new Rectangle( stinfo.pt左上座標.X, - stinfo.pt左上座標.Y + ( (int) ( (int)(45.0 * Scale.Y) * n現在の割合 ) ), + stinfo.pt左上座標.Y + ((int)((int)(45.0 * Scale.Y) * n現在の割合)), (int)(221 * Scale.X), Convert.ToInt32((int)(45.0 * Scale.Y) * (1.0 - n現在の割合)) ); - if( this.txInfo[ stinfo.nTexture番号 ] != null ) + if (this.txInfo[stinfo.nTexture番号] != null) { - this.txInfo[ stinfo.nTexture番号 ].t2D描画( + this.txInfo[stinfo.nTexture番号].t2D描画( CDTXMania.app.Device, 115 * Scale.X, 6 * Scale.Y, @@ -94,21 +94,21 @@ namespace DTXMania ); } } - if( this.n画像Index下 >= 0 ) + if (this.n画像Index下 >= 0) { - STINFO stinfo = this.stInfo[ this.n画像Index下 ]; + STINFO stinfo = this.stInfo[this.n画像Index下]; Rectangle rectangle = new Rectangle( stinfo.pt左上座標.X, stinfo.pt左上座標.Y, (int)(221 * Scale.X), - (int) ( 45.0 * Scale.Y * n現在の割合 ) + (int)(45.0 * Scale.Y * n現在の割合) ); - if( this.txInfo[ stinfo.nTexture番号 ] != null ) + if (this.txInfo[stinfo.nTexture番号] != null) { - this.txInfo[ stinfo.nTexture番号 ].t2D描画( + this.txInfo[stinfo.nTexture番号].t2D描画( CDTXMania.app.Device, 115 * Scale.X, - 6 * Scale.Y + ( (int) ( 45.0 * Scale.Y * ( 1.0 - n現在の割合 ) ) ), + 6 * Scale.Y + ((int)(45.0 * Scale.Y * (1.0 - n現在の割合))), rectangle ); } @@ -116,16 +116,16 @@ namespace DTXMania } else { - STINFO stinfo = this.stInfo[ this.n画像Index下 ]; + STINFO stinfo = this.stInfo[this.n画像Index下]; Rectangle rectangle = new Rectangle( stinfo.pt左上座標.X, stinfo.pt左上座標.Y, (int)(221 * Scale.X), (int)(45 * Scale.Y) ); - if( this.txInfo[ stinfo.nTexture番号 ] != null ) + if (this.txInfo[stinfo.nTexture番号] != null) { - this.txInfo[ stinfo.nTexture番号 ].t2D描画( + this.txInfo[stinfo.nTexture番号].t2D描画( CDTXMania.app.Device, 115 * Scale.X, 6 * Scale.Y, @@ -142,15 +142,15 @@ namespace DTXMania #region [ private ] //----------------- - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] private struct STINFO { public int nTexture番号; public Point pt左上座標; - public STINFO( int nTexture番号, int x, int y ) + public STINFO(int nTexture番号, int x, int y) { this.nTexture番号 = nTexture番号; - this.pt左上座標 = new Point( x, y ); + this.pt左上座標 = new Point(x, y); } } @@ -168,7 +168,7 @@ namespace DTXMania new STINFO( 1, 0, (int)(97 * Scale.Y) ), new STINFO( 1, 0, (int)(147 * Scale.Y) ) }; - private CTexture[] txInfo = new CTexture[ 2 ]; + private CTexture[] txInfo = new CTexture[2]; //----------------- #endregion } diff --git a/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectPopupMenu.cs b/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectPopupMenu.cs index a9cc6b26..47613900 100644 --- a/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectPopupMenu.cs +++ b/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectPopupMenu.cs @@ -16,14 +16,14 @@ namespace DTXMania // プロパティ - + public int GetIndex(int pos) { - return lciMenuItems[ pos ].cItem.GetIndex(); + return lciMenuItems[pos].cItem.GetIndex(); } - public object GetObj現在値( int pos ) + public object GetObj現在値(int pos) { - return lciMenuItems[ pos ].cItem.obj現在値(); + return lciMenuItems[pos].cItem.obj現在値(); } public bool bGotoDetailConfig { @@ -39,7 +39,7 @@ namespace DTXMania get; private set; } - public virtual void tActivatePopupMenu( E楽器パート einst ) + public virtual void tActivatePopupMenu(E楽器パート einst) { nItemSelecting = -1; // #24757 2011.4.1 yyagi: Clear sorting status in each stating menu. this.eInst = einst; @@ -53,29 +53,29 @@ namespace DTXMania } - public void Initialize( List menulist, bool showAllItems, string title ) + public void Initialize(List menulist, bool showAllItems, string title) { - Initialize( menulist, showAllItems, title, 0 ); + Initialize(menulist, showAllItems, title, 0); } - public void Initialize( List menulist, bool showAllItems, string title, int defaultPos ) + public void Initialize(List menulist, bool showAllItems, string title, int defaultPos) { - prvFont = new CPrivateFastFont( CSkin.Path( @"Graphics\fonts\mplus-1p-heavy.ttf" ), (int) ( 18 * Scale.Y ) ); + prvFont = new CPrivateFastFont(CSkin.Path(@"Graphics\fonts\mplus-1p-heavy.ttf"), (int)(18 * Scale.Y)); stqMenuTitle = new stQuickMenuItem(); stqMenuTitle.cItem = new CItemBase(); stqMenuTitle.cItem.str項目名 = title; - stqMenuTitle.txName = TextureFactory.tテクスチャの生成( prvFont.DrawPrivateFont( title, Color.White, Color.Black ), false ); + stqMenuTitle.txName = TextureFactory.tテクスチャの生成(prvFont.DrawPrivateFont(title, Color.White, Color.Black), false); stqMenuTitle.rectName = prvFont.RectStrings; - lciMenuItems = new stQuickMenuItem[ menulist.Count ]; - for (int i = 0; i < menulist.Count; i++ ) + lciMenuItems = new stQuickMenuItem[menulist.Count]; + for (int i = 0; i < menulist.Count; i++) { stQuickMenuItem stqm = new stQuickMenuItem(); - stqm.cItem = menulist[ i ]; - stqm.txName = TextureFactory.tテクスチャの生成( prvFont.DrawPrivateFont( menulist[ i ].str項目名, Color.White, Color.Black ), false ); + stqm.cItem = menulist[i]; + stqm.txName = TextureFactory.tテクスチャの生成(prvFont.DrawPrivateFont(menulist[i].str項目名, Color.White, Color.Black), false); stqm.rectName = prvFont.RectStrings; - lciMenuItems[ i ] = stqm; + lciMenuItems[i] = stqm; } bShowAllItems = showAllItems; @@ -85,23 +85,23 @@ namespace DTXMania public void tEnter押下() { - if ( this.bキー入力待ち ) + if (this.bキー入力待ち) { CDTXMania.app.Skin.sound決定音.t再生する(); - if ( this.n現在の選択行 != lciMenuItems.Length - 1 ) + if (this.n現在の選択行 != lciMenuItems.Length - 1) { - if ( lciMenuItems[ n現在の選択行 ].cItem.e種別 == CItemBase.E種別.リスト || - lciMenuItems[ n現在の選択行 ].cItem.e種別 == CItemBase.E種別.ONorOFFトグル || - lciMenuItems[ n現在の選択行 ].cItem.e種別 == CItemBase.E種別.ONorOFFor不定スリーステート ) + if (lciMenuItems[n現在の選択行].cItem.e種別 == CItemBase.E種別.リスト || + lciMenuItems[n現在の選択行].cItem.e種別 == CItemBase.E種別.ONorOFFトグル || + lciMenuItems[n現在の選択行].cItem.e種別 == CItemBase.E種別.ONorOFFor不定スリーステート) { - lciMenuItems[ n現在の選択行 ].cItem.t項目値を次へ移動(); + lciMenuItems[n現在の選択行].cItem.t項目値を次へ移動(); } - else if ( lciMenuItems[ n現在の選択行 ].cItem.e種別 == CItemBase.E種別.整数 ) + else if (lciMenuItems[n現在の選択行].cItem.e種別 == CItemBase.E種別.整数) { bIsSelectingIntItem = !bIsSelectingIntItem; // 選択状態/選択解除状態を反転する } - else if ( lciMenuItems[ n現在の選択行 ].cItem.e種別 == CItemBase.E種別.切替リスト ) + else if (lciMenuItems[n現在の選択行].cItem.e種別 == CItemBase.E種別.切替リスト) { // 特に何もしない } @@ -111,7 +111,7 @@ namespace DTXMania } nItemSelecting = n現在の選択行; } - tEnter押下Main( (int) lciMenuItems[ n現在の選択行 ].cItem.GetIndex() ); + tEnter押下Main((int)lciMenuItems[n現在の選択行].cItem.GetIndex()); this.bキー入力待ち = true; } @@ -121,7 +121,7 @@ namespace DTXMania /// Decide押下時の処理を、継承先で記述する。 /// /// CItemBaseの現在の設定値のindex - public virtual void tEnter押下Main( int val ) + public virtual void tEnter押下Main(int val) { } /// @@ -140,16 +140,16 @@ namespace DTXMania public void t次に移動() { - if ( this.bキー入力待ち ) + if (this.bキー入力待ち) { CDTXMania.app.Skin.soundカーソル移動音.t再生する(); - if ( bIsSelectingIntItem ) + if (bIsSelectingIntItem) { - lciMenuItems[ n現在の選択行 ].cItem.t項目値を前へ移動(); // 項目移動と数値上下は方向が逆になるので注意 + lciMenuItems[n現在の選択行].cItem.t項目値を前へ移動(); // 項目移動と数値上下は方向が逆になるので注意 } else { - if ( ++this.n現在の選択行 >= this.lciMenuItems.Length ) + if (++this.n現在の選択行 >= this.lciMenuItems.Length) { this.n現在の選択行 = 0; } @@ -158,16 +158,16 @@ namespace DTXMania } public void t前に移動() { - if ( this.bキー入力待ち ) + if (this.bキー入力待ち) { CDTXMania.app.Skin.soundカーソル移動音.t再生する(); - if ( bIsSelectingIntItem ) + if (bIsSelectingIntItem) { - lciMenuItems[ n現在の選択行 ].cItem.t項目値を次へ移動(); // 項目移動と数値上下は方向が逆になるので注意 + lciMenuItems[n現在の選択行].cItem.t項目値を次へ移動(); // 項目移動と数値上下は方向が逆になるので注意 } else { - if ( --this.n現在の選択行 < 0 ) + if (--this.n現在の選択行 < 0) { this.n現在の選択行 = this.lciMenuItems.Length - 1; } @@ -179,35 +179,35 @@ namespace DTXMania public override void On活性化() { - // this.n現在の選択行 = 0; + // this.n現在の選択行 = 0; this.bキー入力待ち = true; - for ( int i = 0; i < 4; i++ ) + for (int i = 0; i < 4; i++) { - this.ctキー反復用[ i ] = new CCounter( 0, 0, 0, CDTXMania.app.Timer ); + this.ctキー反復用[i] = new CCounter(0, 0, 0, CDTXMania.app.Timer); } base.b活性化してない = true; this.bIsActivePopupMenu = false; -// this.font = new CActDFPFont(); -// base.list子Activities.Add( this.font ); + // this.font = new CActDFPFont(); + // base.list子Activities.Add( this.font ); nItemSelecting = -1; - + base.On活性化(); } public override void On非活性化() { - if ( !base.b活性化してない ) + if (!base.b活性化してない) { -// base.list子Activities.Remove( this.font ); -// this.font.On非活性化(); -// this.font = null; + // base.list子Activities.Remove( this.font ); + // this.font.On非活性化(); + // this.font = null; - TextureFactory.tテクスチャの解放( ref this.txCursor ); - TextureFactory.tテクスチャの解放( ref this.txPopupMenuBackground ); - for ( int i = 0; i < 4; i++ ) + TextureFactory.tテクスチャの解放(ref this.txCursor); + TextureFactory.tテクスチャの解放(ref this.txPopupMenuBackground); + for (int i = 0; i < 4; i++) { - this.ctキー反復用[ i ] = null; + this.ctキー反復用[i] = null; } // 解放はGCに任せてみる @@ -228,45 +228,45 @@ namespace DTXMania } public override void OnManagedリソースの作成() { - if ( !base.b活性化してない ) + if (!base.b活性化してない) { - string pathCursor = CSkin.Path( @"Graphics\ScreenConfig menu cursor.png" );; - string pathPopupMenuBackground = CSkin.Path( @"Graphics\ScreenSelect sort menu background.png" ); - if ( File.Exists ( pathCursor ) ) + string pathCursor = CSkin.Path(@"Graphics\ScreenConfig menu cursor.png"); ; + string pathPopupMenuBackground = CSkin.Path(@"Graphics\ScreenSelect sort menu background.png"); + if (File.Exists(pathCursor)) { - this.txCursor = TextureFactory.tテクスチャの生成( pathCursor, false ); + this.txCursor = TextureFactory.tテクスチャの生成(pathCursor, false); } - if ( File.Exists( pathPopupMenuBackground ) ) + if (File.Exists(pathPopupMenuBackground)) { - this.txPopupMenuBackground = TextureFactory.tテクスチャの生成( pathPopupMenuBackground, false ); + this.txPopupMenuBackground = TextureFactory.tテクスチャの生成(pathPopupMenuBackground, false); } base.OnManagedリソースの作成(); } } public override void OnManagedリソースの解放() { - if ( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.txPopupMenuBackground ); - TextureFactory.tテクスチャの解放( ref this.txCursor ); + TextureFactory.tテクスチャの解放(ref this.txPopupMenuBackground); + TextureFactory.tテクスチャの解放(ref this.txCursor); } base.OnManagedリソースの解放(); } public override int On進行描画() { - throw new InvalidOperationException( "t進行描画(bool)のほうを使用してください。" ); + throw new InvalidOperationException("t進行描画(bool)のほうを使用してください。"); } public int t進行描画() { - if ( !base.b活性化してない && this.bIsActivePopupMenu ) + if (!base.b活性化してない && this.bIsActivePopupMenu) { - if ( this.bキー入力待ち ) + if (this.bキー入力待ち) { #region [ Shift-F1: CONFIG画面 ] - if ( ( CDTXMania.app.Input管理.Keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.RightShift ) || CDTXMania.app.Input管理.Keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.LeftShift ) ) && - CDTXMania.app.Input管理.Keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.F1 ) ) + if ((CDTXMania.app.Input管理.Keyboard.bキーが押されている((int)SlimDX.DirectInput.Key.RightShift) || CDTXMania.app.Input管理.Keyboard.bキーが押されている((int)SlimDX.DirectInput.Key.LeftShift)) && + CDTXMania.app.Input管理.Keyboard.bキーが押された((int)SlimDX.DirectInput.Key.F1)) { // [SHIFT] + [F1] CONFIG CDTXMania.app.Skin.sound取消音.t再生する(); tCancel(); @@ -274,9 +274,9 @@ namespace DTXMania } #endregion #region [ キー入力: キャンセル ] - else if ( CDTXMania.app.Input管理.Keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.Escape ) - || CDTXMania.app.Pad.b押された( E楽器パート.DRUMS, Eパッド.FT ) - || CDTXMania.app.Pad.b押されたGB( Eパッド.Cancel ) ) + else if (CDTXMania.app.Input管理.Keyboard.bキーが押された((int)SlimDX.DirectInput.Key.Escape) + || CDTXMania.app.Pad.b押された(E楽器パート.DRUMS, Eパッド.FT) + || CDTXMania.app.Pad.b押されたGB(Eパッド.Cancel)) { // キャンセル CDTXMania.app.Skin.sound取消音.t再生する(); tCancel(); @@ -287,115 +287,115 @@ namespace DTXMania #region [ キー入力: 決定 ] // E楽器パート eInst = E楽器パート.UNKNOWN; ESortAction eAction = ESortAction.END; - if ( CDTXMania.app.Pad.b押された( E楽器パート.GUITAR, Eパッド.Decide ) ) + if (CDTXMania.app.Pad.b押された(E楽器パート.GUITAR, Eパッド.Decide)) { eInst = E楽器パート.GUITAR; eAction = ESortAction.Decide; } - else if ( CDTXMania.app.Pad.b押された( E楽器パート.BASS, Eパッド.Decide ) ) + else if (CDTXMania.app.Pad.b押された(E楽器パート.BASS, Eパッド.Decide)) { eInst = E楽器パート.BASS; eAction = ESortAction.Decide; } else if ( - CDTXMania.app.Pad.b押された( E楽器パート.DRUMS, Eパッド.Decide ) // #24756 2011.4.1 yyagi: Add condition "Drum-Decide" to enable CY in Sort Menu. - || CDTXMania.app.Pad.b押された( E楽器パート.DRUMS, Eパッド.RD ) - || CDTXMania.app.Pad.b押された( E楽器パート.DRUMS, Eパッド.LC ) - || ( CDTXMania.app.ConfigIni.bEnterがキー割り当てのどこにも使用されていない && CDTXMania.app.Input管理.Keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.Return ) ) ) + CDTXMania.app.Pad.b押された(E楽器パート.DRUMS, Eパッド.Decide) // #24756 2011.4.1 yyagi: Add condition "Drum-Decide" to enable CY in Sort Menu. + || CDTXMania.app.Pad.b押された(E楽器パート.DRUMS, Eパッド.RD) + || CDTXMania.app.Pad.b押された(E楽器パート.DRUMS, Eパッド.LC) + || (CDTXMania.app.ConfigIni.bEnterがキー割り当てのどこにも使用されていない && CDTXMania.app.Input管理.Keyboard.bキーが押された((int)SlimDX.DirectInput.Key.Return))) { eInst = E楽器パート.DRUMS; eAction = ESortAction.Decide; } - if ( eAction == ESortAction.Decide ) // 決定 + if (eAction == ESortAction.Decide) // 決定 { this.tEnter押下(); } #endregion #region [ キー入力: 前に移動 ] - this.ctキー反復用.Up.tキー反復( CDTXMania.app.Input管理.Keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.UpArrow ), new CCounter.DGキー処理( this.t前に移動 ) ); - this.ctキー反復用.R.tキー反復( CDTXMania.app.Pad.b押されているGB( Eパッド.R ), new CCounter.DGキー処理( this.t前に移動 ) ); - if ( CDTXMania.app.Pad.b押された( E楽器パート.DRUMS, Eパッド.SD ) ) + this.ctキー反復用.Up.tキー反復(CDTXMania.app.Input管理.Keyboard.bキーが押されている((int)SlimDX.DirectInput.Key.UpArrow), new CCounter.DGキー処理(this.t前に移動)); + this.ctキー反復用.R.tキー反復(CDTXMania.app.Pad.b押されているGB(Eパッド.R), new CCounter.DGキー処理(this.t前に移動)); + if (CDTXMania.app.Pad.b押された(E楽器パート.DRUMS, Eパッド.SD)) { this.t前に移動(); } #endregion #region [ キー入力: 次に移動 ] - this.ctキー反復用.Down.tキー反復( CDTXMania.app.Input管理.Keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.DownArrow ), new CCounter.DGキー処理( this.t次に移動 ) ); - this.ctキー反復用.B.tキー反復( CDTXMania.app.Pad.b押されているGB( Eパッド.B ), new CCounter.DGキー処理( this.t次に移動 ) ); - if ( CDTXMania.app.Pad.b押された( E楽器パート.DRUMS, Eパッド.LT ) ) + this.ctキー反復用.Down.tキー反復(CDTXMania.app.Input管理.Keyboard.bキーが押されている((int)SlimDX.DirectInput.Key.DownArrow), new CCounter.DGキー処理(this.t次に移動)); + this.ctキー反復用.B.tキー反復(CDTXMania.app.Pad.b押されているGB(Eパッド.B), new CCounter.DGキー処理(this.t次に移動)); + if (CDTXMania.app.Pad.b押された(E楽器パート.DRUMS, Eパッド.LT)) { this.t次に移動(); } #endregion } #region [ ポップアップメニュー 背景描画 ] - if ( this.txPopupMenuBackground != null ) + if (this.txPopupMenuBackground != null) { - this.txPopupMenuBackground.t2D描画( CDTXMania.app.Device, 160 * Scale.X, 10 * Scale.Y ); + this.txPopupMenuBackground.t2D描画(CDTXMania.app.Device, 160 * Scale.X, 10 * Scale.Y); } #endregion #region [ ソートメニュータイトル描画 ] - int x = (int) ( 240 * Scale.X ), y = (int) ( 16 * Scale.Y ); - stqMenuTitle.txName.t2D描画( CDTXMania.app.Device, x, y ); //font.t文字列描画( x, y, strMenuTitle, false, 1.0f ); + int x = (int)(240 * Scale.X), y = (int)(16 * Scale.Y); + stqMenuTitle.txName.t2D描画(CDTXMania.app.Device, x, y); //font.t文字列描画( x, y, strMenuTitle, false, 1.0f ); #endregion #region [ カーソル描画 ] - if ( this.txCursor != null ) + if (this.txCursor != null) { int height = stqMenuTitle.rectName.Height; int curX = (int)(180 * Scale.X); - int curY = (int)(16 * Scale.Y) + ( height / 4 - 6) + ( height * ( this.n現在の選択行 + 1 ) ); - this.txCursor.t2D描画( CDTXMania.app.Device, curX, curY, new Rectangle( 0, 0, (int)(16 * Scale.X), (int)(32 * Scale.Y) ) ); + int curY = (int)(16 * Scale.Y) + (height / 4 - 6) + (height * (this.n現在の選択行 + 1)); + this.txCursor.t2D描画(CDTXMania.app.Device, curX, curY, new Rectangle(0, 0, (int)(16 * Scale.X), (int)(32 * Scale.Y))); curX += (int)(0x10 * Scale.X); - Rectangle rectangle = new Rectangle( (int)(8 * Scale.X), 0, (int)(0x10 * Scale.X), (int)(0x20 * Scale.Y) ); - for ( int j = 0; j < 16 + 3; j++ ) + Rectangle rectangle = new Rectangle((int)(8 * Scale.X), 0, (int)(0x10 * Scale.X), (int)(0x20 * Scale.Y)); + for (int j = 0; j < 16 + 3; j++) { - this.txCursor.t2D描画( CDTXMania.app.Device, curX, curY, rectangle ); + this.txCursor.t2D描画(CDTXMania.app.Device, curX, curY, rectangle); curX += (int)(16 * Scale.Y); } - this.txCursor.t2D描画( CDTXMania.app.Device, curX, curY, new Rectangle( (int)(0x10 * Scale.X), 0, (int)(16 * Scale.X), (int)(32 * Scale.Y) ) ); + this.txCursor.t2D描画(CDTXMania.app.Device, curX, curY, new Rectangle((int)(0x10 * Scale.X), 0, (int)(16 * Scale.X), (int)(32 * Scale.Y))); } #endregion #region [ ソート候補文字列描画 ] - for ( int i = 0; i < lciMenuItems.Length; i++ ) + for (int i = 0; i < lciMenuItems.Length; i++) { - bool bItemBold = ( i == nItemSelecting && !bShowAllItems ) ? true : false; + bool bItemBold = (i == nItemSelecting && !bShowAllItems) ? true : false; //font.t文字列描画( 190, 80 + i * 32, lciMenuItems[i].cItem.str項目名, bItemBold, 1.0f ); - if ( lciMenuItems[ i ].txName != null ) + if (lciMenuItems[i].txName != null) { - int height = lciMenuItems[ i ].rectName.Height; - lciMenuItems[ i ].txName.t2D描画( CDTXMania.app.Device, 190 * Scale.X, ( 50 * Scale.Y ) + i * height ); + int height = lciMenuItems[i].rectName.Height; + lciMenuItems[i].txName.t2D描画(CDTXMania.app.Device, 190 * Scale.X, (50 * Scale.Y) + i * height); } bool bValueBold = (bItemBold || (i == nItemSelecting && bIsSelectingIntItem)) ? true : false; - if ( bItemBold || bShowAllItems ) + if (bItemBold || bShowAllItems) { string s; - switch ( lciMenuItems[i].cItem.str項目名 ) + switch (lciMenuItems[i].cItem.str項目名) { case "PlaySpeed": { - double d = (double) ((int)lciMenuItems[ i ].cItem.obj現在値() / 20.0); - s = "x" + d.ToString( "0.000" ); + double d = (double)((int)lciMenuItems[i].cItem.obj現在値() / 20.0); + s = "x" + d.ToString("0.000"); } break; case "ScrollSpeed": { - double d = (double) ( ( ( (int) lciMenuItems[ i ].cItem.obj現在値() ) + 1 ) / 2.0 ); - s = "x" + d.ToString( "0.0" ); + double d = (double)((((int)lciMenuItems[i].cItem.obj現在値()) + 1) / 2.0); + s = "x" + d.ToString("0.0"); } break; default: - s = lciMenuItems[ i ].cItem.obj現在値().ToString(); + s = lciMenuItems[i].cItem.obj現在値().ToString(); break; } //font.t文字列描画( (int)(340 * Scale.X), (int)(80 + i * 32), s, bValueBold, 1.0f * Scale.Y); - Bitmap bmpStr = bValueBold? - prvFont.DrawPrivateFont( s, Color.White, Color.Black, Color.Yellow, Color.OrangeRed ) : - prvFont.DrawPrivateFont( s, Color.White, Color.Black ); - CTexture ctStr = TextureFactory.tテクスチャの生成( bmpStr, false ); - ctStr.t2D描画( CDTXMania.app.Device, 340 * Scale.X, ( 50 * Scale.Y ) + i * prvFont.RectStrings.Height ); - TextureFactory.tテクスチャの解放( ref ctStr ); + Bitmap bmpStr = bValueBold ? + prvFont.DrawPrivateFont(s, Color.White, Color.Black, Color.Yellow, Color.OrangeRed) : + prvFont.DrawPrivateFont(s, Color.White, Color.Black); + CTexture ctStr = TextureFactory.tテクスチャの生成(bmpStr, false); + ctStr.t2D描画(CDTXMania.app.Device, 340 * Scale.X, (50 * Scale.Y) + i * prvFont.RectStrings.Height); + TextureFactory.tテクスチャの解放(ref ctStr); } } #endregion @@ -431,19 +431,19 @@ namespace DTXMania private stQuickMenuItem stqMenuTitle; private bool bShowAllItems; private bool bIsSelectingIntItem; - - [StructLayout( LayoutKind.Sequential )] + + [StructLayout(LayoutKind.Sequential)] private struct STキー反復用カウンタ { public CCounter Up; public CCounter Down; public CCounter R; public CCounter B; - public CCounter this[ int index ] + public CCounter this[int index] { get { - switch ( index ) + switch (index) { case 0: return this.Up; @@ -461,7 +461,7 @@ namespace DTXMania } set { - switch ( index ) + switch (index) { case 0: this.Up = value; diff --git a/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectPreimageパネル.cs b/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectPreimageパネル.cs index 43f13072..b35000f9 100644 --- a/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectPreimageパネル.cs +++ b/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectPreimageパネル.cs @@ -19,7 +19,7 @@ namespace DTXMania } public void t選択曲が変更された() { - this.ct遅延表示 = new CCounter( -CDTXMania.app.ConfigIni.n曲が選択されてからプレビュー画像が表示開始されるまでのウェイトms, 100, 1, CDTXMania.app.Timer ); + this.ct遅延表示 = new CCounter(-CDTXMania.app.ConfigIni.n曲が選択されてからプレビュー画像が表示開始されるまでのウェイトms, 100, 1, CDTXMania.app.Timer); this.b新しいプレビューファイルを読み込んだ = false; } @@ -54,7 +54,7 @@ namespace DTXMania { this.ct登場アニメ用 = null; this.ct遅延表示 = null; - if( this.rAVI != null ) + if (this.rAVI != null) { this.rAVI.Dispose(); this.rAVI = null; @@ -64,13 +64,13 @@ namespace DTXMania } public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - this.txパネル本体 = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenSelect preimage panel.png" ), false ); - this.txセンサ = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenSelect sensor.png" ), false ); - this.txセンサ光 = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenSelect sensor light.png" ), false ); + this.txパネル本体 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenSelect preimage panel.png"), false); + this.txセンサ = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenSelect sensor.png"), false); + this.txセンサ光 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenSelect sensor light.png"), false); this.txプレビュー画像 = null; - this.txプレビュー画像がないときの画像 = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenSelect preimage default.png" ), false ); + this.txプレビュー画像がないときの画像 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenSelect preimage default.png"), false); //this.sfAVI画像 = Surface.CreateOffscreenPlain( CDTXMania.app.Device, 0xcc, 0x10d, CDTXMania.app.GraphicsDeviceManager.CurrentSettings.BackBufferFormat, Pool.SystemMemory ); //this.sfAVI画像 = Surface.CreateOffscreenPlain( CDTXMania.app.Device, 192, 269, CDTXMania.app.GraphicsDeviceManager.CurrentSettings.BackBufferFormat, Pool.Default ); //this.nAVI再生開始時刻 = -1; @@ -85,13 +85,13 @@ namespace DTXMania } public override void OnManagedリソースの解放() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.txパネル本体 ); - TextureFactory.tテクスチャの解放( ref this.txセンサ ); - TextureFactory.tテクスチャの解放( ref this.txセンサ光 ); - TextureFactory.tテクスチャの解放( ref this.txプレビュー画像 ); - TextureFactory.tテクスチャの解放( ref this.txプレビュー画像がないときの画像 ); + TextureFactory.tテクスチャの解放(ref this.txパネル本体); + TextureFactory.tテクスチャの解放(ref this.txセンサ); + TextureFactory.tテクスチャの解放(ref this.txセンサ光); + TextureFactory.tテクスチャの解放(ref this.txプレビュー画像); + TextureFactory.tテクスチャの解放(ref this.txプレビュー画像がないときの画像); //if( this.sfAVI画像 != null ) //{ // this.sfAVI画像.Dispose(); @@ -103,28 +103,28 @@ namespace DTXMania } public override int On進行描画() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - if( base.b初めての進行描画 ) + if (base.b初めての進行描画) { - this.ct登場アニメ用 = new CCounter( 0, 100, 5, CDTXMania.app.Timer ); - this.ctセンサ光 = new CCounter( 0, 100, 30, CDTXMania.app.Timer ); + this.ct登場アニメ用 = new CCounter(0, 100, 5, CDTXMania.app.Timer); + this.ctセンサ光 = new CCounter(0, 100, 30, CDTXMania.app.Timer); this.ctセンサ光.n現在の値 = 70; base.b初めての進行描画 = false; } this.ct登場アニメ用.t進行(); this.ctセンサ光.t進行Loop(); - if( ( !CDTXMania.app.stage選曲.bスクロール中 && ( this.ct遅延表示 != null ) ) && this.ct遅延表示.b進行中 ) + if ((!CDTXMania.app.stage選曲.bスクロール中 && (this.ct遅延表示 != null)) && this.ct遅延表示.b進行中) { this.ct遅延表示.t進行(); - if ( ( this.ct遅延表示.n現在の値 >= 0 ) && this.b新しいプレビューファイルをまだ読み込んでいない ) + if ((this.ct遅延表示.n現在の値 >= 0) && this.b新しいプレビューファイルをまだ読み込んでいない) { this.tプレビュー画像_動画の変更(); CDTXMania.app.Timer.t更新(); this.ct遅延表示.n現在の経過時間ms = CDTXMania.app.Timer.n現在時刻; this.b新しいプレビューファイルを読み込んだ = true; } - else if ( this.ct遅延表示.b終了値に達した && this.ct遅延表示.b進行中 ) + else if (this.ct遅延表示.b終了値に達した && this.ct遅延表示.b進行中) { this.ct遅延表示.t停止(); } @@ -171,9 +171,9 @@ namespace DTXMania private int n本体X; private int n本体Y; //private IntPtr pAVIBmp; - private readonly Rectangle rcセンサ光 = new Rectangle( (int)(0 * Scale.X), (int)(0xc0 * Scale.Y), (int)(0x40 * Scale.X), (int)(0x40 * Scale.Y) ); - private readonly Rectangle rcセンサ本体下半分 = new Rectangle( (int)(0x40 * Scale.X), (int)(0 * Scale.Y), (int)(0x40 * Scale.X), (int)(0x80 * Scale.Y) ); - private readonly Rectangle rcセンサ本体上半分 = new Rectangle( (int)(0 * Scale.X), (int)(0 * Scale.Y), (int)(0x40 * Scale.X), (int)(0x80 * Scale.Y) ); + private readonly Rectangle rcセンサ光 = new Rectangle((int)(0 * Scale.X), (int)(0xc0 * Scale.Y), (int)(0x40 * Scale.X), (int)(0x40 * Scale.Y)); + private readonly Rectangle rcセンサ本体下半分 = new Rectangle((int)(0x40 * Scale.X), (int)(0 * Scale.Y), (int)(0x40 * Scale.X), (int)(0x80 * Scale.Y)); + private readonly Rectangle rcセンサ本体上半分 = new Rectangle((int)(0 * Scale.X), (int)(0 * Scale.Y), (int)(0x40 * Scale.X), (int)(0x80 * Scale.Y)); private CTexture r表示するプレビュー画像; //private Surface sfAVI画像; private string str現在のファイル名; @@ -231,24 +231,24 @@ namespace DTXMania private void tプレビュー画像_動画の変更() { this.actAVI.Stop(); - if ( this.rAVI != null ) + if (this.rAVI != null) { this.rAVI.Dispose(); this.rAVI = null; } //this.pAVIBmp = IntPtr.Zero; //this.nAVI再生開始時刻 = -1; - if( !CDTXMania.app.ConfigIni.bストイックモード ) + if (!CDTXMania.app.ConfigIni.bストイックモード) { - if( this.tプレビュー動画の指定があれば構築する() ) + if (this.tプレビュー動画の指定があれば構築する()) { return; } - if( this.tプレビュー画像の指定があれば構築する() ) + if (this.tプレビュー画像の指定があれば構築する()) { return; } - if( this.t背景画像があればその一部からプレビュー画像を構築する() ) + if (this.t背景画像があればその一部からプレビュー画像を構築する()) { return; } @@ -259,22 +259,22 @@ namespace DTXMania private bool tプレビュー画像の指定があれば構築する() { Cスコア cスコア = CDTXMania.app.stage選曲.r現在選択中のスコア; - if( ( cスコア == null ) || string.IsNullOrEmpty( cスコア.譜面情報.Preimage ) ) + if ((cスコア == null) || string.IsNullOrEmpty(cスコア.譜面情報.Preimage)) { return false; } string str = cスコア.ファイル情報.フォルダの絶対パス + cスコア.譜面情報.Preimage; - if( !str.Equals( this.str現在のファイル名 ) ) + if (!str.Equals(this.str現在のファイル名)) { - TextureFactory.tテクスチャの解放( ref this.txプレビュー画像 ); + TextureFactory.tテクスチャの解放(ref this.txプレビュー画像); this.str現在のファイル名 = str; - if( !File.Exists( this.str現在のファイル名 ) ) + if (!File.Exists(this.str現在のファイル名)) { - Trace.TraceWarning( "ファイルが存在しません。({0})", new object[] { this.str現在のファイル名 } ); + Trace.TraceWarning("ファイルが存在しません。({0})", new object[] { this.str現在のファイル名 }); return false; } - this.txプレビュー画像 = TextureFactory.tテクスチャの生成( this.str現在のファイル名, false ); - if( this.txプレビュー画像 != null ) + this.txプレビュー画像 = TextureFactory.tテクスチャの生成(this.str現在のファイル名, false); + if (this.txプレビュー画像 != null) { this.r表示するプレビュー画像 = this.txプレビュー画像; } @@ -288,29 +288,29 @@ namespace DTXMania private bool tプレビュー動画の指定があれば構築する() { Cスコア cスコア = CDTXMania.app.stage選曲.r現在選択中のスコア; - if( ( CDTXMania.app.ConfigIni.bAVI有効 && ( cスコア != null ) ) && !string.IsNullOrEmpty( cスコア.譜面情報.Premovie ) ) + if ((CDTXMania.app.ConfigIni.bAVI有効 && (cスコア != null)) && !string.IsNullOrEmpty(cスコア.譜面情報.Premovie)) { - string filename = cスコア.ファイル情報.フォルダの絶対パス + cスコア.譜面情報.Premovie; - if( filename.Equals( this.str現在のファイル名 ) ) - { - return true; - } - if( this.rAVI != null ) - { - this.rAVI.Dispose(); - this.rAVI = null; - } - this.str現在のファイル名 = filename; - if( !File.Exists( this.str現在のファイル名 ) ) - { - Trace.TraceWarning( "ファイルが存在しません。({0})", Path.GetFileName( this.str現在のファイル名 ) ); - return false; - } - try - { + string filename = cスコア.ファイル情報.フォルダの絶対パス + cスコア.譜面情報.Premovie; + if (filename.Equals(this.str現在のファイル名)) + { + return true; + } + if (this.rAVI != null) + { + this.rAVI.Dispose(); + this.rAVI = null; + } + this.str現在のファイル名 = filename; + if (!File.Exists(this.str現在のファイル名)) + { + Trace.TraceWarning("ファイルが存在しません。({0})", Path.GetFileName(this.str現在のファイル名)); + return false; + } + try + { this.rAVI = new CDTX.CAVI(00, this.str現在のファイル名, "", CDTXMania.app.ConfigIni.n演奏速度); this.rAVI.OnDeviceCreated(); - this.actAVI.Start( Ech定義.Movie, rAVI, 204, 269, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1); + this.actAVI.Start(Ech定義.Movie, rAVI, 204, 269, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1); } catch (Exception e) { @@ -325,61 +325,61 @@ namespace DTXMania private bool t背景画像があればその一部からプレビュー画像を構築する() { Cスコア cスコア = CDTXMania.app.stage選曲.r現在選択中のスコア; - if( ( cスコア == null ) || string.IsNullOrEmpty( cスコア.譜面情報.Backgound ) ) + if ((cスコア == null) || string.IsNullOrEmpty(cスコア.譜面情報.Backgound)) { return false; } string path = cスコア.ファイル情報.フォルダの絶対パス + cスコア.譜面情報.Backgound; - if( !path.Equals( this.str現在のファイル名 ) ) + if (!path.Equals(this.str現在のファイル名)) { - if( !File.Exists( path ) ) + if (!File.Exists(path)) { - Trace.TraceWarning( "ファイルが存在しません。({0})", new object[] { path } ); + Trace.TraceWarning("ファイルが存在しません。({0})", new object[] { path }); return false; } - TextureFactory.tテクスチャの解放( ref this.txプレビュー画像 ); + TextureFactory.tテクスチャの解放(ref this.txプレビュー画像); this.str現在のファイル名 = path; Bitmap image = null; Bitmap bitmap2 = null; Bitmap bitmap3 = null; try { - image = new Bitmap( this.str現在のファイル名 ); + image = new Bitmap(this.str現在のファイル名); bitmap2 = new Bitmap(SampleFramework.GameWindowSize.Width, SampleFramework.GameWindowSize.Height); - Graphics graphics = Graphics.FromImage( bitmap2 ); + Graphics graphics = Graphics.FromImage(bitmap2); int x = 0; for (int i = 0; i < SampleFramework.GameWindowSize.Height; i += image.Height) { for (x = 0; x < SampleFramework.GameWindowSize.Width; x += image.Width) { - graphics.DrawImage( image, x, i, image.Width, image.Height ); + graphics.DrawImage(image, x, i, image.Width, image.Height); } } graphics.Dispose(); - bitmap3 = new Bitmap( 0xcc, 0x10d ); - graphics = Graphics.FromImage( bitmap3 ); - graphics.DrawImage( bitmap2, 5, 5, new Rectangle( 0x157, 0x6d, 0xcc, 0x10d ), GraphicsUnit.Pixel ); + bitmap3 = new Bitmap(0xcc, 0x10d); + graphics = Graphics.FromImage(bitmap3); + graphics.DrawImage(bitmap2, 5, 5, new Rectangle(0x157, 0x6d, 0xcc, 0x10d), GraphicsUnit.Pixel); graphics.Dispose(); - this.txプレビュー画像 = new CTexture( CDTXMania.app.Device, bitmap3, CDTXMania.app.TextureFormat ); + this.txプレビュー画像 = new CTexture(CDTXMania.app.Device, bitmap3, CDTXMania.app.TextureFormat); this.r表示するプレビュー画像 = this.txプレビュー画像; } catch { - Trace.TraceError( "背景画像の読み込みに失敗しました。({0})", new object[] { this.str現在のファイル名 } ); + Trace.TraceError("背景画像の読み込みに失敗しました。({0})", new object[] { this.str現在のファイル名 }); this.r表示するプレビュー画像 = this.txプレビュー画像がないときの画像; return false; } finally { - if( image != null ) + if (image != null) { image.Dispose(); } - if( bitmap2 != null ) + if (bitmap2 != null) { bitmap2.Dispose(); } - if( bitmap3 != null ) + if (bitmap3 != null) { bitmap3.Dispose(); } @@ -391,15 +391,15 @@ namespace DTXMania { C曲リストノード c曲リストノード = CDTXMania.app.stage選曲.r現在選択中の曲; Cスコア cスコア = CDTXMania.app.stage選曲.r現在選択中のスコア; - if( ( c曲リストノード != null ) && ( cスコア != null ) ) + if ((c曲リストノード != null) && (cスコア != null)) { string str = ""; - switch( c曲リストノード.eノード種別 ) + switch (c曲リストノード.eノード種別) { case C曲リストノード.Eノード種別.SCORE: - if( ( c曲リストノード.strジャンル == null ) || ( c曲リストノード.strジャンル.Length <= 0 ) ) + if ((c曲リストノード.strジャンル == null) || (c曲リストノード.strジャンル.Length <= 0)) { - if( ( cスコア.譜面情報.ジャンル != null ) && ( cスコア.譜面情報.ジャンル.Length > 0 ) ) + if ((cスコア.譜面情報.ジャンル != null) && (cスコア.譜面情報.ジャンル.Length > 0)) { str = cスコア.譜面情報.ジャンル; } @@ -467,40 +467,40 @@ namespace DTXMania private void t描画処理_センサ光() { int num = this.ctセンサ光.n現在の値; - if( num < 12 ) + if (num < 12) { int x = this.n本体X + (int)(0xcc * Scale.X); int y = this.n本体Y + (int)(0x7b * Scale.Y); - if( this.txセンサ光 != null ) + if (this.txセンサ光 != null) { - this.txセンサ光.vc拡大縮小倍率 = new Vector3( 1f, 1f, 1f ); + this.txセンサ光.vc拡大縮小倍率 = new Vector3(1f, 1f, 1f); this.txセンサ光.n透明度 = 0xff; this.txセンサ光.t2D描画( CDTXMania.app.Device, x, y, new Rectangle( - (int)(( num % 4 ) * 0x40 * Scale.X), - (int)(( num / 4 ) * 0x40 * Scale.Y), + (int)((num % 4) * 0x40 * Scale.X), + (int)((num / 4) * 0x40 * Scale.Y), (int)(0x40 * Scale.X), (int)(0x40 * Scale.Y) ) ); } } - else if( num < 0x18 ) + else if (num < 0x18) { int num4 = num - 11; - double num5 = ( (double) num4 ) / 11.0; - double num6 = 1.0 + ( num5 * 0.5 ); - int num7 = (int) ( 64.0 * num6 ); - int num8 = (int) ( 64.0 * num6 ); - int x = ( ( this.n本体X + (int)(0xcc*Scale.X) ) + (int)(0x20*Scale.X) ) - ( (int)(num7*Scale.X) / 2 ); - int y = ( ( this.n本体Y + (int)(0x7b*Scale.Y) ) + (int)(0x20*Scale.Y) ) - ( (int)(num8*Scale.Y) / 2 ); - if( this.txセンサ光 != null ) + double num5 = ((double)num4) / 11.0; + double num6 = 1.0 + (num5 * 0.5); + int num7 = (int)(64.0 * num6); + int num8 = (int)(64.0 * num6); + int x = ((this.n本体X + (int)(0xcc * Scale.X)) + (int)(0x20 * Scale.X)) - ((int)(num7 * Scale.X) / 2); + int y = ((this.n本体Y + (int)(0x7b * Scale.Y)) + (int)(0x20 * Scale.Y)) - ((int)(num8 * Scale.Y) / 2); + if (this.txセンサ光 != null) { - this.txセンサ光.vc拡大縮小倍率 = new Vector3( (float) num6, (float) num6, 1f ); - this.txセンサ光.n透明度 = (int) ( 255.0 * ( 1.0 - num5 ) ); + this.txセンサ光.vc拡大縮小倍率 = new Vector3((float)num6, (float)num6, 1f); + this.txセンサ光.n透明度 = (int)(255.0 * (1.0 - num5)); this.txセンサ光.t2D描画( CDTXMania.app.Device, x, @@ -514,30 +514,30 @@ namespace DTXMania { int x = this.n本体X + (int)(0xcd * Scale.X); int y = this.n本体Y - (int)(4 * Scale.Y); - if( this.txセンサ != null ) + if (this.txセンサ != null) { - this.txセンサ.t2D描画( CDTXMania.app.Device, x, y, this.rcセンサ本体上半分 ); + this.txセンサ.t2D描画(CDTXMania.app.Device, x, y, this.rcセンサ本体上半分); y += (int)(0x80 * Scale.Y); - this.txセンサ.t2D描画( CDTXMania.app.Device, x, y, this.rcセンサ本体下半分 ); + this.txセンサ.t2D描画(CDTXMania.app.Device, x, y, this.rcセンサ本体下半分); } } private void t描画処理_パネル本体() { - if( this.ct登場アニメ用.b終了値に達した || ( this.txパネル本体 != null ) ) + if (this.ct登場アニメ用.b終了値に達した || (this.txパネル本体 != null)) { this.n本体X = (int)(8 * Scale.X); this.n本体Y = (int)(0x39 * Scale.Y); } else { - double num = ( (double) this.ct登場アニメ用.n現在の値 ) / 100.0; - double num2 = Math.Cos( ( 1.5 + ( 0.5 * num ) ) * Math.PI ); + double num = ((double)this.ct登場アニメ用.n現在の値) / 100.0; + double num2 = Math.Cos((1.5 + (0.5 * num)) * Math.PI); this.n本体X = (int)(8 * Scale.X); - this.n本体Y = (int)(0x39 * Scale.Y) - ( (int) ( this.txパネル本体.sz画像サイズ.Height * ( 1.0 - ( num2 * num2 ) ) ) ); + this.n本体Y = (int)(0x39 * Scale.Y) - ((int)(this.txパネル本体.sz画像サイズ.Height * (1.0 - (num2 * num2)))); } - if( this.txパネル本体 != null ) + if (this.txパネル本体 != null) { - this.txパネル本体.t2D描画( CDTXMania.app.Device, this.n本体X, this.n本体Y ); + this.txパネル本体.t2D描画(CDTXMania.app.Device, this.n本体X, this.n本体Y); } } private unsafe void t描画処理_プレビュー画像() @@ -547,30 +547,30 @@ namespace DTXMania int x = this.n本体X + (int)(0x12 * Scale.X); int y = this.n本体Y + (int)(0x10 * Scale.Y); - if ( this.rAVI != null ) + if (this.rAVI != null) { - this.actAVI.t進行描画( x, y, 612, 605 ); + this.actAVI.t進行描画(x, y, 612, 605); return; } - float num3 = ( (float) this.ct遅延表示.n現在の値 ) / 100f; - float mag = 0.9f + ( 0.1f * num3 ); + float num3 = ((float)this.ct遅延表示.n現在の値) / 100f; + float mag = 0.9f + (0.1f * num3); #region [ プレビュー画像表示 ] - if ( this.r表示するプレビュー画像 != null ) + if (this.r表示するプレビュー画像 != null) { CPreviewMagnifier cmg = new CPreviewMagnifier(); - cmg.GetMagnifier( this.r表示するプレビュー画像.sz画像サイズ.Width, this.r表示するプレビュー画像.sz画像サイズ.Height, mag, mag, true ); + cmg.GetMagnifier(this.r表示するプレビュー画像.sz画像サイズ.Width, this.r表示するプレビュー画像.sz画像サイズ.Height, mag, mag, true); int width = cmg.width; int height = cmg.height; this.r表示するプレビュー画像.vc拡大縮小倍率.X = cmg.magX; // ( num4 * Scale.X ) / WIDTH_HD_SET; this.r表示するプレビュー画像.vc拡大縮小倍率.Y = cmg.magY; // ( num4 * Scale.X ) / WIDTH_HD_SET; - x += ( width - ( (int) ( width * mag ) ) ) / 2; - y += ( height - ( (int) ( height * mag ) ) ) / 2; - this.r表示するプレビュー画像.n透明度 = (int) ( 255f * num3 ); - this.r表示するプレビュー画像.t2D描画( CDTXMania.app.Device, x, y ); + x += (width - ((int)(width * mag))) / 2; + y += (height - ((int)(height * mag))) / 2; + this.r表示するプレビュー画像.n透明度 = (int)(255f * num3); + this.r表示するプレビュー画像.t2D描画(CDTXMania.app.Device, x, y); } #endregion } diff --git a/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectPresound.cs b/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectPresound.cs index 3beff357..904e1635 100644 --- a/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectPresound.cs +++ b/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectPresound.cs @@ -16,23 +16,23 @@ namespace DTXMania } public void tサウンド停止() { - if( this.sound != null ) + if (this.sound != null) { this.sound.t再生を停止する(); - CDTXMania.app.Sound管理.tサウンドを破棄する( this.sound ); + CDTXMania.app.Sound管理.tサウンドを破棄する(this.sound); this.sound = null; } } public void t選択曲が変更された() { Cスコア cスコア = CDTXMania.app.stage選曲.r現在選択中のスコア; - if( ( cスコア != null ) && ( ( !( cスコア.ファイル情報.フォルダの絶対パス + cスコア.譜面情報.Presound ).Equals( this.str現在のファイル名 ) || ( this.sound == null ) ) || !this.sound.b再生中 ) ) + if ((cスコア != null) && ((!(cスコア.ファイル情報.フォルダの絶対パス + cスコア.譜面情報.Presound).Equals(this.str現在のファイル名) || (this.sound == null)) || !this.sound.b再生中)) { this.tサウンド停止(); this.tBGMフェードイン開始(); - if( ( cスコア.譜面情報.Presound != null ) && ( cスコア.譜面情報.Presound.Length > 0 ) ) + if ((cスコア.譜面情報.Presound != null) && (cスコア.譜面情報.Presound.Length > 0)) { - this.ct再生待ちウェイト = new CCounter( 0, CDTXMania.app.ConfigIni.n曲が選択されてからプレビュー音が鳴るまでのウェイトms, 1, CDTXMania.app.Timer ); + this.ct再生待ちウェイト = new CCounter(0, CDTXMania.app.ConfigIni.n曲が選択されてからプレビュー音が鳴るまでのウェイトms, 1, CDTXMania.app.Timer); } } } @@ -59,22 +59,22 @@ namespace DTXMania } public override int On進行描画() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - if( ( this.ctBGMフェードイン用 != null ) && this.ctBGMフェードイン用.b進行中 ) + if ((this.ctBGMフェードイン用 != null) && this.ctBGMフェードイン用.b進行中) { this.ctBGMフェードイン用.t進行(); CDTXMania.app.Skin.bgm選曲画面.n音量_現在のサウンド = this.ctBGMフェードイン用.n現在の値; - if( this.ctBGMフェードイン用.b終了値に達した ) + if (this.ctBGMフェードイン用.b終了値に達した) { this.ctBGMフェードイン用.t停止(); } } - if( ( this.ctBGMフェードアウト用 != null ) && this.ctBGMフェードアウト用.b進行中 ) + if ((this.ctBGMフェードアウト用 != null) && this.ctBGMフェードアウト用.b進行中) { this.ctBGMフェードアウト用.t進行(); CDTXMania.app.Skin.bgm選曲画面.n音量_現在のサウンド = 100 - this.ctBGMフェードアウト用.n現在の値; - if( this.ctBGMフェードアウト用.b終了値に達した ) + if (this.ctBGMフェードアウト用.b終了値に達した) { this.ctBGMフェードアウト用.t停止(); } @@ -94,44 +94,44 @@ namespace DTXMania private CCounter ct再生待ちウェイト; private CSound sound; private string str現在のファイル名; - + private void tBGMフェードアウト開始() { - if( this.ctBGMフェードイン用 != null ) + if (this.ctBGMフェードイン用 != null) { this.ctBGMフェードイン用.t停止(); } - this.ctBGMフェードアウト用 = new CCounter( 0, 100, 10, CDTXMania.app.Timer ); + this.ctBGMフェードアウト用 = new CCounter(0, 100, 10, CDTXMania.app.Timer); this.ctBGMフェードアウト用.n現在の値 = 100 - CDTXMania.app.Skin.bgm選曲画面.n音量_現在のサウンド; } private void tBGMフェードイン開始() { - if( this.ctBGMフェードアウト用 != null ) + if (this.ctBGMフェードアウト用 != null) { this.ctBGMフェードアウト用.t停止(); } - this.ctBGMフェードイン用 = new CCounter( 0, 100, 20, CDTXMania.app.Timer ); + this.ctBGMフェードイン用 = new CCounter(0, 100, 20, CDTXMania.app.Timer); this.ctBGMフェードイン用.n現在の値 = CDTXMania.app.Skin.bgm選曲画面.n音量_現在のサウンド; } private void tプレビューサウンドの作成() { Cスコア cスコア = CDTXMania.app.stage選曲.r現在選択中のスコア; - if( ( cスコア != null ) && !string.IsNullOrEmpty( cスコア.譜面情報.Presound ) ) + if ((cスコア != null) && !string.IsNullOrEmpty(cスコア.譜面情報.Presound)) { string strPreviewFilename = cスコア.ファイル情報.フォルダの絶対パス + cスコア.譜面情報.Presound; try { - this.sound = CDTXMania.app.Sound管理.tサウンドを生成する( strPreviewFilename ); + this.sound = CDTXMania.app.Sound管理.tサウンドを生成する(strPreviewFilename); this.sound.n音量 = 80; // CDTXMania.app.ConfigIni.n自動再生音量; // #25217 changed preview volume from AutoVolume - this.sound.t再生を開始する( true ); + this.sound.t再生を開始する(true); this.str現在のファイル名 = strPreviewFilename; this.tBGMフェードアウト開始(); - Trace.TraceInformation( "プレビューサウンドを生成しました。({0})", Path.GetFileName( strPreviewFilename ) ); + Trace.TraceInformation("プレビューサウンドを生成しました。({0})", Path.GetFileName(strPreviewFilename)); } catch { - Trace.TraceError( "プレビューサウンドの生成に失敗しました。({0})", Path.GetFileName( strPreviewFilename ) ); - if( this.sound != null ) + Trace.TraceError("プレビューサウンドの生成に失敗しました。({0})", Path.GetFileName(strPreviewFilename)); + if (this.sound != null) { this.sound.Dispose(); } @@ -141,10 +141,10 @@ namespace DTXMania } private void t進行処理_プレビューサウンド() { - if( ( this.ct再生待ちウェイト != null ) && !this.ct再生待ちウェイト.b停止中 ) + if ((this.ct再生待ちウェイト != null) && !this.ct再生待ちウェイト.b停止中) { this.ct再生待ちウェイト.t進行(); - if( !this.ct再生待ちウェイト.b終了値に達してない ) + if (!this.ct再生待ちウェイト.b終了値に達してない) { this.ct再生待ちウェイト.t停止(); if (CDTXMania.app.stage選曲.bスクロール中) diff --git a/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectQuickConfig.cs b/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectQuickConfig.cs index 7b20efad..9e0c9923 100644 --- a/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectQuickConfig.cs +++ b/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectQuickConfig.cs @@ -23,61 +23,61 @@ namespace DTXMania private void CActSelectQuickConfigMain() { -/* -•Target: Drums/Guitar/Bass -•Auto Mode: All ON/All OFF/CUSTOM -•Auto Lane: -•Scroll Speed: -•Play Speed: -•Risky: -•Hidden/Sudden: None/Hidden/Sudden/Both -•AUTO Ghost: Perfect/Last Play/Hi Skill/Hi Score/Online -•Target Ghost: None/Perfect/Last Play/Hi Skill/Hi Score/Online -•Conf SET: SET-1/SET-2/SET-3 -•More... -•EXIT -*/ + /* + •Target: Drums/Guitar/Bass + •Auto Mode: All ON/All OFF/CUSTOM + •Auto Lane: + •Scroll Speed: + •Play Speed: + •Risky: + •Hidden/Sudden: None/Hidden/Sudden/Both + •AUTO Ghost: Perfect/Last Play/Hi Skill/Hi Score/Online + •Target Ghost: None/Perfect/Last Play/Hi Skill/Hi Score/Online + •Conf SET: SET-1/SET-2/SET-3 + •More... + •EXIT + */ lci = new List>>(); // この画面に来る度に、メニューを作り直す。 - for ( int nConfSet = 0; nConfSet < 3; nConfSet++ ) + for (int nConfSet = 0; nConfSet < 3; nConfSet++) { - lci.Add( new List>() ); // ConfSet用の3つ分の枠。 - for ( int nInst = 0; nInst < 3; nInst++ ) + lci.Add(new List>()); // ConfSet用の3つ分の枠。 + for (int nInst = 0; nInst < 3; nInst++) { - lci[ nConfSet ].Add( null ); // Drum/Guitar/Bassで3つ分、枠を作っておく - lci[ nConfSet ][ nInst ] = MakeListCItemBase( nConfSet, nInst ); + lci[nConfSet].Add(null); // Drum/Guitar/Bassで3つ分、枠を作っておく + lci[nConfSet][nInst] = MakeListCItemBase(nConfSet, nInst); } } - base.Initialize( lci[ nCurrentConfigSet ][ nCurrentTarget ], true, QuickCfgTitle, 2 ); // ConfSet=0, nInst=Drums + base.Initialize(lci[nCurrentConfigSet][nCurrentTarget], true, QuickCfgTitle, 2); // ConfSet=0, nInst=Drums } - private List MakeListCItemBase( int nConfigSet, int nInst ) + private List MakeListCItemBase(int nConfigSet, int nInst) { List l = new List(); #region [ 共通 Target/AutoMode/AutoLane ] - l.Add( new CSwitchItemList( "Target", CItemBase.Eパネル種別.通常, nInst, "", "", new string[] { "Drums", "Guitar", "Bass" } ) ); + l.Add(new CSwitchItemList("Target", CItemBase.Eパネル種別.通常, nInst, "", "", new string[] { "Drums", "Guitar", "Bass" })); List automode = tConfigureAuto_DefaultSettings(); - if ( nInst == (int) E楽器パート.DRUMS ) + if (nInst == (int)E楽器パート.DRUMS) { - l.Add( new CItemList( "Auto Mode", CItemBase.Eパネル種別.通常, automode[ nInst ], "", "", new string[] { "All Auto", "Auto HH", "Auto BD", "Custom", "OFF" } ) ); + l.Add(new CItemList("Auto Mode", CItemBase.Eパネル種別.通常, automode[nInst], "", "", new string[] { "All Auto", "Auto HH", "Auto BD", "Custom", "OFF" })); } else { - l.Add( new CItemList( "Auto Mode", CItemBase.Eパネル種別.通常, automode[ nInst ], "", "", new string[] { "All Auto", "Auto Neck", "Auto Pick", "Custom", "OFF" } ) ); + l.Add(new CItemList("Auto Mode", CItemBase.Eパネル種別.通常, automode[nInst], "", "", new string[] { "All Auto", "Auto Neck", "Auto Pick", "Custom", "OFF" })); } #endregion #region [ 個別 ScrollSpeed ] - l.Add( new CItemInteger( "ScrollSpeed", 0, 1999, CDTXMania.app.ConfigIni.n譜面スクロール速度[ nInst ], + l.Add(new CItemInteger("ScrollSpeed", 0, 1999, CDTXMania.app.ConfigIni.n譜面スクロール速度[nInst], "演奏時のドラム譜面のスクロールの\n" + "速度を指定します。\n" + "x0.5 ~ x1000.0 を指定可能です。", "To change the scroll speed for the\n" + "drums lanes.\n" + "You can set it from x0.5 to x1000.0.\n" + - "(ScrollSpeed=x0.5 means half speed)" ) ); + "(ScrollSpeed=x0.5 means half speed)")); #endregion #region [ 共通 Dark/Risky/PlaySpeed ] - l.Add( new CItemList( "Dark", CItemBase.Eパネル種別.通常, (int) CDTXMania.app.ConfigIni.eDark, + l.Add(new CItemList("Dark", CItemBase.Eパネル種別.通常, (int)CDTXMania.app.ConfigIni.eDark, "HALF: 背景、レーン、ゲージが表示\n" + "されなくなります。\n" + "FULL: さらに小節線、拍線、判定ラ\n" + @@ -87,8 +87,8 @@ namespace DTXMania " disappeared.\n" + "FULL: additionaly to HALF, bar/beat\n" + " lines, hit bar, pads are disappeared.", - new string[] { "OFF", "HALF", "FULL" } ) ); - l.Add( new CItemInteger( "Risky", 0, 10, CDTXMania.app.ConfigIni.nRisky, + new string[] { "OFF", "HALF", "FULL" })); + l.Add(new CItemInteger("Risky", 0, 10, CDTXMania.app.ConfigIni.nRisky, "Riskyモードの設定:\n" + "1以上の値にすると、その回数分の\n" + "Poor/MissでFAILEDとなります。\n" + @@ -100,8 +100,8 @@ namespace DTXMania "Set over 1, in case you'd like to specify\n" + " the number of Poor/Miss times to be\n" + " FAILED.\n" + - "Set 0 to disable Risky mode." ) ); - l.Add( new CItemInteger( "PlaySpeed", 5, 40, CDTXMania.app.ConfigIni.n演奏速度, + "Set 0 to disable Risky mode.")); + l.Add(new CItemInteger("PlaySpeed", 5, 40, CDTXMania.app.ConfigIni.n演奏速度, "曲の演奏速度を、速くしたり遅くした\n" + "りすることができます。\n" + "(※一部のサウンドカードでは正しく\n" + @@ -110,37 +110,37 @@ namespace DTXMania "For example, you can play in half\n" + " speed by setting PlaySpeed = 0.500\n" + " for your practice.\n" + - "Note: It also changes the songs' pitch." ) ); + "Note: It also changes the songs' pitch.")); #endregion #region [ 個別 Sud/Hid ] int nSuddenHidden; - if ( CDTXMania.app.ConfigIni.eInvisible[ nInst ] != EInvisible.OFF ) + if (CDTXMania.app.ConfigIni.eInvisible[nInst] != EInvisible.OFF) { - nSuddenHidden = (int) CDTXMania.app.ConfigIni.eInvisible[ nInst ] + 3; + nSuddenHidden = (int)CDTXMania.app.ConfigIni.eInvisible[nInst] + 3; } else { - nSuddenHidden = ( ( CDTXMania.app.ConfigIni.bHidden[ nInst ] ) ? 2 : 0 ) + ( ( CDTXMania.app.ConfigIni.bSudden[ nInst ] ) ? 1 : 0 ); + nSuddenHidden = ((CDTXMania.app.ConfigIni.bHidden[nInst]) ? 2 : 0) + ((CDTXMania.app.ConfigIni.bSudden[nInst]) ? 1 : 0); } - l.Add( new CItemList( "Sud/Hid", CItemBase.Eパネル種別.通常, nSuddenHidden, "", "", - new string[] { "None", "Sudden", "Hidden", "Sud+Hid", "S-Invisible", "F-Invisible" } ) ); + l.Add(new CItemList("Sud/Hid", CItemBase.Eパネル種別.通常, nSuddenHidden, "", "", + new string[] { "None", "Sudden", "Hidden", "Sud+Hid", "S-Invisible", "F-Invisible" })); + #endregion + #region [ 個別 Ghost ] + l.Add(new CItemList("AUTO Ghost", CItemBase.Eパネル種別.通常, (int)CDTXMania.app.ConfigIni.eAutoGhost[nInst], + "AUTOプレーのゴーストを指定します。\n", + "Specify Play Ghost data.\n", + new string[] { "Perfect", "Last Play", "Hi Skill", "Hi Score", "Online" } + )); + l.Add(new CItemList("Target Ghost", CItemBase.Eパネル種別.通常, (int)CDTXMania.app.ConfigIni.eTargetGhost[nInst], + "ターゲットゴーストを指定します。\n", + "Specify Target Ghost data.\n", + new string[] { "None", "Perfect", "Last Play", "Hi Skill", "Hi Score", "Online" } + )); #endregion - #region [ 個別 Ghost ] - l.Add( new CItemList("AUTO Ghost", CItemBase.Eパネル種別.通常, (int)CDTXMania.app.ConfigIni.eAutoGhost[ nInst ], - "AUTOプレーのゴーストを指定します。\n", - "Specify Play Ghost data.\n", - new string[] {"Perfect", "Last Play", "Hi Skill", "Hi Score", "Online" } - )); - l.Add(new CItemList("Target Ghost", CItemBase.Eパネル種別.通常, (int)CDTXMania.app.ConfigIni.eTargetGhost[ nInst ], - "ターゲットゴーストを指定します。\n", - "Specify Target Ghost data.\n", - new string[] {"None", "Perfect", "Last Play", "Hi Skill", "Hi Score", "Online" } - )); - #endregion #region [ 共通 SET切り替え/More/Return ] - l.Add( new CSwitchItemList( "Config Set", CItemBase.Eパネル種別.通常, nCurrentConfigSet, "", "", new string[] { "SET-1", "SET-2", "SET-3" } ) ); - l.Add( new CSwitchItemList( "More...", CItemBase.Eパネル種別.通常, 0, "", "", new string[] { "" } ) ); - l.Add( new CSwitchItemList( "Return", CItemBase.Eパネル種別.通常, 0, "", "", new string[] { "", "" } ) ); + l.Add(new CSwitchItemList("Config Set", CItemBase.Eパネル種別.通常, nCurrentConfigSet, "", "", new string[] { "SET-1", "SET-2", "SET-3" })); + l.Add(new CSwitchItemList("More...", CItemBase.Eパネル種別.通常, 0, "", "", new string[] { "" })); + l.Add(new CSwitchItemList("Return", CItemBase.Eパネル種別.通常, 0, "", "", new string[] { "", "" })); #endregion return l; @@ -156,28 +156,28 @@ namespace DTXMania int automode; #region [ Drums ] // "All Auto", "Auto HH", "Auto BD", "Custom", "OFF" - if ( CDTXMania.app.ConfigIni.bドラムが全部オートプレイである ) + if (CDTXMania.app.ConfigIni.bドラムが全部オートプレイである) { automode = 0; // All Auto } - else if ( CDTXMania.app.ConfigIni.bAutoPlay.LC == false && CDTXMania.app.ConfigIni.bAutoPlay.HH == true && + else if (CDTXMania.app.ConfigIni.bAutoPlay.LC == false && CDTXMania.app.ConfigIni.bAutoPlay.HH == true && CDTXMania.app.ConfigIni.bAutoPlay.BD == false && CDTXMania.app.ConfigIni.bAutoPlay.SD == false && CDTXMania.app.ConfigIni.bAutoPlay.HT == false && CDTXMania.app.ConfigIni.bAutoPlay.LT == false && - CDTXMania.app.ConfigIni.bAutoPlay.FT == false && CDTXMania.app.ConfigIni.bAutoPlay.CY == false ) + CDTXMania.app.ConfigIni.bAutoPlay.FT == false && CDTXMania.app.ConfigIni.bAutoPlay.CY == false) { automode = 1; // Auto HH } - else if ( CDTXMania.app.ConfigIni.bAutoPlay.LC == false && CDTXMania.app.ConfigIni.bAutoPlay.HH == false && - CDTXMania.app.ConfigIni.bAutoPlay.BD == true && CDTXMania.app.ConfigIni.bAutoPlay.SD == false && + else if (CDTXMania.app.ConfigIni.bAutoPlay.LC == false && CDTXMania.app.ConfigIni.bAutoPlay.HH == false && + CDTXMania.app.ConfigIni.bAutoPlay.BD == true && CDTXMania.app.ConfigIni.bAutoPlay.SD == false && CDTXMania.app.ConfigIni.bAutoPlay.HT == false && CDTXMania.app.ConfigIni.bAutoPlay.LT == false && - CDTXMania.app.ConfigIni.bAutoPlay.FT == false && CDTXMania.app.ConfigIni.bAutoPlay.CY == false ) + CDTXMania.app.ConfigIni.bAutoPlay.FT == false && CDTXMania.app.ConfigIni.bAutoPlay.CY == false) { automode = 2; // Auto BD } - else if ( CDTXMania.app.ConfigIni.bAutoPlay.LC == false && CDTXMania.app.ConfigIni.bAutoPlay.HH == false && + else if (CDTXMania.app.ConfigIni.bAutoPlay.LC == false && CDTXMania.app.ConfigIni.bAutoPlay.HH == false && CDTXMania.app.ConfigIni.bAutoPlay.BD == false && CDTXMania.app.ConfigIni.bAutoPlay.SD == false && CDTXMania.app.ConfigIni.bAutoPlay.HT == false && CDTXMania.app.ConfigIni.bAutoPlay.LT == false && - CDTXMania.app.ConfigIni.bAutoPlay.FT == false && CDTXMania.app.ConfigIni.bAutoPlay.CY == false ) + CDTXMania.app.ConfigIni.bAutoPlay.FT == false && CDTXMania.app.ConfigIni.bAutoPlay.CY == false) { automode = 4; // OFF } @@ -185,31 +185,31 @@ namespace DTXMania { automode = 3; // Custom } - l.Add( automode ); + l.Add(automode); #endregion #region [ Guitar ] -// "OFF", "ON" -// l.Add( ( CDTXMania.app.ConfigIni.bAutoPlay.Guitar == true ) ? 1 : 0 ); -// l.Add( ( CDTXMania.app.ConfigIni.bAutoPlay.Bass == true ) ? 1 : 0 ); - if ( CDTXMania.app.ConfigIni.bギターが全部オートプレイである) + // "OFF", "ON" + // l.Add( ( CDTXMania.app.ConfigIni.bAutoPlay.Guitar == true ) ? 1 : 0 ); + // l.Add( ( CDTXMania.app.ConfigIni.bAutoPlay.Bass == true ) ? 1 : 0 ); + if (CDTXMania.app.ConfigIni.bギターが全部オートプレイである) { automode = 0; // All Auto } - else if ( CDTXMania.app.ConfigIni.bAutoPlay.GtR == true && CDTXMania.app.ConfigIni.bAutoPlay.GtG == true && + else if (CDTXMania.app.ConfigIni.bAutoPlay.GtR == true && CDTXMania.app.ConfigIni.bAutoPlay.GtG == true && CDTXMania.app.ConfigIni.bAutoPlay.GtB == true && CDTXMania.app.ConfigIni.bAutoPlay.GtPick == false && - CDTXMania.app.ConfigIni.bAutoPlay.GtW == false ) + CDTXMania.app.ConfigIni.bAutoPlay.GtW == false) { automode = 1; // Auto Neck } - else if ( CDTXMania.app.ConfigIni.bAutoPlay.GtR == false && CDTXMania.app.ConfigIni.bAutoPlay.GtG == false && + else if (CDTXMania.app.ConfigIni.bAutoPlay.GtR == false && CDTXMania.app.ConfigIni.bAutoPlay.GtG == false && CDTXMania.app.ConfigIni.bAutoPlay.GtB == false && CDTXMania.app.ConfigIni.bAutoPlay.GtPick == true && - CDTXMania.app.ConfigIni.bAutoPlay.GtW == false ) + CDTXMania.app.ConfigIni.bAutoPlay.GtW == false) { automode = 2; // Auto Pick } - else if ( CDTXMania.app.ConfigIni.bAutoPlay.GtR == false && CDTXMania.app.ConfigIni.bAutoPlay.GtG == false && + else if (CDTXMania.app.ConfigIni.bAutoPlay.GtR == false && CDTXMania.app.ConfigIni.bAutoPlay.GtG == false && CDTXMania.app.ConfigIni.bAutoPlay.GtB == false && CDTXMania.app.ConfigIni.bAutoPlay.GtPick == false && - CDTXMania.app.ConfigIni.bAutoPlay.GtW == false ) + CDTXMania.app.ConfigIni.bAutoPlay.GtW == false) { automode = 4; // OFF } @@ -217,28 +217,28 @@ namespace DTXMania { automode = 3; // Custom } - l.Add( automode ); + l.Add(automode); #endregion #region [ Bass ] - if ( CDTXMania.app.ConfigIni.bベースが全部オートプレイである ) + if (CDTXMania.app.ConfigIni.bベースが全部オートプレイである) { automode = 0; // All Auto } - else if ( CDTXMania.app.ConfigIni.bAutoPlay.BsR == true && CDTXMania.app.ConfigIni.bAutoPlay.BsG == true && + else if (CDTXMania.app.ConfigIni.bAutoPlay.BsR == true && CDTXMania.app.ConfigIni.bAutoPlay.BsG == true && CDTXMania.app.ConfigIni.bAutoPlay.BsB == true && CDTXMania.app.ConfigIni.bAutoPlay.BsPick == false && - CDTXMania.app.ConfigIni.bAutoPlay.BsW == false ) + CDTXMania.app.ConfigIni.bAutoPlay.BsW == false) { automode = 1; // Auto Neck } - else if ( CDTXMania.app.ConfigIni.bAutoPlay.BsR == false && CDTXMania.app.ConfigIni.bAutoPlay.BsG == false && + else if (CDTXMania.app.ConfigIni.bAutoPlay.BsR == false && CDTXMania.app.ConfigIni.bAutoPlay.BsG == false && CDTXMania.app.ConfigIni.bAutoPlay.BsB == false && CDTXMania.app.ConfigIni.bAutoPlay.BsPick == true && - CDTXMania.app.ConfigIni.bAutoPlay.BsW == false ) + CDTXMania.app.ConfigIni.bAutoPlay.BsW == false) { automode = 2; // Auto Pick } - else if ( CDTXMania.app.ConfigIni.bAutoPlay.BsR == false && CDTXMania.app.ConfigIni.bAutoPlay.BsG == false && + else if (CDTXMania.app.ConfigIni.bAutoPlay.BsR == false && CDTXMania.app.ConfigIni.bAutoPlay.BsG == false && CDTXMania.app.ConfigIni.bAutoPlay.BsB == false && CDTXMania.app.ConfigIni.bAutoPlay.BsPick == false && - CDTXMania.app.ConfigIni.bAutoPlay.BsW == false ) + CDTXMania.app.ConfigIni.bAutoPlay.BsW == false) { automode = 4; // OFF } @@ -246,16 +246,16 @@ namespace DTXMania { automode = 3; // Custom } - l.Add( automode ); + l.Add(automode); #endregion return l; } // メソッド - public override void tActivatePopupMenu( E楽器パート einst ) + public override void tActivatePopupMenu(E楽器パート einst) { this.CActSelectQuickConfigMain(); - base.tActivatePopupMenu( einst ); + base.tActivatePopupMenu(einst); } //public void tDeativatePopupMenu() //{ @@ -268,23 +268,23 @@ namespace DTXMania /// public override void t進行描画sub() { - if ( base.n現在の選択行 == (int) EOrder.AutoMode ) + if (base.n現在の選択行 == (int)EOrder.AutoMode) { - if ( tx文字列パネル == null ) // TagetとAuto Modeを全く変更せずにAuto Modeまで動かした場合限り、ここに来る - { - MakeAutoPanel(); - } + if (tx文字列パネル == null) // TagetとAuto Modeを全く変更せずにAuto Modeまで動かした場合限り、ここに来る + { + MakeAutoPanel(); + } - if ( this.txパネル本体 != null ) - { - this.txパネル本体.t2D描画( CDTXMania.app.Device, 213 * Scale.X, 167 * Scale.Y ); - } - if ( this.tx文字列パネル != null ) - { - int x = ( nCurrentTarget == (int) E楽器パート.DRUMS ) ? 230 : 260; - this.tx文字列パネル.t2D描画( CDTXMania.app.Device, x * Scale.X, 190 * Scale.Y); + if (this.txパネル本体 != null) + { + this.txパネル本体.t2D描画(CDTXMania.app.Device, 213 * Scale.X, 167 * Scale.Y); + } + if (this.tx文字列パネル != null) + { + int x = (nCurrentTarget == (int)E楽器パート.DRUMS) ? 230 : 260; + this.tx文字列パネル.t2D描画(CDTXMania.app.Device, x * Scale.X, 190 * Scale.Y); - } + } } } @@ -293,125 +293,125 @@ namespace DTXMania /// private void MakeAutoPanel() { - Bitmap image = new Bitmap( (int)(300 * Scale.X), (int)(130 * Scale.Y) ); - Graphics graphics = Graphics.FromImage( image ); + Bitmap image = new Bitmap((int)(300 * Scale.X), (int)(130 * Scale.Y)); + Graphics graphics = Graphics.FromImage(image); string header = "", s = ""; - switch ( nCurrentTarget ) + switch (nCurrentTarget) { - case (int) E楽器パート.DRUMS: + case (int)E楽器パート.DRUMS: header = "LHSBHLFC"; break; - case (int) E楽器パート.GUITAR: - case (int) E楽器パート.BASS: + case (int)E楽器パート.GUITAR: + case (int)E楽器パート.BASS: header = "RGBPW"; break; default: break; } - s = GetAutoParameters( nCurrentTarget ); - for ( int i = 0; i < header.Length; i++ ) + s = GetAutoParameters(nCurrentTarget); + for (int i = 0; i < header.Length; i++) { - graphics.DrawString( header[ i ].ToString(), this.ft表示用フォント, Brushes.White, (float) i * 24 * Scale.X, (float) 0f ); - graphics.DrawString( s[i].ToString(), this.ft表示用フォント, Brushes.White, (float) i * 24 * Scale.X, (float) 24f * Scale.Y ); + graphics.DrawString(header[i].ToString(), this.ft表示用フォント, Brushes.White, (float)i * 24 * Scale.X, (float)0f); + graphics.DrawString(s[i].ToString(), this.ft表示用フォント, Brushes.White, (float)i * 24 * Scale.X, (float)24f * Scale.Y); } graphics.Dispose(); try { - if ( this.tx文字列パネル != null ) + if (this.tx文字列パネル != null) { this.tx文字列パネル.Dispose(); } - this.tx文字列パネル = new CTexture( CDTXMania.app.Device, image, CDTXMania.app.TextureFormat ); - this.tx文字列パネル.vc拡大縮小倍率 = new Vector3( 1f, 1f, 1f ); + this.tx文字列パネル = new CTexture(CDTXMania.app.Device, image, CDTXMania.app.TextureFormat); + this.tx文字列パネル.vc拡大縮小倍率 = new Vector3(1f, 1f, 1f); image.Dispose(); } - catch ( CTextureCreateFailedException ) + catch (CTextureCreateFailedException) { - Trace.TraceError( "演奏履歴文字列テクスチャの作成に失敗しました。" ); + Trace.TraceError("演奏履歴文字列テクスチャの作成に失敗しました。"); this.tx文字列パネル = null; } } - public override void tEnter押下Main( int nSortOrder ) + public override void tEnter押下Main(int nSortOrder) { - switch ( n現在の選択行 ) - { - case (int) EOrder.Target: - nCurrentTarget = ( nCurrentTarget + 1 ) % 3; + switch (n現在の選択行) + { + case (int)EOrder.Target: + nCurrentTarget = (nCurrentTarget + 1) % 3; // eInst = (E楽器パート) nCurrentTarget; // ここではeInstは変えない。メニューを開いたタイミングでのみeInstを使う - Initialize( lci[ nCurrentConfigSet ][ nCurrentTarget ], true, QuickCfgTitle, n現在の選択行 ); + Initialize(lci[nCurrentConfigSet][nCurrentTarget], true, QuickCfgTitle, n現在の選択行); MakeAutoPanel(); break; - case (int) EOrder.AutoMode: + case (int)EOrder.AutoMode: MakeAutoPanel(); break; - case (int) EOrder.ScrollSpeed: - CDTXMania.app.ConfigIni.n譜面スクロール速度[ nCurrentTarget ] = (int) GetObj現在値( (int) EOrder.ScrollSpeed ); + case (int)EOrder.ScrollSpeed: + CDTXMania.app.ConfigIni.n譜面スクロール速度[nCurrentTarget] = (int)GetObj現在値((int)EOrder.ScrollSpeed); break; - case (int) EOrder.Dark: + case (int)EOrder.Dark: { - Eダークモード d = (Eダークモード) GetIndex( (int) EOrder.Dark ); + Eダークモード d = (Eダークモード)GetIndex((int)EOrder.Dark); CDTXMania.app.ConfigIni.eDark = d; - SetValueToAllTarget( (int) EOrder.Dark, (int) d ); // 全楽器で共有する値のため、全targetに値を展開する + SetValueToAllTarget((int)EOrder.Dark, (int)d); // 全楽器で共有する値のため、全targetに値を展開する } break; - case (int) EOrder.Risky: + case (int)EOrder.Risky: { - int r = (int) GetObj現在値( (int) EOrder.Risky ); + int r = (int)GetObj現在値((int)EOrder.Risky); CDTXMania.app.ConfigIni.nRisky = r; - SetValueToAllTarget( (int) EOrder.Risky, r ); // 全楽器で共有する値のため、全targetに値を展開する + SetValueToAllTarget((int)EOrder.Risky, r); // 全楽器で共有する値のため、全targetに値を展開する } break; - case (int) EOrder.PlaySpeed: - CDTXMania.app.ConfigIni.n演奏速度 = (int) GetObj現在値( (int) EOrder.PlaySpeed ); + case (int)EOrder.PlaySpeed: + CDTXMania.app.ConfigIni.n演奏速度 = (int)GetObj現在値((int)EOrder.PlaySpeed); break; - case (int) EOrder.SuddenHidden: - int sh = (int) GetIndex( (int) EOrder.SuddenHidden ); - if ( sh <= 3 ) + case (int)EOrder.SuddenHidden: + int sh = (int)GetIndex((int)EOrder.SuddenHidden); + if (sh <= 3) { - CDTXMania.app.ConfigIni.bSudden[ nCurrentTarget ] = ( ( sh & 1 ) > 0 ) ? true : false; - CDTXMania.app.ConfigIni.bHidden[ nCurrentTarget ] = ( ( sh & 2 ) > 0 ) ? true : false; - CDTXMania.app.ConfigIni.eInvisible[ nCurrentTarget ] = EInvisible.OFF; + CDTXMania.app.ConfigIni.bSudden[nCurrentTarget] = ((sh & 1) > 0) ? true : false; + CDTXMania.app.ConfigIni.bHidden[nCurrentTarget] = ((sh & 2) > 0) ? true : false; + CDTXMania.app.ConfigIni.eInvisible[nCurrentTarget] = EInvisible.OFF; } else { - CDTXMania.app.ConfigIni.bSudden[ nCurrentTarget ] = CDTXMania.app.ConfigIni.bHidden[ nCurrentTarget ] = false; - CDTXMania.app.ConfigIni.eInvisible[ nCurrentTarget ] = ( EInvisible ) ( sh - 3 ); + CDTXMania.app.ConfigIni.bSudden[nCurrentTarget] = CDTXMania.app.ConfigIni.bHidden[nCurrentTarget] = false; + CDTXMania.app.ConfigIni.eInvisible[nCurrentTarget] = (EInvisible)(sh - 3); } break; - case (int) EOrder.AutoGhost: // #35411 chnmr0 AUTOゴーストデータ - EAutoGhostData gd = (EAutoGhostData)GetIndex((int)EOrder.AutoGhost); - CDTXMania.app.ConfigIni.eAutoGhost[ nCurrentTarget ] = gd; - break; - - case (int)EOrder.TargetGhost: // #35411 chnmr0 ターゲットゴーストデータ - ETargetGhostData gtd = (ETargetGhostData)GetIndex((int)EOrder.TargetGhost); - CDTXMania.app.ConfigIni.eTargetGhost[ nCurrentTarget ] = gtd; - break; - - case (int) EOrder.ConfSet: // CONF-SET切り替え - nCurrentConfigSet = (int) GetIndex( (int) EOrder.ConfSet ); + case (int)EOrder.AutoGhost: // #35411 chnmr0 AUTOゴーストデータ + EAutoGhostData gd = (EAutoGhostData)GetIndex((int)EOrder.AutoGhost); + CDTXMania.app.ConfigIni.eAutoGhost[nCurrentTarget] = gd; + break; + + case (int)EOrder.TargetGhost: // #35411 chnmr0 ターゲットゴーストデータ + ETargetGhostData gtd = (ETargetGhostData)GetIndex((int)EOrder.TargetGhost); + CDTXMania.app.ConfigIni.eTargetGhost[nCurrentTarget] = gtd; + break; + + case (int)EOrder.ConfSet: // CONF-SET切り替え + nCurrentConfigSet = (int)GetIndex((int)EOrder.ConfSet); //Initialize( lci[ nCurrentConfigSet ], true, QuickCfgTitle, pos ); break; - case (int) EOrder.More: + case (int)EOrder.More: SetAutoParameters(); // 簡易CONFIGメニュー脱出に伴い、簡易CONFIG内のAUTOの設定をConfigIniクラスに反映する this.bGotoDetailConfig = true; this.tDeativatePopupMenu(); break; - case (int) EOrder.Return: + case (int)EOrder.Return: SetAutoParameters(); // 簡易CONFIGメニュー脱出に伴い、簡易CONFIG内のAUTOの設定をConfigIniクラスに反映する this.tDeativatePopupMenu(); - break; - default: - break; - } + break; + default: + break; + } } public override void tCancel() @@ -426,29 +426,29 @@ namespace DTXMania /// /// 設定項目リストの順番 /// 設定値(index) - private void SetValueToAllTarget( int order, int index ) + private void SetValueToAllTarget(int order, int index) { - for ( int i = 0; i < 3; i++ ) + for (int i = 0; i < 3; i++) { - lci[ nCurrentConfigSet ][ i ][ order ].SetIndex( index ); + lci[nCurrentConfigSet][i][order].SetIndex(index); } } - + /// /// ConfigIni.bAutoPlayに簡易CONFIGの状態を反映する /// private void SetAutoParameters() { - for ( int target = 0; target < 3; target++ ) + for (int target = 0; target < 3; target++) { - string str = GetAutoParameters( target ); - int[] pa = { (int) Eレーン.LC, (int) Eレーン.GtR, (int) Eレーン.BsR }; - int start = pa[ target ]; + string str = GetAutoParameters(target); + int[] pa = { (int)Eレーン.LC, (int)Eレーン.GtR, (int)Eレーン.BsR }; + int start = pa[target]; - for ( int i = 0; i < str.Length; i++ ) + for (int i = 0; i < str.Length; i++) { - CDTXMania.app.ConfigIni.bAutoPlay[ i + start ] = ( str[ i ] == 'A' ) ? true : false; + CDTXMania.app.ConfigIni.bAutoPlay[i + start] = (str[i] == 'A') ? true : false; } } } @@ -458,14 +458,14 @@ namespace DTXMania /// /// 対象楽器 /// AutoならA,さもなくば_。この文字が複数並んだ文字列。 - private string GetAutoParameters( int target ) + private string GetAutoParameters(int target) { string s = ""; - switch ( target ) + switch (target) { #region [ DRUMS ] - case (int) E楽器パート.DRUMS: - switch ( lci[ nCurrentConfigSet ][ target ][ (int) EOrder.AutoMode ].GetIndex() ) + case (int)E楽器パート.DRUMS: + switch (lci[nCurrentConfigSet][target][(int)EOrder.AutoMode].GetIndex()) { case 0: // All Auto s = "AAAAAAAA"; @@ -477,9 +477,9 @@ namespace DTXMania s = "___A____"; break; case 3: // Custom - for ( int i = 0; i < 8; i++ ) + for (int i = 0; i < 8; i++) { - s += ( CDTXMania.app.ConfigIni.bAutoPlay[ i ] ) ? "A" : "_"; + s += (CDTXMania.app.ConfigIni.bAutoPlay[i]) ? "A" : "_"; } break; case 4: // OFF @@ -491,10 +491,10 @@ namespace DTXMania break; #endregion #region [ Guitar / Bass ] - case (int) E楽器パート.GUITAR: - case (int) E楽器パート.BASS: -// s = ( lci[ nCurrentConfigSet ][ target ][ (int) EOrder.AutoMode ].GetIndex() ) == 1 ? "A" : "_"; - switch ( lci[ nCurrentConfigSet ][ target ][ (int) EOrder.AutoMode ].GetIndex() ) + case (int)E楽器パート.GUITAR: + case (int)E楽器パート.BASS: + // s = ( lci[ nCurrentConfigSet ][ target ][ (int) EOrder.AutoMode ].GetIndex() ) == 1 ? "A" : "_"; + switch (lci[nCurrentConfigSet][target][(int)EOrder.AutoMode].GetIndex()) { case 0: // All Auto s = "AAAAA"; @@ -506,11 +506,11 @@ namespace DTXMania s = "___A_"; break; case 3: // Custom - int p = (target == (int) E楽器パート.GUITAR ) ? (int) Eレーン.GtR : (int) Eレーン.BsR; - int len = (int) Eレーン.GtW - (int) Eレーン.GtR + 1; - for ( int i = p; i < p + len; i++ ) + int p = (target == (int)E楽器パート.GUITAR) ? (int)Eレーン.GtR : (int)Eレーン.BsR; + int len = (int)Eレーン.GtW - (int)Eレーン.GtR + 1; + for (int i = p; i < p + len; i++) { - s += ( CDTXMania.app.ConfigIni.bAutoPlay[ i ] ) ? "A" : "_"; + s += (CDTXMania.app.ConfigIni.bAutoPlay[i]) ? "A" : "_"; } break; case 4: // OFF @@ -532,13 +532,13 @@ namespace DTXMania public override void On活性化() { - this.ft表示用フォント = new Font( "Arial", 26f * Scale.Y, FontStyle.Bold, GraphicsUnit.Pixel ); + this.ft表示用フォント = new Font("Arial", 26f * Scale.Y, FontStyle.Bold, GraphicsUnit.Pixel); base.On活性化(); this.bGotoDetailConfig = false; } public override void On非活性化() { - if ( this.ft表示用フォント != null ) + if (this.ft表示用フォント != null) { this.ft表示用フォント.Dispose(); this.ft表示用フォント = null; @@ -547,22 +547,22 @@ namespace DTXMania } public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - string pathパネル本体 = CSkin.Path( @"Graphics\ScreenSelect popup auto settings.png" ); - if ( File.Exists( pathパネル本体 ) ) + string pathパネル本体 = CSkin.Path(@"Graphics\ScreenSelect popup auto settings.png"); + if (File.Exists(pathパネル本体)) { - this.txパネル本体 = TextureFactory.tテクスチャの生成( pathパネル本体, true ); + this.txパネル本体 = TextureFactory.tテクスチャの生成(pathパネル本体, true); } base.OnManagedリソースの作成(); } } public override void OnManagedリソースの解放() { - if ( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.txパネル本体 ); - TextureFactory.tテクスチャの解放( ref this.tx文字列パネル ); + TextureFactory.tテクスチャの解放(ref this.txパネル本体); + TextureFactory.tテクスチャの解放(ref this.tx文字列パネル); base.OnManagedリソースの解放(); } } @@ -576,14 +576,14 @@ namespace DTXMania { Target = 0, AutoMode, - // AutoLane, + // AutoLane, ScrollSpeed, Dark, Risky, PlaySpeed, SuddenHidden, - AutoGhost, - TargetGhost, + AutoGhost, + TargetGhost, ConfSet, More, Return, END, diff --git a/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectShowCurrentPosition.cs b/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectShowCurrentPosition.cs index e3e99713..4fd44c7a 100644 --- a/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectShowCurrentPosition.cs +++ b/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectShowCurrentPosition.cs @@ -21,7 +21,7 @@ namespace DTXMania public override void On活性化() { - if ( this.b活性化してる ) + if (this.b活性化してる) return; base.On活性化(); @@ -32,27 +32,27 @@ namespace DTXMania } public override void OnManagedリソースの作成() { - if ( !base.b活性化してない ) + if (!base.b活性化してない) { - string pathScrollBar = CSkin.Path( @"Graphics\ScreenSelect scrollbar.png" ); - string pathScrollPosition = CSkin.Path( @"Graphics\ScreenSelect scrollbar.png" ); - if ( File.Exists( pathScrollBar ) ) + string pathScrollBar = CSkin.Path(@"Graphics\ScreenSelect scrollbar.png"); + string pathScrollPosition = CSkin.Path(@"Graphics\ScreenSelect scrollbar.png"); + if (File.Exists(pathScrollBar)) { - this.txScrollBar = TextureFactory.tテクスチャの生成( pathScrollBar, false ); + this.txScrollBar = TextureFactory.tテクスチャの生成(pathScrollBar, false); } - if ( File.Exists( pathScrollPosition ) ) + if (File.Exists(pathScrollPosition)) { - this.txScrollPosition = TextureFactory.tテクスチャの生成( pathScrollPosition, false ); + this.txScrollPosition = TextureFactory.tテクスチャの生成(pathScrollPosition, false); } base.OnManagedリソースの作成(); } } public override void OnManagedリソースの解放() { - if ( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.t安全にDisposeする( ref this.txScrollBar ); - TextureFactory.t安全にDisposeする( ref this.txScrollPosition ); + TextureFactory.t安全にDisposeする(ref this.txScrollBar); + TextureFactory.t安全にDisposeする(ref this.txScrollPosition); base.OnManagedリソースの解放(); } @@ -60,15 +60,15 @@ namespace DTXMania public override int On進行描画() { #region [ スクロールバーの描画 #27648 ] - if ( this.txScrollBar != null ) + if (this.txScrollBar != null) { - for ( int sy = 0; sy < (int)(336 * Scale.Y); sy += (int)(128 * Scale.Y)) + for (int sy = 0; sy < (int)(336 * Scale.Y); sy += (int)(128 * Scale.Y)) { - int ry = ( sy / (int)(128 * Scale.Y) ); - int h = ( ( ry + 1 ) * (int)(128 * Scale.Y) > (int)(336 * Scale.Y) ) ? (int)(336 * Scale.Y)- ry * (int)(128 * Scale.Y) : (int)(128 * Scale.Y); + int ry = (sy / (int)(128 * Scale.Y)); + int h = ((ry + 1) * (int)(128 * Scale.Y) > (int)(336 * Scale.Y)) ? (int)(336 * Scale.Y) - ry * (int)(128 * Scale.Y) : (int)(128 * Scale.Y); this.txScrollBar.t2D描画( CDTXMania.app.Device, - SampleFramework.GameWindowSize.Width- 12 * Scale.X, + SampleFramework.GameWindowSize.Width - 12 * Scale.X, 58 * Scale.Y + sy, new Rectangle( (int)(ry * 12 * Scale.X), @@ -81,10 +81,10 @@ namespace DTXMania } #endregion #region [ スクロール地点の描画 (計算はCActSelect曲リストで行う。スクロール位置と選曲項目の同期のため。)#27648 ] - if ( this.txScrollPosition != null ) + if (this.txScrollPosition != null) { int py = CDTXMania.app.stage選曲.nスクロールバー相対y座標; - if ( py <= 336 * Scale.Y - 6 - 8 && py >= 0 ) + if (py <= 336 * Scale.Y - 6 - 8 && py >= 0) { this.txScrollPosition.t2D描画( CDTXMania.app.Device, diff --git a/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectステータスパネル.cs b/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectステータスパネル.cs index 3034651d..8f032c7a 100644 --- a/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectステータスパネル.cs +++ b/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelectステータスパネル.cs @@ -18,30 +18,30 @@ namespace DTXMania { C曲リストノード c曲リストノード = CDTXMania.app.stage選曲.r現在選択中の曲; Cスコア cスコア = CDTXMania.app.stage選曲.r現在選択中のスコア; - if( ( c曲リストノード != null ) && ( cスコア != null ) ) + if ((c曲リストノード != null) && (cスコア != null)) { this.n現在選択中の曲の難易度 = CDTXMania.app.stage選曲.n現在選択中の曲の難易度; - for( int i = 0; i < 3; i++ ) + for (int i = 0; i < 3; i++) { - int nLevel = cスコア.譜面情報.レベル[ i ]; - if( nLevel < 0 ) + int nLevel = cスコア.譜面情報.レベル[i]; + if (nLevel < 0) { nLevel = 0; } - if( nLevel > 99 ) + if (nLevel > 99) { nLevel = 99; } - this.n現在選択中の曲のレベル[ i ] = nLevel; - this.n現在選択中の曲の最高ランク[ i ] = cスコア.譜面情報.最大ランク[ i ]; - this.b現在選択中の曲がフルコンボ[ i ] = cスコア.譜面情報.フルコンボ[ i ]; - this.db現在選択中の曲の最高スキル値[ i ] = cスコア.譜面情報.最大スキル[ i ]; + this.n現在選択中の曲のレベル[i] = nLevel; + this.n現在選択中の曲の最高ランク[i] = cスコア.譜面情報.最大ランク[i]; + this.b現在選択中の曲がフルコンボ[i] = cスコア.譜面情報.フルコンボ[i]; + this.db現在選択中の曲の最高スキル値[i] = cスコア.譜面情報.最大スキル[i]; } - for( int i = 0; i < 5; i++ ) + for (int i = 0; i < 5; i++) { - this.str難易度ラベル[ i ] = c曲リストノード.ar難易度ラベル[ i ]; + this.str難易度ラベル[i] = c曲リストノード.ar難易度ラベル[i]; } - if( this.r直前の曲 != c曲リストノード ) + if (this.r直前の曲 != c曲リストノード) { this.n難易度開始文字位置 = 0; } @@ -57,16 +57,16 @@ namespace DTXMania this.n本体X = (int)(3 * Scale.X); this.n本体Y = (int)(0x15d * Scale.Y); this.n現在選択中の曲の難易度 = 0; - for( int i = 0; i < 3; i++ ) + for (int i = 0; i < 3; i++) { - this.n現在選択中の曲のレベル[ i ] = 0; - this.n現在選択中の曲の最高ランク[ i ] = (int)CScoreIni.ERANK.UNKNOWN; - this.b現在選択中の曲がフルコンボ[ i ] = false; - this.db現在選択中の曲の最高スキル値[ i ] = 0.0; + this.n現在選択中の曲のレベル[i] = 0; + this.n現在選択中の曲の最高ランク[i] = (int)CScoreIni.ERANK.UNKNOWN; + this.b現在選択中の曲がフルコンボ[i] = false; + this.db現在選択中の曲の最高スキル値[i] = 0.0; } - for( int j = 0; j < 5; j++ ) + for (int j = 0; j < 5; j++) { - this.str難易度ラベル[ j ] = ""; + this.str難易度ラベル[j] = ""; } this.n難易度開始文字位置 = 0; this.r直前の曲 = null; @@ -81,39 +81,39 @@ namespace DTXMania } public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - this.txパネル本体 = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenSelect status panel.png" ), true ); - this.txレベル数字 = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenSelect level numbers.png" ), false ); - this.txスキルゲージ = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenSelect skill gauge.png" ), false ); - this.txゲージ用数字他 = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenSelect skill number on gauge etc.png" ), false ); - this.tx難易度用矢印 = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenSelect triangle arrow.png" ), false ); + this.txパネル本体 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenSelect status panel.png"), true); + this.txレベル数字 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenSelect level numbers.png"), false); + this.txスキルゲージ = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenSelect skill gauge.png"), false); + this.txゲージ用数字他 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenSelect skill number on gauge etc.png"), false); + this.tx難易度用矢印 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenSelect triangle arrow.png"), false); base.OnManagedリソースの作成(); } } public override void OnManagedリソースの解放() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.txパネル本体 ); - TextureFactory.tテクスチャの解放( ref this.txレベル数字 ); - TextureFactory.tテクスチャの解放( ref this.txスキルゲージ ); - TextureFactory.tテクスチャの解放( ref this.txゲージ用数字他 ); - TextureFactory.tテクスチャの解放( ref this.tx難易度用矢印 ); + TextureFactory.tテクスチャの解放(ref this.txパネル本体); + TextureFactory.tテクスチャの解放(ref this.txレベル数字); + TextureFactory.tテクスチャの解放(ref this.txスキルゲージ); + TextureFactory.tテクスチャの解放(ref this.txゲージ用数字他); + TextureFactory.tテクスチャの解放(ref this.tx難易度用矢印); base.OnManagedリソースの解放(); } } public override int On進行描画() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { #region [ 初めての進行描画 ] //----------------- - if( base.b初めての進行描画 ) + if (base.b初めての進行描画) { - this.ct登場アニメ用 = new CCounter( 0, 100, 5, CDTXMania.app.Timer ); - this.ct難易度スクロール用 = new CCounter( 0, 20, 1, CDTXMania.app.Timer ); - this.ct難易度矢印用 = new CCounter( 0, 5, 80, CDTXMania.app.Timer ); + this.ct登場アニメ用 = new CCounter(0, 100, 5, CDTXMania.app.Timer); + this.ct難易度スクロール用 = new CCounter(0, 20, 1, CDTXMania.app.Timer); + this.ct難易度矢印用 = new CCounter(0, 5, 80, CDTXMania.app.Timer); base.b初めての進行描画 = false; } //----------------- @@ -124,41 +124,41 @@ namespace DTXMania this.ct登場アニメ用.t進行(); this.ct難易度スクロール用.t進行(); - if( this.ct難易度スクロール用.b終了値に達した ) + if (this.ct難易度スクロール用.b終了値に達した) { int num = this.n現在の難易度ラベルが完全表示されているかを調べてスクロール方向を返す(); - if( num < 0 ) + if (num < 0) { this.n難易度開始文字位置--; } - else if( num > 0 ) + else if (num > 0) { this.n難易度開始文字位置++; } this.ct難易度スクロール用.n現在の値 = 0; } - + this.ct難易度矢印用.t進行Loop(); - + // 描画 #region [ パネル本体の描画 ] //----------------- - if( this.txパネル本体 != null ) + if (this.txパネル本体 != null) { - if( this.ct登場アニメ用.b終了値に達した ) + if (this.ct登場アニメ用.b終了値に達した) { this.n本体X = (int)(3 * Scale.X); this.n本体Y = (int)(0x15d * Scale.Y); } else { - double num2 = ( (double) ( (int)(100 * Scale.X)- this.ct登場アニメ用.n現在の値 ) ) / 100.0; - double num3 = Math.Sin( Math.PI / 2 * num2 ); - this.n本体X = 3 - ( (int) ( ( this.txパネル本体.sz画像サイズ.Width * num3 ) * num3 ) ); + double num2 = ((double)((int)(100 * Scale.X) - this.ct登場アニメ用.n現在の値)) / 100.0; + double num3 = Math.Sin(Math.PI / 2 * num2); + this.n本体X = 3 - ((int)((this.txパネル本体.sz画像サイズ.Width * num3) * num3)); this.n本体Y = (int)(0x15d * Scale.Y); } - this.txパネル本体.t2D描画( CDTXMania.app.Device, this.n本体X, this.n本体Y ); + this.txパネル本体.t2D描画(CDTXMania.app.Device, this.n本体X, this.n本体Y); } //----------------- #endregion @@ -168,91 +168,91 @@ namespace DTXMania #region [ chArray ← 難易度文字列を並べたもの、index ← その文字数 ] //----------------- - char[] chArray = new char[ 0x100 ]; - C文字コンソール.Eフォント種別[] eフォント種別Array = new C文字コンソール.Eフォント種別[ 0x100 ]; + char[] chArray = new char[0x100]; + C文字コンソール.Eフォント種別[] eフォント種別Array = new C文字コンソール.Eフォント種別[0x100]; bool flag = false; bool flag2 = true; int index = 0; - for( int i = 0; i < 5; i++ ) + for (int i = 0; i < 5; i++) { - if( ( this.str難易度ラベル[ i ] != null ) && ( this.str難易度ラベル[ i ].Length > 0 ) ) + if ((this.str難易度ラベル[i] != null) && (this.str難易度ラベル[i].Length > 0)) { - string str = this.str難易度ラベル[ i ]; - char[] chArray2 = new char[ 0x100 ]; + string str = this.str難易度ラベル[i]; + char[] chArray2 = new char[0x100]; int num6 = 0; - while( ( num6 < 0xff ) && ( num6 < this.str難易度ラベル[ i ].Length ) ) + while ((num6 < 0xff) && (num6 < this.str難易度ラベル[i].Length)) { - chArray2[ num6 ] = str[ num6 ]; + chArray2[num6] = str[num6]; num6++; } - chArray2[ num6 ] = '\0'; - if( !flag2 ) + chArray2[num6] = '\0'; + if (!flag2) { - if( index < 0xff ) + if (index < 0xff) { - chArray[ index ] = ' '; - eフォント種別Array[ index ] = C文字コンソール.Eフォント種別.白; + chArray[index] = ' '; + eフォント種別Array[index] = C文字コンソール.Eフォント種別.白; index++; } - if( index < 0xff ) + if (index < 0xff) { - chArray[ index ] = ' '; - eフォント種別Array[ index ] = C文字コンソール.Eフォント種別.白; + chArray[index] = ' '; + eフォント種別Array[index] = C文字コンソール.Eフォント種別.白; index++; } } flag2 = false; num6 = 0; - while( ( chArray2[ num6 ] != '\0' ) && ( index < 0xff ) ) + while ((chArray2[num6] != '\0') && (index < 0xff)) { - chArray[ index ] = chArray2[ num6++ ]; - eフォント種別Array[ index ] = ( this.n現在選択中の曲の難易度 == i ) ? C文字コンソール.Eフォント種別.赤 : C文字コンソール.Eフォント種別.白; + chArray[index] = chArray2[num6++]; + eフォント種別Array[index] = (this.n現在選択中の曲の難易度 == i) ? C文字コンソール.Eフォント種別.赤 : C文字コンソール.Eフォント種別.白; index++; } - chArray[ index ] = '\0'; + chArray[index] = '\0'; } } //----------------- #endregion - if( index > 0 ) + if (index > 0) { int x = this.n本体X + (int)(20 * Scale.X); int y = this.n本体Y + (int)(0x10 * Scale.Y); index = this.n難易度開始文字位置; flag = true; - while( index < ( this.n難易度開始文字位置 + 55 ) ) // 0x24 -> 55 + while (index < (this.n難易度開始文字位置 + 55)) // 0x24 -> 55 { CDTXMania.app.act文字コンソール.tPrint( x, y + 5, - eフォント種別Array[ index ], - chArray[ index ].ToString() + eフォント種別Array[index], + chArray[index].ToString() ); x += 8 * 2; index++; - if( chArray[ index ] == '\0' ) + if (chArray[index] == '\0') { flag = false; break; } } - if( this.n難易度開始文字位置 > 0 ) + if (this.n難易度開始文字位置 > 0) { - int num9 = ( this.n本体X + (int)(12 * Scale.X) ) - (int)(this.ct難易度矢印用.n現在の値 * Scale.X); - int num10 = ( this.n本体Y + (int)(0x10 * Scale.Y) ) + (int)(5 * Scale.Y); - if( this.tx難易度用矢印 != null ) + int num9 = (this.n本体X + (int)(12 * Scale.X)) - (int)(this.ct難易度矢印用.n現在の値 * Scale.X); + int num10 = (this.n本体Y + (int)(0x10 * Scale.Y)) + (int)(5 * Scale.Y); + if (this.tx難易度用矢印 != null) { - this.tx難易度用矢印.t2D描画( CDTXMania.app.Device, num9, num10, new Rectangle( 0, 0, (int)(8 * Scale.X), (int)(0x10 * Scale.Y) ) ); + this.tx難易度用矢印.t2D描画(CDTXMania.app.Device, num9, num10, new Rectangle(0, 0, (int)(8 * Scale.X), (int)(0x10 * Scale.Y))); } } - if( flag ) + if (flag) { - int num11 = ( ( this.n本体X + (int)(20 * Scale.X) ) + (int)(0x120 * Scale.X) ) + (int)(this.ct難易度矢印用.n現在の値 * Scale.Y); - int num12 = ( this.n本体Y + (int)(0x10 * Scale.Y) ) + (int)(5 * Scale.Y); - if( this.tx難易度用矢印 != null ) + int num11 = ((this.n本体X + (int)(20 * Scale.X)) + (int)(0x120 * Scale.X)) + (int)(this.ct難易度矢印用.n現在の値 * Scale.Y); + int num12 = (this.n本体Y + (int)(0x10 * Scale.Y)) + (int)(5 * Scale.Y); + if (this.tx難易度用矢印 != null) { - this.tx難易度用矢印.t2D描画( CDTXMania.app.Device, num11, num12, new Rectangle( (int)(8 * Scale.X), 0, (int)(8 * Scale.X), (int)(0x10 * Scale.Y) ) ); + this.tx難易度用矢印.t2D描画(CDTXMania.app.Device, num11, num12, new Rectangle((int)(8 * Scale.X), 0, (int)(8 * Scale.X), (int)(0x10 * Scale.Y))); } } } @@ -263,94 +263,94 @@ namespace DTXMania #region [ 選択曲の Lv の描画 ] //----------------- - if( ( cスコア != null ) && ( this.txレベル数字 != null ) ) + if ((cスコア != null) && (this.txレベル数字 != null)) { - for( int i = 0; i < 3; i++ ) + for (int i = 0; i < 3; i++) { - int[ , ] nDispPosYOffset = { { 0, (int) ( 21 * Scale.Y ), (int) ( 42 * Scale.Y ) }, { 0, (int) ( 42 * Scale.Y ), (int) ( 21 * Scale.Y ) } }; // #24063 2011.1.27 yyagi + int[,] nDispPosYOffset = { { 0, (int)(21 * Scale.Y), (int)(42 * Scale.Y) }, { 0, (int)(42 * Scale.Y), (int)(21 * Scale.Y) } }; // #24063 2011.1.27 yyagi Rectangle rect十の位; Rectangle rect一の位; - int nDispPosX = this.n本体X + (int) ( 66 * Scale.X ); - int nDispPosY = this.n本体Y + (int) ( 50 * Scale.Y ) + nDispPosYOffset[ ( CDTXMania.app.ConfigIni.bIsSwappedGuitarBass ? 1 : 0 ), i ]; - int nLevel = this.n現在選択中の曲のレベル[ i ]; - if( nLevel < 0 ) + int nDispPosX = this.n本体X + (int)(66 * Scale.X); + int nDispPosY = this.n本体Y + (int)(50 * Scale.Y) + nDispPosYOffset[(CDTXMania.app.ConfigIni.bIsSwappedGuitarBass ? 1 : 0), i]; + int nLevel = this.n現在選択中の曲のレベル[i]; + if (nLevel < 0) { nLevel = 0; } - else if( nLevel > 99 ) + else if (nLevel > 99) { nLevel = 99; } // Lv25刻みで、白→オレンジ→黄色→赤、と色を変える // - int nRectOffsetX = ( ( nLevel / 25 ) < 2 ) ? (int) ( 64 * Scale.X ) : 0; - int nRectOffsetY = ( ( ( nLevel / 25 ) % 2 ) == 0 ) ? (int) ( 64 * Scale.Y ) : 0; - if( nLevel == 0 ) + int nRectOffsetX = ((nLevel / 25) < 2) ? (int)(64 * Scale.X) : 0; + int nRectOffsetY = (((nLevel / 25) % 2) == 0) ? (int)(64 * Scale.Y) : 0; + if (nLevel == 0) { - rect十の位 = this.rc数字[ 11 ]; // "--" - rect一の位 = this.rc数字[ 11 ]; // "-- " + rect十の位 = this.rc数字[11]; // "--" + rect一の位 = this.rc数字[11]; // "-- " } - else if( cスコア.譜面情報.レベルを非表示にする ) + else if (cスコア.譜面情報.レベルを非表示にする) { - rect十の位 = this.rc数字[ 10 ]; // "?" - rect一の位 = this.rc数字[ 10 ]; // "?" + rect十の位 = this.rc数字[10]; // "?" + rect一の位 = this.rc数字[10]; // "?" } else { - rect十の位 = this.rc数字[ nLevel / 10 ]; - rect一の位 = this.rc数字[ nLevel % 10 ]; + rect十の位 = this.rc数字[nLevel / 10]; + rect一の位 = this.rc数字[nLevel % 10]; } rect十の位.X += nRectOffsetX; rect十の位.Y += nRectOffsetY; rect一の位.X += nRectOffsetX; rect一の位.Y += nRectOffsetY; - this.txレベル数字.t2D描画( CDTXMania.app.Device, nDispPosX, nDispPosY, rect十の位 ); - this.txレベル数字.t2D描画( CDTXMania.app.Device, nDispPosX + (int) ( 13 * Scale.X ), nDispPosY, rect一の位 ); + this.txレベル数字.t2D描画(CDTXMania.app.Device, nDispPosX, nDispPosY, rect十の位); + this.txレベル数字.t2D描画(CDTXMania.app.Device, nDispPosX + (int)(13 * Scale.X), nDispPosY, rect一の位); } } //----------------- #endregion #region [ 選択曲の 最高スキル値ゲージ+数値の描画 ] //----------------- - for( int i = 0; i < 3; i++ ) + for (int i = 0; i < 3; i++) { - int[ , ] nDispPosYOffset = { { 0, (int) ( 21 * Scale.Y ), (int) ( 42 * Scale.Y ) }, { 0, (int) ( 42 * Scale.Y ), (int) ( 21 * Scale.Y ) } }; // #24063 2011.1.27 yyagi - if ( this.n現在選択中の曲のレベル[ i ] != 0 ) + int[,] nDispPosYOffset = { { 0, (int)(21 * Scale.Y), (int)(42 * Scale.Y) }, { 0, (int)(42 * Scale.Y), (int)(21 * Scale.Y) } }; // #24063 2011.1.27 yyagi + if (this.n現在選択中の曲のレベル[i] != 0) { - double dMaxSkill = this.db現在選択中の曲の最高スキル値[ i ]; - if( dMaxSkill != 0.0 ) + double dMaxSkill = this.db現在選択中の曲の最高スキル値[i]; + if (dMaxSkill != 0.0) { int nDispPosX = this.n本体X + (int)(100 * Scale.X); - int nDispPosY = this.n本体Y + (int)(53 * Scale.Y) + nDispPosYOffset[ ( CDTXMania.app.ConfigIni.bIsSwappedGuitarBass ? 1 : 0 ), i ]; - this.txスキルゲージ.t2D描画( CDTXMania.app.Device, nDispPosX, nDispPosY, - new Rectangle( 0, 0, (int) ( 170.0 * Scale.X * dMaxSkill / 100.0 ), (int) ( 10 * Scale.Y ) ) ); + int nDispPosY = this.n本体Y + (int)(53 * Scale.Y) + nDispPosYOffset[(CDTXMania.app.ConfigIni.bIsSwappedGuitarBass ? 1 : 0), i]; + this.txスキルゲージ.t2D描画(CDTXMania.app.Device, nDispPosX, nDispPosY, + new Rectangle(0, 0, (int)(170.0 * Scale.X * dMaxSkill / 100.0), (int)(10 * Scale.Y))); } - string sMaxSkillString = dMaxSkill.ToString( "##0.00" ); + string sMaxSkillString = dMaxSkill.ToString("##0.00"); int nMaxSkillStringWidth = 0; - foreach( char ch in sMaxSkillString ) + foreach (char ch in sMaxSkillString) { - for( int j = 0; j < 12; j++ ) + for (int j = 0; j < 12; j++) { - if( ch == this.st数字[ j ].ch ) + if (ch == this.st数字[j].ch) { - nMaxSkillStringWidth += this.st数字[ j ].rc.Width - 1; + nMaxSkillStringWidth += this.st数字[j].rc.Width - 1; break; } } } - int x = this.n本体X + (int) ( 182 * Scale.X ) - nMaxSkillStringWidth / 2; - int y = this.n本体Y + (int) ( 53 * Scale.Y ) + nDispPosYOffset[ ( CDTXMania.app.ConfigIni.bIsSwappedGuitarBass ? 1 : 0 ), i ]; - foreach( char ch in sMaxSkillString ) + int x = this.n本体X + (int)(182 * Scale.X) - nMaxSkillStringWidth / 2; + int y = this.n本体Y + (int)(53 * Scale.Y) + nDispPosYOffset[(CDTXMania.app.ConfigIni.bIsSwappedGuitarBass ? 1 : 0), i]; + foreach (char ch in sMaxSkillString) { - for( int j = 0; j < 12; j++ ) + for (int j = 0; j < 12; j++) { - if( ch == this.st数字[ j ].ch ) + if (ch == this.st数字[j].ch) { - if( this.txゲージ用数字他 != null ) + if (this.txゲージ用数字他 != null) { - this.txゲージ用数字他.t2D描画( CDTXMania.app.Device, x, y, this.st数字[ j ].rc ); + this.txゲージ用数字他.t2D描画(CDTXMania.app.Device, x, y, this.st数字[j].rc); } - x += this.st数字[ j ].rc.Width - 1; + x += this.st数字[j].rc.Width - 1; break; } } @@ -358,11 +358,11 @@ namespace DTXMania } else { - int x = this.n本体X + (int) ( ( 182 - 20 ) * Scale.X ); - int y = this.n本体Y + (int) ( 53 * Scale.Y ) + nDispPosYOffset[ ( CDTXMania.app.ConfigIni.bIsSwappedGuitarBass ? 1 : 0 ), i ]; - if( this.txゲージ用数字他 != null ) + int x = this.n本体X + (int)((182 - 20) * Scale.X); + int y = this.n本体Y + (int)(53 * Scale.Y) + nDispPosYOffset[(CDTXMania.app.ConfigIni.bIsSwappedGuitarBass ? 1 : 0), i]; + if (this.txゲージ用数字他 != null) { - this.txゲージ用数字他.t2D描画( CDTXMania.app.Device, x, y, new Rectangle( 0, (int) ( 22 * Scale.Y ), (int) ( 42 * Scale.X ), (int) ( 10 * Scale.Y ) ) ); + this.txゲージ用数字他.t2D描画(CDTXMania.app.Device, x, y, new Rectangle(0, (int)(22 * Scale.Y), (int)(42 * Scale.X), (int)(10 * Scale.Y))); } } } @@ -370,25 +370,25 @@ namespace DTXMania #endregion #region [ 選択曲の 最高ランクの描画 ] //----------------- - for( int i = 0; i < 3; i++ ) + for (int i = 0; i < 3; i++) { - int nMaxRank = this.n現在選択中の曲の最高ランク[ i ]; - if( nMaxRank != 99 ) + int nMaxRank = this.n現在選択中の曲の最高ランク[i]; + if (nMaxRank != 99) { - if ( nMaxRank < 0 ) + if (nMaxRank < 0) { nMaxRank = 0; } - if( nMaxRank > 6 ) + if (nMaxRank > 6) { nMaxRank = 6; } - int[ , ] nDispPosYOffset = { { 0, (int) ( 21 * Scale.Y ), (int) ( 42 * Scale.Y ) }, { 0, (int) ( 42 * Scale.Y ), (int) ( 21 * Scale.Y ) } }; // #24063 2011.1.27 yyagi - int x = this.n本体X + (int) ( 278 * Scale.X ); - int y = this.n本体Y + (int) ( 55 * Scale.Y ) + nDispPosYOffset[ ( CDTXMania.app.ConfigIni.bIsSwappedGuitarBass ? 1 : 0 ), i ]; - if( this.txゲージ用数字他 != null ) + int[,] nDispPosYOffset = { { 0, (int)(21 * Scale.Y), (int)(42 * Scale.Y) }, { 0, (int)(42 * Scale.Y), (int)(21 * Scale.Y) } }; // #24063 2011.1.27 yyagi + int x = this.n本体X + (int)(278 * Scale.X); + int y = this.n本体Y + (int)(55 * Scale.Y) + nDispPosYOffset[(CDTXMania.app.ConfigIni.bIsSwappedGuitarBass ? 1 : 0), i]; + if (this.txゲージ用数字他 != null) { - this.txゲージ用数字他.t2D描画( CDTXMania.app.Device, x, y, this.rcランク[ nMaxRank ] ); + this.txゲージ用数字他.t2D描画(CDTXMania.app.Device, x, y, this.rcランク[nMaxRank]); } } } @@ -396,17 +396,17 @@ namespace DTXMania #endregion #region [ 選択曲の FullCombo の 描画 ] //----------------- - Rectangle rectFullCombo = new Rectangle( (int) ( 30 * Scale.X ), (int) ( 32 * Scale.Y ), (int) ( 30 * Scale.X ), (int) ( 16 * Scale.Y ) ); - for( int i = 0; i < 3; i++ ) + Rectangle rectFullCombo = new Rectangle((int)(30 * Scale.X), (int)(32 * Scale.Y), (int)(30 * Scale.X), (int)(16 * Scale.Y)); + for (int i = 0; i < 3; i++) { - if( this.b現在選択中の曲がフルコンボ[ i ] ) + if (this.b現在選択中の曲がフルコンボ[i]) { - int[ , ] nDispPosYOffset = { { 0, (int) ( 21 * Scale.Y ), (int) ( 42 * Scale.Y ) }, { 0, (int) ( 42 * Scale.Y ), (int) ( 21 * Scale.Y ) } }; // #24063 2011.1.27 yyagi + int[,] nDispPosYOffset = { { 0, (int)(21 * Scale.Y), (int)(42 * Scale.Y) }, { 0, (int)(42 * Scale.Y), (int)(21 * Scale.Y) } }; // #24063 2011.1.27 yyagi int x = this.n本体X + (int)(290 * Scale.X); - int y = this.n本体Y + (int)(53 * Scale.Y) + nDispPosYOffset[ (CDTXMania.app.ConfigIni.bIsSwappedGuitarBass ? 1 : 0), i ]; - if( this.txゲージ用数字他 != null ) + int y = this.n本体Y + (int)(53 * Scale.Y) + nDispPosYOffset[(CDTXMania.app.ConfigIni.bIsSwappedGuitarBass ? 1 : 0), i]; + if (this.txゲージ用数字他 != null) { - this.txゲージ用数字他.t2D描画( CDTXMania.app.Device, x, y, rectFullCombo ); + this.txゲージ用数字他.t2D描画(CDTXMania.app.Device, x, y, rectFullCombo); } } } @@ -421,12 +421,12 @@ namespace DTXMania #region [ private ] //----------------- - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] private struct ST数字 { public char ch; public Rectangle rc; - public ST数字( char ch, Rectangle rc ) + public ST数字(char ch, Rectangle rc) { this.ch = ch; this.rc = rc; @@ -494,34 +494,34 @@ namespace DTXMania { int num = 0; int length = 0; - for( int i = 0; i < 5; i++ ) + for (int i = 0; i < 5; i++) { - if( ( this.str難易度ラベル[ i ] != null ) && ( this.str難易度ラベル[ i ].Length > 0 ) ) + if ((this.str難易度ラベル[i] != null) && (this.str難易度ラベル[i].Length > 0)) { - length = this.str難易度ラベル[ i ].Length; + length = this.str難易度ラベル[i].Length; } - if( this.n現在選択中の曲の難易度 == i ) + if (this.n現在選択中の曲の難易度 == i) { break; } - if( ( this.str難易度ラベル[ i ] != null ) && ( this.str難易度ラベル.Length > 0 ) ) + if ((this.str難易度ラベル[i] != null) && (this.str難易度ラベル.Length > 0)) { num += length + 2; } } - if( num >= ( this.n難易度開始文字位置 + 55 ) ) // 0x24 -> 55 + if (num >= (this.n難易度開始文字位置 + 55)) // 0x24 -> 55 { return 1; } - if( ( num + length ) <= this.n難易度開始文字位置 ) + if ((num + length) <= this.n難易度開始文字位置) { return -1; } - if( ( ( num + length ) - 1 ) >= ( this.n難易度開始文字位置 + 55 ) ) // 0x24 -> 55 + if (((num + length) - 1) >= (this.n難易度開始文字位置 + 55)) // 0x24 -> 55 { return 1; } - if( num < this.n難易度開始文字位置 ) + if (num < this.n難易度開始文字位置) { return -1; } diff --git a/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelect演奏履歴パネル.cs b/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelect演奏履歴パネル.cs index fd7bf580..665f92a2 100644 --- a/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelect演奏履歴パネル.cs +++ b/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelect演奏履歴パネル.cs @@ -22,28 +22,28 @@ namespace DTXMania { try { - Bitmap image = new Bitmap( (int)(400 * Scale.X), (int)(130 * Scale.Y) ); - Graphics graphics = Graphics.FromImage( image ); + Bitmap image = new Bitmap((int)(400 * Scale.X), (int)(130 * Scale.Y)); + Graphics graphics = Graphics.FromImage(image); graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias; - for ( int i = 0; i < 5; i++ ) + for (int i = 0; i < 5; i++) { - if( ( cスコア.譜面情報.演奏履歴[ i ] != null ) && ( cスコア.譜面情報.演奏履歴[ i ].Length > 0 ) ) + if ((cスコア.譜面情報.演奏履歴[i] != null) && (cスコア.譜面情報.演奏履歴[i].Length > 0)) { - graphics.DrawString( cスコア.譜面情報.演奏履歴[ i ], this.ft表示用フォント, Brushes.Yellow, (float) 0f, (float) ( i * 24f * Scale.Y ) ); + graphics.DrawString(cスコア.譜面情報.演奏履歴[i], this.ft表示用フォント, Brushes.Yellow, (float)0f, (float)(i * 24f * Scale.Y)); } } graphics.Dispose(); - if( this.tx文字列パネル != null ) + if (this.tx文字列パネル != null) { this.tx文字列パネル.Dispose(); } - this.tx文字列パネル = new CTexture( CDTXMania.app.Device, image, CDTXMania.app.TextureFormat ); - this.tx文字列パネル.vc拡大縮小倍率 = new Vector3( 0.5f, 0.5f, 1f ); + this.tx文字列パネル = new CTexture(CDTXMania.app.Device, image, CDTXMania.app.TextureFormat); + this.tx文字列パネル.vc拡大縮小倍率 = new Vector3(0.5f, 0.5f, 1f); image.Dispose(); } - catch( CTextureCreateFailedException ) + catch (CTextureCreateFailedException) { - Trace.TraceError( "演奏履歴文字列テクスチャの作成に失敗しました。" ); + Trace.TraceError("演奏履歴文字列テクスチャの作成に失敗しました。"); this.tx文字列パネル = null; } } @@ -56,12 +56,12 @@ namespace DTXMania { this.n本体X = (int)(0x195 * Scale.X); this.n本体Y = (int)(0x174 * Scale.Y); - this.ft表示用フォント = new Font( "Arial", 26f * Scale.Y, FontStyle.Bold, GraphicsUnit.Pixel ); + this.ft表示用フォント = new Font("Arial", 26f * Scale.Y, FontStyle.Bold, GraphicsUnit.Pixel); base.On活性化(); } public override void On非活性化() { - if( this.ft表示用フォント != null ) + if (this.ft表示用フォント != null) { this.ft表示用フォント.Dispose(); this.ft表示用フォント = null; @@ -71,56 +71,56 @@ namespace DTXMania } public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - this.txパネル本体 = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenSelect play history panel.png" ), true ); + this.txパネル本体 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenSelect play history panel.png"), true); this.t選択曲が変更された(); base.OnManagedリソースの作成(); } } public override void OnManagedリソースの解放() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.txパネル本体 ); - TextureFactory.tテクスチャの解放( ref this.tx文字列パネル ); + TextureFactory.tテクスチャの解放(ref this.txパネル本体); + TextureFactory.tテクスチャの解放(ref this.tx文字列パネル); base.OnManagedリソースの解放(); } } public override int On進行描画() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - if( base.b初めての進行描画 ) + if (base.b初めての進行描画) { - this.ct登場アニメ用 = new CCounter( 0, 100, 5, CDTXMania.app.Timer ); + this.ct登場アニメ用 = new CCounter(0, 100, 5, CDTXMania.app.Timer); base.b初めての進行描画 = false; } this.ct登場アニメ用.t進行(); - if( this.ct登場アニメ用.b終了値に達した || ( this.txパネル本体 == null ) ) + if (this.ct登場アニメ用.b終了値に達した || (this.txパネル本体 == null)) { this.n本体X = (int)(0x195 * Scale.X); this.n本体Y = (int)(0x174 * Scale.Y); } else { - double num = ( (double) this.ct登場アニメ用.n現在の値 ) / 100.0; - double num2 = Math.Cos( ( 1.5 + ( 0.5 * num ) ) * Math.PI ); + double num = ((double)this.ct登場アニメ用.n現在の値) / 100.0; + double num2 = Math.Cos((1.5 + (0.5 * num)) * Math.PI); this.n本体X = (int)(0x195 * Scale.X); - this.n本体Y = (int)(0x174 * Scale.Y) + ( (int) ( this.txパネル本体.sz画像サイズ.Height * ( 1.0 - ( num2 * num2 ) ) ) ); + this.n本体Y = (int)(0x174 * Scale.Y) + ((int)(this.txパネル本体.sz画像サイズ.Height * (1.0 - (num2 * num2)))); } - if( this.txパネル本体 != null ) + if (this.txパネル本体 != null) { - this.txパネル本体.t2D描画( CDTXMania.app.Device, this.n本体X, this.n本体Y ); + this.txパネル本体.t2D描画(CDTXMania.app.Device, this.n本体X, this.n本体Y); } - if( this.tx文字列パネル != null ) + if (this.tx文字列パネル != null) { - this.tx文字列パネル.t2D描画( CDTXMania.app.Device, this.n本体X + (int)(12 * Scale.X), this.n本体Y + (int)(0x13 * Scale.Y) ); + this.tx文字列パネル.t2D描画(CDTXMania.app.Device, this.n本体X + (int)(12 * Scale.X), this.n本体Y + (int)(0x13 * Scale.Y)); } } return 0; } - + // その他 diff --git a/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSortSongs.cs b/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSortSongs.cs index c115aed9..42e1936b 100644 --- a/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSortSongs.cs +++ b/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSortSongs.cs @@ -13,27 +13,27 @@ namespace DTXMania public CActSortSongs() { List lci = new List(); - lci.Add( new CItemList( "Title", CItemBase.Eパネル種別.通常, 0, "", "", new string[] { "Z,Y,X,...", "A,B,C,..." } ) ); - lci.Add( new CItemList( "Level", CItemBase.Eパネル種別.通常, 0, "", "", new string[] { "99,98,97,...", "1,2,3,..." } ) ); - lci.Add( new CItemList( "Best Rank", CItemBase.Eパネル種別.通常, 0, "", "", new string[] { "E,D,C,...", "SS,S,A,..." } ) ); - lci.Add( new CItemList( "PlayCount", CItemBase.Eパネル種別.通常, 0, "", "", new string[] { "10,9,8,...", "1,2,3,..." } ) ); - lci.Add( new CItemList( "Author", CItemBase.Eパネル種別.通常, 0, "", "", new string[] { "Z,Y,X,...", "A,B,C,..." } ) ); - lci.Add( new CItemList( "SkillPoint", CItemBase.Eパネル種別.通常, 0, "", "", new string[] { "100,99,98,...", "1,2,3,..." } ) ); + lci.Add(new CItemList("Title", CItemBase.Eパネル種別.通常, 0, "", "", new string[] { "Z,Y,X,...", "A,B,C,..." })); + lci.Add(new CItemList("Level", CItemBase.Eパネル種別.通常, 0, "", "", new string[] { "99,98,97,...", "1,2,3,..." })); + lci.Add(new CItemList("Best Rank", CItemBase.Eパネル種別.通常, 0, "", "", new string[] { "E,D,C,...", "SS,S,A,..." })); + lci.Add(new CItemList("PlayCount", CItemBase.Eパネル種別.通常, 0, "", "", new string[] { "10,9,8,...", "1,2,3,..." })); + lci.Add(new CItemList("Author", CItemBase.Eパネル種別.通常, 0, "", "", new string[] { "Z,Y,X,...", "A,B,C,..." })); + lci.Add(new CItemList("SkillPoint", CItemBase.Eパネル種別.通常, 0, "", "", new string[] { "100,99,98,...", "1,2,3,..." })); #if TEST_SORTBGM lci.Add( new CItemList( "BPM", CItemBase.Eパネル種別.通常, 0, "", "", new string[] { "300,200,...", "70,80,90,..." } ) ); #endif - lci.Add( new CItemList( "Date", CItemBase.Eパネル種別.通常, 0, "", "", new string[] { "Dec.31,30,...", "Jan.1,2,..." } ) ); - lci.Add( new CItemList( "Return", CItemBase.Eパネル種別.通常, 0, "", "", new string[] { "", "" } ) ); - - base.Initialize( lci, false, "SORT MENU" ); + lci.Add(new CItemList("Date", CItemBase.Eパネル種別.通常, 0, "", "", new string[] { "Dec.31,30,...", "Jan.1,2,..." })); + lci.Add(new CItemList("Return", CItemBase.Eパネル種別.通常, 0, "", "", new string[] { "", "" })); + + base.Initialize(lci, false, "SORT MENU"); } // メソッド - public void tActivatePopupMenu( E楽器パート einst, ref CActSelect曲リスト ca ) + public void tActivatePopupMenu(E楽器パート einst, ref CActSelect曲リスト ca) { - this.act曲リスト = ca; - base.tActivatePopupMenu( einst ); + this.act曲リスト = ca; + base.tActivatePopupMenu(einst); } //public void tDeativatePopupMenu() //{ @@ -41,52 +41,52 @@ namespace DTXMania //} - public override void tEnter押下Main( int nSortOrder ) + public override void tEnter押下Main(int nSortOrder) { nSortOrder *= 2; // 0,1 => -1, 1 nSortOrder -= 1; - switch ( n現在の選択行 ) + switch (n現在の選択行) { - case (int) EOrder.Title: + case (int)EOrder.Title: this.act曲リスト.t曲リストのソート( CDTXMania.app.Songs管理.t曲リストのソート2_タイトル順, eInst, nSortOrder ); this.act曲リスト.t選択曲が変更された(true); break; - case (int) EOrder.Level: + case (int)EOrder.Level: this.act曲リスト.t曲リストのソート( CDTXMania.app.Songs管理.t曲リストのソート4_LEVEL順, eInst, nSortOrder, this.act曲リスト.n現在のアンカ難易度レベル ); - this.act曲リスト.t選択曲が変更された( true ); + this.act曲リスト.t選択曲が変更された(true); break; - case (int) EOrder.BestRank: + case (int)EOrder.BestRank: this.act曲リスト.t曲リストのソート( CDTXMania.app.Songs管理.t曲リストのソート5_BestRank順, eInst, nSortOrder, this.act曲リスト.n現在のアンカ難易度レベル ); break; - case (int) EOrder.PlayCount: + case (int)EOrder.PlayCount: // this.act曲リスト.t曲リストのソート3_演奏回数の多い順( eInst, nSortOrder ); this.act曲リスト.t曲リストのソート( CDTXMania.app.Songs管理.t曲リストのソート3_演奏回数の多い順, eInst, nSortOrder, this.act曲リスト.n現在のアンカ難易度レベル ); - this.act曲リスト.t選択曲が変更された( true ); + this.act曲リスト.t選択曲が変更された(true); break; - case (int) EOrder.Author: + case (int)EOrder.Author: this.act曲リスト.t曲リストのソート( CDTXMania.app.Songs管理.t曲リストのソート8_アーティスト名順, eInst, nSortOrder, this.act曲リスト.n現在のアンカ難易度レベル ); - this.act曲リスト.t選択曲が変更された( true ); + this.act曲リスト.t選択曲が変更された(true); break; - case (int) EOrder.SkillPoint: + case (int)EOrder.SkillPoint: this.act曲リスト.t曲リストのソート( CDTXMania.app.Songs管理.t曲リストのソート6_SkillPoint順, eInst, nSortOrder, this.act曲リスト.n現在のアンカ難易度レベル ); - this.act曲リスト.t選択曲が変更された( true ); + this.act曲リスト.t選択曲が変更された(true); break; #if TEST_SORTBGM case (int) ESortItem.BPM: @@ -97,21 +97,21 @@ namespace DTXMania this.act曲リスト.t選択曲が変更された(true); break; #endif - case (int) EOrder.Date: + case (int)EOrder.Date: this.act曲リスト.t曲リストのソート( CDTXMania.app.Songs管理.t曲リストのソート7_更新日時順, eInst, nSortOrder, this.act曲リスト.n現在のアンカ難易度レベル ); - this.act曲リスト.t選択曲が変更された( true ); + this.act曲リスト.t選択曲が変更された(true); break; - case (int) EOrder.Return: + case (int)EOrder.Return: this.tDeativatePopupMenu(); break; default: break; } } - + // CActivity 実装 public override void On活性化() @@ -120,14 +120,14 @@ namespace DTXMania } public override void On非活性化() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { base.On非活性化(); } } public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { base.OnManagedリソースの作成(); } diff --git a/DTXManiaプロジェクト/コード/ステージ/05.選曲/CStage選曲.cs b/DTXManiaプロジェクト/コード/ステージ/05.選曲/CStage選曲.cs index 2f95450f..24f2499b 100644 --- a/DTXManiaプロジェクト/コード/ステージ/05.選曲/CStage選曲.cs +++ b/DTXManiaプロジェクト/コード/ステージ/05.選曲/CStage選曲.cs @@ -16,7 +16,7 @@ namespace DTXMania { get { - if ( act曲リスト != null ) + if (act曲リスト != null) { return act曲リスト.nスクロールバー相対y座標; } @@ -61,7 +61,7 @@ namespace DTXMania get; private set; } - public C曲リストノード r確定された曲 + public C曲リストノード r確定された曲 { get; private set; @@ -94,28 +94,28 @@ namespace DTXMania base.eステージID = CStage.Eステージ.選曲; base.eフェーズID = CStage.Eフェーズ.共通_通常状態; base.b活性化してない = true; - base.list子Activities.Add( this.actオプションパネル = new CActオプションパネル() ); - base.list子Activities.Add( this.actFIFO = new CActFIFOBlack() ); - base.list子Activities.Add( this.actFIfrom結果画面 = new CActFIFOBlack() ); -// base.list子Activities.Add( this.actFOtoNowLoading = new CActFIFOBlack() ); // #27787 2012.3.10 yyagi 曲決定時の画面フェードアウトの省略 - base.list子Activities.Add( this.act曲リスト = new CActSelect曲リスト() ); - base.list子Activities.Add( this.actステータスパネル = new CActSelectステータスパネル() ); - base.list子Activities.Add( this.act演奏履歴パネル = new CActSelect演奏履歴パネル() ); - base.list子Activities.Add( this.actPreimageパネル = new CActSelectPreimageパネル() ); - base.list子Activities.Add( this.actPresound = new CActSelectPresound() ); - base.list子Activities.Add( this.actArtistComment = new CActSelectArtistComment() ); - base.list子Activities.Add( this.actInformation = new CActSelectInformation() ); - base.list子Activities.Add( this.actSortSongs = new CActSortSongs() ); - base.list子Activities.Add( this.actShowCurrentPosition = new CActSelectShowCurrentPosition() ); - base.list子Activities.Add( this.actQuickConfig = new CActSelectQuickConfig() ); - base.list子Activities.Add( this.actAVI = new CAct演奏AVI() ); + base.list子Activities.Add(this.actオプションパネル = new CActオプションパネル()); + base.list子Activities.Add(this.actFIFO = new CActFIFOBlack()); + base.list子Activities.Add(this.actFIfrom結果画面 = new CActFIFOBlack()); + // base.list子Activities.Add( this.actFOtoNowLoading = new CActFIFOBlack() ); // #27787 2012.3.10 yyagi 曲決定時の画面フェードアウトの省略 + base.list子Activities.Add(this.act曲リスト = new CActSelect曲リスト()); + base.list子Activities.Add(this.actステータスパネル = new CActSelectステータスパネル()); + base.list子Activities.Add(this.act演奏履歴パネル = new CActSelect演奏履歴パネル()); + base.list子Activities.Add(this.actPreimageパネル = new CActSelectPreimageパネル()); + base.list子Activities.Add(this.actPresound = new CActSelectPresound()); + base.list子Activities.Add(this.actArtistComment = new CActSelectArtistComment()); + base.list子Activities.Add(this.actInformation = new CActSelectInformation()); + base.list子Activities.Add(this.actSortSongs = new CActSortSongs()); + base.list子Activities.Add(this.actShowCurrentPosition = new CActSelectShowCurrentPosition()); + base.list子Activities.Add(this.actQuickConfig = new CActSelectQuickConfig()); + base.list子Activities.Add(this.actAVI = new CAct演奏AVI()); this.CommandHistory = new CCommandHistory(); // #24063 2011.1.16 yyagi this.actPreimageパネル.actAVI = this.actAVI; } - - + + // メソッド public void t選択曲変更通知() @@ -128,30 +128,30 @@ namespace DTXMania #region [ プラグインにも通知する(BOX, RANDOM, BACK なら通知しない)] //--------------------- - if( CDTXMania.app != null ) + if (CDTXMania.app != null) { var c曲リストノード = r現在選択中の曲; var cスコア = r現在選択中のスコア; - if( c曲リストノード != null && cスコア != null && c曲リストノード.eノード種別 == C曲リストノード.Eノード種別.SCORE ) + if (c曲リストノード != null && cスコア != null && c曲リストノード.eノード種別 == C曲リストノード.Eノード種別.SCORE) { string str選択曲ファイル名 = cスコア.ファイル情報.ファイルの絶対パス; CSetDef setDef = null; int nブロック番号inSetDef = -1; int n曲番号inブロック = -1; - if( !string.IsNullOrEmpty( c曲リストノード.pathSetDefの絶対パス ) && File.Exists( c曲リストノード.pathSetDefの絶対パス ) ) + if (!string.IsNullOrEmpty(c曲リストノード.pathSetDefの絶対パス) && File.Exists(c曲リストノード.pathSetDefの絶対パス)) { - setDef = new CSetDef( c曲リストノード.pathSetDefの絶対パス ); + setDef = new CSetDef(c曲リストノード.pathSetDefの絶対パス); nブロック番号inSetDef = c曲リストノード.SetDefのブロック番号; - n曲番号inブロック = act曲リスト.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( c曲リストノード ); + n曲番号inブロック = act曲リスト.n現在のアンカ難易度レベルに最も近い難易度レベルを返す(c曲リストノード); } - foreach( CDTXMania.STPlugin stPlugin in CDTXMania.app.listプラグイン ) + foreach (CDTXMania.STPlugin stPlugin in CDTXMania.app.listプラグイン) { - Directory.SetCurrentDirectory( stPlugin.strプラグインフォルダ ); - stPlugin.plugin.On選択曲変更( str選択曲ファイル名, setDef, nブロック番号inSetDef, n曲番号inブロック ); - Directory.SetCurrentDirectory( CDTXMania.app.strEXEのあるフォルダ ); + Directory.SetCurrentDirectory(stPlugin.strプラグインフォルダ); + stPlugin.plugin.On選択曲変更(str選択曲ファイル名, setDef, nブロック番号inSetDef, n曲番号inブロック); + Directory.SetCurrentDirectory(CDTXMania.app.strEXEのあるフォルダ); } } } @@ -165,22 +165,22 @@ namespace DTXMania /// 曲リストをリセットする /// /// - public void Refresh( CSongs管理 cs, bool bRemakeSongTitleBar) + public void Refresh(CSongs管理 cs, bool bRemakeSongTitleBar) { - this.act曲リスト.Refresh( cs, bRemakeSongTitleBar ); + this.act曲リスト.Refresh(cs, bRemakeSongTitleBar); } public override void On活性化() { - Trace.TraceInformation( "選曲ステージを活性化します。" ); + Trace.TraceInformation("選曲ステージを活性化します。"); Trace.Indent(); try { this.eフェードアウト完了時の戻り値 = E戻り値.継続; this.bBGM再生済み = false; - this.ftフォント = new Font( "MS PGothic", 26f * Scale.X, GraphicsUnit.Pixel ); - for( int i = 0; i < 4; i++ ) - this.ctキー反復用[ i ] = new CCounter( 0, 0, 0, CDTXMania.app.Timer ); + this.ftフォント = new Font("MS PGothic", 26f * Scale.X, GraphicsUnit.Pixel); + for (int i = 0; i < 4; i++) + this.ctキー反復用[i] = new CCounter(0, 0, 0, CDTXMania.app.Timer); base.On活性化(); @@ -188,67 +188,67 @@ namespace DTXMania } finally { - Trace.TraceInformation( "選曲ステージの活性化を完了しました。" ); + Trace.TraceInformation("選曲ステージの活性化を完了しました。"); Trace.Unindent(); } } public override void On非活性化() { - Trace.TraceInformation( "選曲ステージを非活性化します。" ); + Trace.TraceInformation("選曲ステージを非活性化します。"); Trace.Indent(); try { - if( this.ftフォント != null ) + if (this.ftフォント != null) { this.ftフォント.Dispose(); this.ftフォント = null; } - for( int i = 0; i < 4; i++ ) + for (int i = 0; i < 4; i++) { - this.ctキー反復用[ i ] = null; + this.ctキー反復用[i] = null; } base.On非活性化(); } finally { - Trace.TraceInformation( "選曲ステージの非活性化を完了しました。" ); + Trace.TraceInformation("選曲ステージの非活性化を完了しました。"); Trace.Unindent(); } } public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - this.tx背景 = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenSelect background.jpg" ), false ); - this.tx上部パネル = TextureFactory.tテクスチャの生成Af( CSkin.Path( @"Graphics\ScreenSelect header panel.png" ), true ); - this.tx下部パネル = TextureFactory.tテクスチャの生成Af( CSkin.Path( @"Graphics\ScreenSelect footer panel.png" ), true ); - this.txコメントバー = TextureFactory.tテクスチャの生成Af( CSkin.Path( @"Graphics\ScreenSelect comment bar.png" ), true ); - this.txFLIP = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenSelect skill number on gauge etc.png" ), false ); + this.tx背景 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenSelect background.jpg"), false); + this.tx上部パネル = TextureFactory.tテクスチャの生成Af(CSkin.Path(@"Graphics\ScreenSelect header panel.png"), true); + this.tx下部パネル = TextureFactory.tテクスチャの生成Af(CSkin.Path(@"Graphics\ScreenSelect footer panel.png"), true); + this.txコメントバー = TextureFactory.tテクスチャの生成Af(CSkin.Path(@"Graphics\ScreenSelect comment bar.png"), true); + this.txFLIP = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenSelect skill number on gauge etc.png"), false); base.OnManagedリソースの作成(); } } public override void OnManagedリソースの解放() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.tx背景 ); - TextureFactory.tテクスチャの解放( ref this.tx上部パネル ); - TextureFactory.tテクスチャの解放( ref this.tx下部パネル ); - TextureFactory.tテクスチャの解放( ref this.txコメントバー ); - TextureFactory.tテクスチャの解放( ref this.txFLIP ); + TextureFactory.tテクスチャの解放(ref this.tx背景); + TextureFactory.tテクスチャの解放(ref this.tx上部パネル); + TextureFactory.tテクスチャの解放(ref this.tx下部パネル); + TextureFactory.tテクスチャの解放(ref this.txコメントバー); + TextureFactory.tテクスチャの解放(ref this.txFLIP); base.OnManagedリソースの解放(); } } public override int On進行描画() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { #region [ 初めての進行描画 ] //--------------------- - if( base.b初めての進行描画 ) + if (base.b初めての進行描画) { - this.ct登場時アニメ用共通 = new CCounter( 0, 100, 3, CDTXMania.app.Timer ); - if( CDTXMania.app.r直前のステージ == CDTXMania.app.stage結果 ) + this.ct登場時アニメ用共通 = new CCounter(0, 100, 3, CDTXMania.app.Timer); + if (CDTXMania.app.r直前のステージ == CDTXMania.app.stage結果) { this.actFIfrom結果画面.tフェードイン開始(); base.eフェーズID = CStage.Eフェーズ.選曲_結果画面からのフェードイン; @@ -266,31 +266,31 @@ namespace DTXMania this.ct登場時アニメ用共通.t進行(); - if( this.tx背景 != null ) - this.tx背景.t2D描画( CDTXMania.app.Device, 0, 0 ); + if (this.tx背景 != null) + this.tx背景.t2D描画(CDTXMania.app.Device, 0, 0); this.actPreimageパネル.On進行描画(); - // this.bIsEnumeratingSongs = !this.actPreimageパネル.bIsPlayingPremovie; // #27060 2011.3.2 yyagi: #PREMOVIE再生中は曲検索を中断する + // this.bIsEnumeratingSongs = !this.actPreimageパネル.bIsPlayingPremovie; // #27060 2011.3.2 yyagi: #PREMOVIE再生中は曲検索を中断する this.act曲リスト.On進行描画(); int y = 0; - if( this.ct登場時アニメ用共通.b進行中 ) + if (this.ct登場時アニメ用共通.b進行中) { - double db登場割合 = ( (double) this.ct登場時アニメ用共通.n現在の値 ) / 100.0; // 100が最終値 - double dbY表示割合 = Math.Sin( Math.PI / 2 * db登場割合 ); - y = ( (int) ( this.tx上部パネル.sz画像サイズ.Height * dbY表示割合 ) ) - this.tx上部パネル.sz画像サイズ.Height; + double db登場割合 = ((double)this.ct登場時アニメ用共通.n現在の値) / 100.0; // 100が最終値 + double dbY表示割合 = Math.Sin(Math.PI / 2 * db登場割合); + y = ((int)(this.tx上部パネル.sz画像サイズ.Height * dbY表示割合)) - this.tx上部パネル.sz画像サイズ.Height; } #region [ 上部パネル描画 ] - if ( this.tx上部パネル != null ) - this.tx上部パネル.t2D描画( - CDTXMania.app.Device, - 0, - y * Scale.Y - ); + if (this.tx上部パネル != null) + this.tx上部パネル.t2D描画( + CDTXMania.app.Device, + 0, + y * Scale.Y + ); #endregion this.actInformation.On進行描画(); #region [ 下部パネル描画 ] - if ( this.tx下部パネル != null ) + if (this.tx下部パネル != null) this.tx下部パネル.t2D描画( CDTXMania.app.Device, 0, @@ -301,7 +301,7 @@ namespace DTXMania this.act演奏履歴パネル.On進行描画(); this.actPresound.On進行描画(); #region [ コメントバー描画 ] - if ( this.txコメントバー != null ) + if (this.txコメントバー != null) { this.txコメントバー.t2D描画( CDTXMania.app.Device, @@ -313,13 +313,13 @@ namespace DTXMania this.actArtistComment.On進行描画(); this.actオプションパネル.On進行描画(); #region [ FLIP描画 ] - if ( this.txFLIP != null && CDTXMania.app.ConfigIni.bIsSwappedGuitarBass ) // #24063 2011.1.16 yyagi + if (this.txFLIP != null && CDTXMania.app.ConfigIni.bIsSwappedGuitarBass) // #24063 2011.1.16 yyagi { Rectangle rect = new Rectangle( - (int) ( 31 * Scale.X ), - (int) ( 49 * Scale.Y ), - (int) ( 20 * Scale.X ), - (int) ( 11 * Scale.Y ) + (int)(31 * Scale.X), + (int)(49 * Scale.Y), + (int)(20 * Scale.X), + (int)(11 * Scale.Y) ); this.txFLIP.t2D描画( CDTXMania.app.Device, @@ -332,38 +332,38 @@ namespace DTXMania this.actShowCurrentPosition.On進行描画(); // #27648 2011.3.28 yyagi #region [ フェーズ処理 ] - switch ( base.eフェーズID ) + switch (base.eフェーズID) { case CStage.Eフェーズ.共通_フェードイン: - if( this.actFIFO.On進行描画() != 0 ) + if (this.actFIFO.On進行描画() != 0) { base.eフェーズID = CStage.Eフェーズ.共通_通常状態; } break; case CStage.Eフェーズ.共通_フェードアウト: - if( this.actFIFO.On進行描画() == 0 ) + if (this.actFIFO.On進行描画() == 0) { break; } - return (int) this.eフェードアウト完了時の戻り値; + return (int)this.eフェードアウト完了時の戻り値; case CStage.Eフェーズ.選曲_結果画面からのフェードイン: - if( this.actFIfrom結果画面.On進行描画() != 0 ) + if (this.actFIfrom結果画面.On進行描画() != 0) { base.eフェーズID = CStage.Eフェーズ.共通_通常状態; } break; case CStage.Eフェーズ.選曲_NowLoading画面へのフェードアウト: -// if( this.actFOtoNowLoading.On進行描画() == 0 ) -// { -// break; -// } - return (int) this.eフェードアウト完了時の戻り値; + // if( this.actFOtoNowLoading.On進行描画() == 0 ) + // { + // break; + // } + return (int)this.eフェードアウト完了時の戻り値; } #endregion - if( !this.bBGM再生済み && ( base.eフェーズID == CStage.Eフェーズ.共通_通常状態 ) ) + if (!this.bBGM再生済み && (base.eフェーズID == CStage.Eフェーズ.共通_通常状態)) { CDTXMania.app.Skin.bgm選曲画面.n音量_次に鳴るサウンド = 100; CDTXMania.app.Skin.bgm選曲画面.t再生する(); @@ -371,15 +371,15 @@ namespace DTXMania } -//Debug.WriteLine( "パンくず=" + this.r現在選択中の曲.strBreadcrumbs ); + //Debug.WriteLine( "パンくず=" + this.r現在選択中の曲.strBreadcrumbs ); // キー入力 - if( base.eフェーズID == CStage.Eフェーズ.共通_通常状態 - && CDTXMania.app.act現在入力を占有中のプラグイン == null ) + if (base.eフェーズID == CStage.Eフェーズ.共通_通常状態 + && CDTXMania.app.act現在入力を占有中のプラグイン == null) { #region [ 簡易CONFIGでMore、またはShift+F1: 詳細CONFIG呼び出し ] - if ( actQuickConfig.bGotoDetailConfig ) + if (actQuickConfig.bGotoDetailConfig) { // 詳細CONFIG呼び出し actQuickConfig.tDeativatePopupMenu(); this.actPresound.tサウンド停止(); @@ -390,10 +390,10 @@ namespace DTXMania return 0; } #endregion - if ( !this.actSortSongs.bIsActivePopupMenu && !this.actQuickConfig.bIsActivePopupMenu ) + if (!this.actSortSongs.bIsActivePopupMenu && !this.actQuickConfig.bIsActivePopupMenu) { #region [ ESC ] - if ( CDTXMania.app.Input管理.Keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.Escape ) || ( ( CDTXMania.app.Pad.b押された( E楽器パート.DRUMS, Eパッド.FT ) || CDTXMania.app.Pad.b押されたGB( Eパッド.Cancel ) ) && ( ( this.act曲リスト.r現在選択中の曲 != null ) && ( this.act曲リスト.r現在選択中の曲.r親ノード == null ) ) ) ) + if (CDTXMania.app.Input管理.Keyboard.bキーが押された((int)SlimDX.DirectInput.Key.Escape) || ((CDTXMania.app.Pad.b押された(E楽器パート.DRUMS, Eパッド.FT) || CDTXMania.app.Pad.b押されたGB(Eパッド.Cancel)) && ((this.act曲リスト.r現在選択中の曲 != null) && (this.act曲リスト.r現在選択中の曲.r親ノード == null)))) { // [ESC] CDTXMania.app.Skin.sound取消音.t再生する(); this.eフェードアウト完了時の戻り値 = E戻り値.タイトルに戻る; @@ -403,8 +403,8 @@ namespace DTXMania } #endregion #region [ Shift-F1: CONFIG画面 ] - if ( ( CDTXMania.app.Input管理.Keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.RightShift ) || CDTXMania.app.Input管理.Keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.LeftShift ) ) && - CDTXMania.app.Input管理.Keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.F1 ) ) + if ((CDTXMania.app.Input管理.Keyboard.bキーが押されている((int)SlimDX.DirectInput.Key.RightShift) || CDTXMania.app.Input管理.Keyboard.bキーが押されている((int)SlimDX.DirectInput.Key.LeftShift)) && + CDTXMania.app.Input管理.Keyboard.bキーが押された((int)SlimDX.DirectInput.Key.F1)) { // [SHIFT] + [F1] CONFIG this.actPresound.tサウンド停止(); this.eフェードアウト完了時の戻り値 = E戻り値.コンフィグ呼び出し; // #24525 2011.3.16 yyagi: [SHIFT]-[F1]でCONFIG呼び出し @@ -429,20 +429,20 @@ namespace DTXMania } */ #endregion - if ( this.act曲リスト.r現在選択中の曲 != null ) + if (this.act曲リスト.r現在選択中の曲 != null) { #region [ Right ] - if ( CDTXMania.app.Input管理.Keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.RightArrow ) ) + if (CDTXMania.app.Input管理.Keyboard.bキーが押された((int)SlimDX.DirectInput.Key.RightArrow)) { - if ( this.act曲リスト.r現在選択中の曲 != null ) + if (this.act曲リスト.r現在選択中の曲 != null) { - switch ( this.act曲リスト.r現在選択中の曲.eノード種別 ) + switch (this.act曲リスト.r現在選択中の曲.eノード種別) { case C曲リストノード.Eノード種別.BOX: { CDTXMania.app.Skin.sound決定音.t再生する(); bool bNeedChangeSkin = this.act曲リスト.tBOXに入る(); - if ( bNeedChangeSkin ) + if (bNeedChangeSkin) { this.eフェードアウト完了時の戻り値 = E戻り値.スキン変更; base.eフェーズID = Eフェーズ.選曲_NowLoading画面へのフェードアウト; @@ -454,14 +454,14 @@ namespace DTXMania } #endregion #region [ Decide ] - if (( CDTXMania.app.Pad.b押されたDGB( Eパッド.Decide ) || CDTXMania.app.Pad.b押された( E楽器パート.DRUMS, Eパッド.RD ) ) || - ( CDTXMania.app.Pad.b押された( E楽器パート.DRUMS, Eパッド.LC ) || - ( CDTXMania.app.ConfigIni.bEnterがキー割り当てのどこにも使用されていない && CDTXMania.app.Input管理.Keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.Return ) ) ) ) + if ((CDTXMania.app.Pad.b押されたDGB(Eパッド.Decide) || CDTXMania.app.Pad.b押された(E楽器パート.DRUMS, Eパッド.RD)) || + (CDTXMania.app.Pad.b押された(E楽器パート.DRUMS, Eパッド.LC) || + (CDTXMania.app.ConfigIni.bEnterがキー割り当てのどこにも使用されていない && CDTXMania.app.Input管理.Keyboard.bキーが押された((int)SlimDX.DirectInput.Key.Return)))) { CDTXMania.app.Skin.sound決定音.t再生する(); - if ( this.act曲リスト.r現在選択中の曲 != null ) + if (this.act曲リスト.r現在選択中の曲 != null) { - switch ( this.act曲リスト.r現在選択中の曲.eノード種別 ) + switch (this.act曲リスト.r現在選択中の曲.eノード種別) { case C曲リストノード.Eノード種別.SCORE: this.t曲を選択する(); @@ -474,9 +474,9 @@ namespace DTXMania case C曲リストノード.Eノード種別.BOX: { bool bNeedChangeSkin = this.act曲リスト.tBOXに入る(); - if ( bNeedChangeSkin ) + if (bNeedChangeSkin) { - this.eフェードアウト完了時の戻り値 = E戻り値.スキン変更; + this.eフェードアウト完了時の戻り値 = E戻り値.スキン変更; base.eフェーズID = Eフェーズ.選曲_NowLoading画面へのフェードアウト; } } @@ -485,9 +485,9 @@ namespace DTXMania case C曲リストノード.Eノード種別.BACKBOX: { bool bNeedChangeSkin = this.act曲リスト.tBOXを出る(); - if ( bNeedChangeSkin ) + if (bNeedChangeSkin) { - this.eフェードアウト完了時の戻り値 = E戻り値.スキン変更; + this.eフェードアウト完了時の戻り値 = E戻り値.スキン変更; base.eフェーズID = Eフェーズ.選曲_NowLoading画面へのフェードアウト; } } @@ -501,26 +501,26 @@ namespace DTXMania } #endregion #region [ Up ] - this.ctキー反復用.Up.tキー反復( CDTXMania.app.Input管理.Keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.UpArrow ), new CCounter.DGキー処理( this.tカーソルを上へ移動する ) ); - this.ctキー反復用.R.tキー反復( CDTXMania.app.Pad.b押されているGB( Eパッド.R ), new CCounter.DGキー処理( this.tカーソルを上へ移動する ) ); - if ( CDTXMania.app.Pad.b押された( E楽器パート.DRUMS, Eパッド.SD ) ) + this.ctキー反復用.Up.tキー反復(CDTXMania.app.Input管理.Keyboard.bキーが押されている((int)SlimDX.DirectInput.Key.UpArrow), new CCounter.DGキー処理(this.tカーソルを上へ移動する)); + this.ctキー反復用.R.tキー反復(CDTXMania.app.Pad.b押されているGB(Eパッド.R), new CCounter.DGキー処理(this.tカーソルを上へ移動する)); + if (CDTXMania.app.Pad.b押された(E楽器パート.DRUMS, Eパッド.SD)) { this.tカーソルを上へ移動する(); } #endregion #region [ Down ] - this.ctキー反復用.Down.tキー反復( CDTXMania.app.Input管理.Keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.DownArrow ), new CCounter.DGキー処理( this.tカーソルを下へ移動する ) ); - this.ctキー反復用.B.tキー反復( CDTXMania.app.Pad.b押されているGB( Eパッド.B ), new CCounter.DGキー処理( this.tカーソルを下へ移動する ) ); - if ( CDTXMania.app.Pad.b押された( E楽器パート.DRUMS, Eパッド.LT ) ) + this.ctキー反復用.Down.tキー反復(CDTXMania.app.Input管理.Keyboard.bキーが押されている((int)SlimDX.DirectInput.Key.DownArrow), new CCounter.DGキー処理(this.tカーソルを下へ移動する)); + this.ctキー反復用.B.tキー反復(CDTXMania.app.Pad.b押されているGB(Eパッド.B), new CCounter.DGキー処理(this.tカーソルを下へ移動する)); + if (CDTXMania.app.Pad.b押された(E楽器パート.DRUMS, Eパッド.LT)) { this.tカーソルを下へ移動する(); } #endregion #region [ Upstairs / Left ] - if ( ( ( this.act曲リスト.r現在選択中の曲 != null ) && ( this.act曲リスト.r現在選択中の曲.r親ノード != null ) ) && - ( CDTXMania.app.Pad.b押された( E楽器パート.DRUMS, Eパッド.FT ) || - CDTXMania.app.Pad.b押されたGB( Eパッド.Cancel ) || - CDTXMania.app.Input管理.Keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.LeftArrow ) ) ) + if (((this.act曲リスト.r現在選択中の曲 != null) && (this.act曲リスト.r現在選択中の曲.r親ノード != null)) && + (CDTXMania.app.Pad.b押された(E楽器パート.DRUMS, Eパッド.FT) || + CDTXMania.app.Pad.b押されたGB(Eパッド.Cancel) || + CDTXMania.app.Input管理.Keyboard.bキーが押された((int)SlimDX.DirectInput.Key.LeftArrow))) { this.actPresound.tサウンド停止(); CDTXMania.app.Skin.sound取消音.t再生する(); @@ -529,25 +529,25 @@ namespace DTXMania } #endregion #region [ BDx2: 簡易CONFIG ] - if ( CDTXMania.app.Pad.b押された( E楽器パート.DRUMS, Eパッド.BD ) ) + if (CDTXMania.app.Pad.b押された(E楽器パート.DRUMS, Eパッド.BD)) { // [BD]x2 スクロール速度変更 - CommandHistory.Add( E楽器パート.DRUMS, EパッドFlag.BD ); + CommandHistory.Add(E楽器パート.DRUMS, EパッドFlag.BD); EパッドFlag[] comChangeScrollSpeed = new EパッドFlag[] { EパッドFlag.BD, EパッドFlag.BD }; - if ( CommandHistory.CheckCommand( comChangeScrollSpeed, E楽器パート.DRUMS ) ) + if (CommandHistory.CheckCommand(comChangeScrollSpeed, E楽器パート.DRUMS)) { // Debug.WriteLine( "ドラムススクロール速度変更" ); // CDTXMania.app.ConfigIni.n譜面スクロール速度.Drums = ( CDTXMania.app.ConfigIni.n譜面スクロール速度.Drums + 1 ) % 0x10; CDTXMania.app.Skin.sound変更音.t再生する(); - this.actQuickConfig.tActivatePopupMenu( E楽器パート.DRUMS ); + this.actQuickConfig.tActivatePopupMenu(E楽器パート.DRUMS); } } #endregion #region [ HHx2: 難易度変更 ] - if ( CDTXMania.app.Pad.b押された( E楽器パート.DRUMS, Eパッド.HH ) || CDTXMania.app.Pad.b押された( E楽器パート.DRUMS, Eパッド.HHO ) ) + if (CDTXMania.app.Pad.b押された(E楽器パート.DRUMS, Eパッド.HH) || CDTXMania.app.Pad.b押された(E楽器パート.DRUMS, Eパッド.HHO)) { // [HH]x2 難易度変更 - CommandHistory.Add( E楽器パート.DRUMS, EパッドFlag.HH ); + CommandHistory.Add(E楽器パート.DRUMS, EパッドFlag.HH); EパッドFlag[] comChangeDifficulty = new EパッドFlag[] { EパッドFlag.HH, EパッドFlag.HH }; - if ( CommandHistory.CheckCommand( comChangeDifficulty, E楽器パート.DRUMS ) ) + if (CommandHistory.CheckCommand(comChangeDifficulty, E楽器パート.DRUMS)) { this.act曲リスト.t難易度レベルをひとつ進める(); CDTXMania.app.Skin.sound変更音.t再生する(); @@ -555,40 +555,40 @@ namespace DTXMania } #endregion #region [ G + PickPick Guitar: 難易度変更 ] - if ( CDTXMania.app.Pad.b押されている( E楽器パート.GUITAR, Eパッド.G ) && CDTXMania.app.Pad.b押された( E楽器パート.GUITAR, Eパッド.Pick ) ) // #24177 2011.1.17 yyagi || -> && + if (CDTXMania.app.Pad.b押されている(E楽器パート.GUITAR, Eパッド.G) && CDTXMania.app.Pad.b押された(E楽器パート.GUITAR, Eパッド.Pick)) // #24177 2011.1.17 yyagi || -> && { // [G] + [Pick][Pick] ギター難易度変更 - CommandHistory.Add( E楽器パート.GUITAR, EパッドFlag.Pick | EパッドFlag.G ); + CommandHistory.Add(E楽器パート.GUITAR, EパッドFlag.Pick | EパッドFlag.G); EパッドFlag[] comChangeDifficulty = new EパッドFlag[] { EパッドFlag.Pick | EパッドFlag.G, EパッドFlag.Pick | EパッドFlag.G }; - if ( CommandHistory.CheckCommand( comChangeDifficulty, E楽器パート.GUITAR ) ) + if (CommandHistory.CheckCommand(comChangeDifficulty, E楽器パート.GUITAR)) { - Debug.WriteLine( "ギター難易度変更" ); + Debug.WriteLine("ギター難易度変更"); this.act曲リスト.t難易度レベルをひとつ進める(); CDTXMania.app.Skin.sound変更音.t再生する(); } } #endregion #region [ G + PickPick Bass: 難易度変更 ] - if ( CDTXMania.app.Pad.b押されている( E楽器パート.BASS, Eパッド.G ) && CDTXMania.app.Pad.b押された( E楽器パート.BASS, Eパッド.Pick ) ) // #24177 2011.1.17 yyagi || -> && + if (CDTXMania.app.Pad.b押されている(E楽器パート.BASS, Eパッド.G) && CDTXMania.app.Pad.b押された(E楽器パート.BASS, Eパッド.Pick)) // #24177 2011.1.17 yyagi || -> && { // [G] + [Pick][Pick] ベース難易度変更 - CommandHistory.Add( E楽器パート.BASS, EパッドFlag.Pick | EパッドFlag.G ); + CommandHistory.Add(E楽器パート.BASS, EパッドFlag.Pick | EパッドFlag.G); EパッドFlag[] comChangeDifficulty = new EパッドFlag[] { EパッドFlag.Pick | EパッドFlag.G, EパッドFlag.Pick | EパッドFlag.G }; - if ( CommandHistory.CheckCommand( comChangeDifficulty, E楽器パート.BASS ) ) + if (CommandHistory.CheckCommand(comChangeDifficulty, E楽器パート.BASS)) { - Debug.WriteLine( "ベース難易度変更" ); + Debug.WriteLine("ベース難易度変更"); this.act曲リスト.t難易度レベルをひとつ進める(); CDTXMania.app.Skin.sound変更音.t再生する(); } } #endregion #region [ Pick G G Pick Guitar: ギターとベースを入れ替え ] - if ( CDTXMania.app.Pad.b押された( E楽器パート.GUITAR, Eパッド.Pick ) && !CDTXMania.app.Pad.b押されている( E楽器パート.GUITAR, Eパッド.G ) ) + if (CDTXMania.app.Pad.b押された(E楽器パート.GUITAR, Eパッド.Pick) && !CDTXMania.app.Pad.b押されている(E楽器パート.GUITAR, Eパッド.G)) { // ギター[Pick]: コマンドとしてEnqueue - CommandHistory.Add( E楽器パート.GUITAR, EパッドFlag.Pick ); + CommandHistory.Add(E楽器パート.GUITAR, EパッドFlag.Pick); // Pick, G, G, Pick で、ギターとベースを入れ替え EパッドFlag[] comSwapGtBs1 = new EパッドFlag[] { EパッドFlag.Pick, EパッドFlag.G, EパッドFlag.G, EパッドFlag.Pick }; - if ( CommandHistory.CheckCommand( comSwapGtBs1, E楽器パート.GUITAR ) ) + if (CommandHistory.CheckCommand(comSwapGtBs1, E楽器パート.GUITAR)) { - Debug.WriteLine( "ギターとベースの入れ替え1" ); + Debug.WriteLine("ギターとベースの入れ替え1"); CDTXMania.app.Skin.sound変更音.t再生する(); // ギターとベースのキーを入れ替え //CDTXMania.app.ConfigIni.SwapGuitarBassKeyAssign(); @@ -597,14 +597,14 @@ namespace DTXMania } #endregion #region [ Pick G G Pick Bass: ギターとベースを入れ替え ] - if ( CDTXMania.app.Pad.b押された( E楽器パート.BASS, Eパッド.Pick ) && !CDTXMania.app.Pad.b押されている( E楽器パート.BASS, Eパッド.G ) ) + if (CDTXMania.app.Pad.b押された(E楽器パート.BASS, Eパッド.Pick) && !CDTXMania.app.Pad.b押されている(E楽器パート.BASS, Eパッド.G)) { // ベース[Pick]: コマンドとしてEnqueue - CommandHistory.Add( E楽器パート.BASS, EパッドFlag.Pick ); + CommandHistory.Add(E楽器パート.BASS, EパッドFlag.Pick); // Pick, G, G, Pick で、ギターとベースを入れ替え EパッドFlag[] comSwapGtBs1 = new EパッドFlag[] { EパッドFlag.Pick, EパッドFlag.G, EパッドFlag.G, EパッドFlag.Pick }; - if ( CommandHistory.CheckCommand( comSwapGtBs1, E楽器パート.BASS ) ) + if (CommandHistory.CheckCommand(comSwapGtBs1, E楽器パート.BASS)) { - Debug.WriteLine( "ギターとベースの入れ替え2" ); + Debug.WriteLine("ギターとベースの入れ替え2"); CDTXMania.app.Skin.sound変更音.t再生する(); // ギターとベースのキーを入れ替え //CDTXMania.app.ConfigIni.SwapGuitarBassKeyAssign(); @@ -613,41 +613,41 @@ namespace DTXMania } #endregion #region [ G G G Guitar: ソート画面 ] - if ( CDTXMania.app.Pad.b押された( E楽器パート.GUITAR, Eパッド.G ) ) + if (CDTXMania.app.Pad.b押された(E楽器パート.GUITAR, Eパッド.G)) { // ギター[G]: コマンドとしてEnqueue - CommandHistory.Add( E楽器パート.GUITAR, EパッドFlag.G ); + CommandHistory.Add(E楽器パート.GUITAR, EパッドFlag.G); // ギター G, G, G で、ソート画面に遷移 EパッドFlag[] comSortGt = new EパッドFlag[] { EパッドFlag.G, EパッドFlag.G, EパッドFlag.G }; - if ( CommandHistory.CheckCommand( comSortGt, E楽器パート.GUITAR ) ) + if (CommandHistory.CheckCommand(comSortGt, E楽器パート.GUITAR)) { CDTXMania.app.Skin.sound変更音.t再生する(); - this.actSortSongs.tActivatePopupMenu( E楽器パート.GUITAR, ref this.act曲リスト ); + this.actSortSongs.tActivatePopupMenu(E楽器パート.GUITAR, ref this.act曲リスト); } } #endregion #region [ G G G Bass: ソート画面 ] - if ( CDTXMania.app.Pad.b押された( E楽器パート.BASS, Eパッド.G ) ) + if (CDTXMania.app.Pad.b押された(E楽器パート.BASS, Eパッド.G)) { // ベース[G]: コマンドとしてEnqueue - CommandHistory.Add( E楽器パート.BASS, EパッドFlag.G ); + CommandHistory.Add(E楽器パート.BASS, EパッドFlag.G); // ベース G, G, G で、ソート画面に遷移 EパッドFlag[] comSortBs = new EパッドFlag[] { EパッドFlag.G, EパッドFlag.G, EパッドFlag.G }; - if ( CommandHistory.CheckCommand( comSortBs, E楽器パート.BASS ) ) + if (CommandHistory.CheckCommand(comSortBs, E楽器パート.BASS)) { CDTXMania.app.Skin.sound変更音.t再生する(); - this.actSortSongs.tActivatePopupMenu( E楽器パート.BASS, ref this.act曲リスト ); + this.actSortSongs.tActivatePopupMenu(E楽器パート.BASS, ref this.act曲リスト); } } #endregion #region [ BD HT Drums: ソート画面 ] - if ( CDTXMania.app.Pad.b押された( E楽器パート.DRUMS, Eパッド.HT ) ) + if (CDTXMania.app.Pad.b押された(E楽器パート.DRUMS, Eパッド.HT)) { // [BD]+[HT] 未使用 // - CommandHistory.Add( E楽器パート.DRUMS, EパッドFlag.HT ); + CommandHistory.Add(E楽器パート.DRUMS, EパッドFlag.HT); EパッドFlag[] comSort = new EパッドFlag[] { EパッドFlag.BD, EパッドFlag.HT }; - if ( CommandHistory.CheckCommand( comSort, E楽器パート.DRUMS ) ) + if (CommandHistory.CheckCommand(comSort, E楽器パート.DRUMS)) { CDTXMania.app.Skin.sound変更音.t再生する(); - this.actSortSongs.tActivatePopupMenu( E楽器パート.DRUMS, ref this.act曲リスト ); + this.actSortSongs.tActivatePopupMenu(E楽器パート.DRUMS, ref this.act曲リスト); } } #endregion @@ -668,24 +668,24 @@ namespace DTXMania コンフィグ呼び出し, スキン変更 } - + // その他 #region [ private ] //----------------- - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] private struct STキー反復用カウンタ { public CCounter Up; public CCounter Down; public CCounter R; public CCounter B; - public CCounter this[ int index ] + public CCounter this[int index] { get { - switch( index ) + switch (index) { case 0: return this.Up; @@ -703,7 +703,7 @@ namespace DTXMania } set { - switch( index ) + switch (index) { case 0: this.Up = value; @@ -728,7 +728,7 @@ namespace DTXMania private CActSelectArtistComment actArtistComment; private CActFIFOBlack actFIFO; private CActFIFOBlack actFIfrom結果画面; -// private CActFIFOBlack actFOtoNowLoading; // #27787 2012.3.10 yyagi 曲決定時の画面フェードアウトの省略 + // private CActFIFOBlack actFOtoNowLoading; // #27787 2012.3.10 yyagi 曲決定時の画面フェードアウトの省略 private CActSelectInformation actInformation; private CActSelectPreimageパネル actPreimageパネル; private CActSelectPresound actPresound; @@ -766,7 +766,7 @@ namespace DTXMania public CCommandHistory() // コンストラクタ { - stct = new List( buffersize ); + stct = new List(buffersize); } /// @@ -774,24 +774,25 @@ namespace DTXMania /// /// 楽器の種類 /// 入力コマンド(同時押しはOR演算で列挙すること) - public void Add( E楽器パート _eInst, EパッドFlag _ePad ) + public void Add(E楽器パート _eInst, EパッドFlag _ePad) { - STCommandTime _stct = new STCommandTime { + STCommandTime _stct = new STCommandTime + { eInst = _eInst, ePad = _ePad, time = CDTXMania.app.Timer.n現在時刻 }; - if ( stct.Count >= buffersize ) + if (stct.Count >= buffersize) { - stct.RemoveAt( 0 ); + stct.RemoveAt(0); } stct.Add(_stct); -//Debug.WriteLine( "CMDHIS: 楽器=" + _stct.eInst + ", CMD=" + _stct.ePad + ", time=" + _stct.time ); + //Debug.WriteLine( "CMDHIS: 楽器=" + _stct.eInst + ", CMD=" + _stct.ePad + ", time=" + _stct.time ); } - public void RemoveAt( int index ) + public void RemoveAt(int index) { - stct.RemoveAt( index ); + stct.RemoveAt(index); } /// @@ -800,41 +801,41 @@ namespace DTXMania /// 入力が成功したか調べたいコマンド /// 対象楽器 /// コマンド入力成功時true - public bool CheckCommand( EパッドFlag[] _ePad, E楽器パート _eInst) + public bool CheckCommand(EパッドFlag[] _ePad, E楽器パート _eInst) { int targetCount = _ePad.Length; int stciCount = stct.Count; - if ( stciCount < targetCount ) + if (stciCount < targetCount) { -//Debug.WriteLine("NOT start checking...stciCount=" + stciCount + ", targetCount=" + targetCount); + //Debug.WriteLine("NOT start checking...stciCount=" + stciCount + ", targetCount=" + targetCount); return false; } long curTime = CDTXMania.app.Timer.n現在時刻; -//Debug.WriteLine("Start checking...targetCount=" + targetCount); - for ( int i = targetCount - 1, j = stciCount - 1; i >= 0; i--, j-- ) + //Debug.WriteLine("Start checking...targetCount=" + targetCount); + for (int i = targetCount - 1, j = stciCount - 1; i >= 0; i--, j--) { - if ( _ePad[ i ] != stct[ j ].ePad ) + if (_ePad[i] != stct[j].ePad) { -//Debug.WriteLine( "CMD解析: false targetCount=" + targetCount + ", i=" + i + ", j=" + j + ": ePad[]=" + _ePad[i] + ", stci[j] = " + stct[j].ePad ); + //Debug.WriteLine( "CMD解析: false targetCount=" + targetCount + ", i=" + i + ", j=" + j + ": ePad[]=" + _ePad[i] + ", stci[j] = " + stct[j].ePad ); return false; } - if ( stct[ j ].eInst != _eInst ) + if (stct[j].eInst != _eInst) { -//Debug.WriteLine( "CMD解析: false " + i ); + //Debug.WriteLine( "CMD解析: false " + i ); return false; } - if ( curTime - stct[ j ].time > 500 ) + if (curTime - stct[j].time > 500) { -//Debug.WriteLine( "CMD解析: false " + i + "; over 500ms" ); + //Debug.WriteLine( "CMD解析: false " + i + "; over 500ms" ); return false; } - curTime = stct[ j ].time; + curTime = stct[j].time; } -//Debug.Write( "CMD解析: 成功!(" + _ePad.Length + ") " ); -//for ( int i = 0; i < _ePad.Length; i++ ) Debug.Write( _ePad[ i ] + ", " ); -//Debug.WriteLine( "" ); + //Debug.Write( "CMD解析: 成功!(" + _ePad.Length + ") " ); + //for ( int i = 0; i < _ePad.Length; i++ ) Debug.Write( _ePad[ i ] + ", " ); + //Debug.WriteLine( "" ); //stct.RemoveRange( 0, targetCount ); // #24396 2011.2.13 yyagi stct.Clear(); // #24396 2011.2.13 yyagi Clear all command input history in case you succeeded inputting some command @@ -856,68 +857,68 @@ namespace DTXMania private void t曲をランダム選択する() { C曲リストノード song = this.act曲リスト.r現在選択中の曲; - if( ( song.stackランダム演奏番号.Count == 0 ) || ( song.listランダム用ノードリスト == null ) ) + if ((song.stackランダム演奏番号.Count == 0) || (song.listランダム用ノードリスト == null)) { - if( song.listランダム用ノードリスト == null ) + if (song.listランダム用ノードリスト == null) { - song.listランダム用ノードリスト = this.t指定された曲が存在する場所の曲を列挙する_子リスト含む( song ); + song.listランダム用ノードリスト = this.t指定された曲が存在する場所の曲を列挙する_子リスト含む(song); } int count = song.listランダム用ノードリスト.Count; - if( count == 0 ) + if (count == 0) { return; } - int[] numArray = new int[ count ]; - for( int i = 0; i < count; i++ ) + int[] numArray = new int[count]; + for (int i = 0; i < count; i++) { - numArray[ i ] = i; + numArray[i] = i; } - for( int j = 0; j < ( count * 1.5 ); j++ ) + for (int j = 0; j < (count * 1.5); j++) { - int index = CDTXMania.app.Random.Next( count ); - int num5 = CDTXMania.app.Random.Next( count ); - int num6 = numArray[ num5 ]; - numArray[ num5 ] = numArray[ index ]; - numArray[ index ] = num6; + int index = CDTXMania.app.Random.Next(count); + int num5 = CDTXMania.app.Random.Next(count); + int num6 = numArray[num5]; + numArray[num5] = numArray[index]; + numArray[index] = num6; } - for( int k = 0; k < count; k++ ) + for (int k = 0; k < count; k++) { - song.stackランダム演奏番号.Push( numArray[ k ] ); + song.stackランダム演奏番号.Push(numArray[k]); } - if( CDTXMania.app.ConfigIni.bLogDTX詳細ログ出力 ) + if (CDTXMania.app.ConfigIni.bLogDTX詳細ログ出力) { - StringBuilder builder = new StringBuilder( 0x400 ); - builder.Append( string.Format( "ランダムインデックスリストを作成しました: {0}曲: ", song.stackランダム演奏番号.Count ) ); - for( int m = 0; m < count; m++ ) + StringBuilder builder = new StringBuilder(0x400); + builder.Append(string.Format("ランダムインデックスリストを作成しました: {0}曲: ", song.stackランダム演奏番号.Count)); + for (int m = 0; m < count; m++) { - builder.Append( string.Format( "{0} ", numArray[ m ] ) ); + builder.Append(string.Format("{0} ", numArray[m])); } - Trace.TraceInformation( builder.ToString() ); + Trace.TraceInformation(builder.ToString()); } } - this.r確定された曲 = song.listランダム用ノードリスト[ song.stackランダム演奏番号.Pop() ]; - this.n確定された曲の難易度 = this.act曲リスト.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( this.r確定された曲 ); - this.r確定されたスコア = this.r確定された曲.arスコア[ this.n確定された曲の難易度 ]; + this.r確定された曲 = song.listランダム用ノードリスト[song.stackランダム演奏番号.Pop()]; + this.n確定された曲の難易度 = this.act曲リスト.n現在のアンカ難易度レベルに最も近い難易度レベルを返す(this.r確定された曲); + this.r確定されたスコア = this.r確定された曲.arスコア[this.n確定された曲の難易度]; this.eフェードアウト完了時の戻り値 = E戻り値.選曲した; - // this.actFOtoNowLoading.tフェードアウト開始(); // #27787 2012.3.10 yyagi 曲決定時の画面フェードアウトの省略 + // this.actFOtoNowLoading.tフェードアウト開始(); // #27787 2012.3.10 yyagi 曲決定時の画面フェードアウトの省略 base.eフェーズID = CStage.Eフェーズ.選曲_NowLoading画面へのフェードアウト; - if( CDTXMania.app.ConfigIni.bLogDTX詳細ログ出力 ) + if (CDTXMania.app.ConfigIni.bLogDTX詳細ログ出力) { int[] numArray2 = song.stackランダム演奏番号.ToArray(); - StringBuilder builder2 = new StringBuilder( 0x400 ); - builder2.Append( "ランダムインデックスリスト残り: " ); - if( numArray2.Length > 0 ) + StringBuilder builder2 = new StringBuilder(0x400); + builder2.Append("ランダムインデックスリスト残り: "); + if (numArray2.Length > 0) { - for( int n = 0; n < numArray2.Length; n++ ) + for (int n = 0; n < numArray2.Length; n++) { - builder2.Append( string.Format( "{0} ", numArray2[ n ] ) ); + builder2.Append(string.Format("{0} ", numArray2[n])); } } else { - builder2.Append( "(なし)" ); + builder2.Append("(なし)"); } - Trace.TraceInformation( builder2.ToString() ); + Trace.TraceInformation(builder2.ToString()); } CDTXMania.app.Skin.bgm選曲画面.t停止する(); } @@ -926,49 +927,49 @@ namespace DTXMania this.r確定された曲 = this.act曲リスト.r現在選択中の曲; this.r確定されたスコア = this.act曲リスト.r現在選択中のスコア; this.n確定された曲の難易度 = this.act曲リスト.n現在選択中の曲の現在の難易度レベル; - if( ( this.r確定された曲 != null ) && ( this.r確定されたスコア != null ) ) + if ((this.r確定された曲 != null) && (this.r確定されたスコア != null)) { this.eフェードアウト完了時の戻り値 = E戻り値.選曲した; - // this.actFOtoNowLoading.tフェードアウト開始(); // #27787 2012.3.10 yyagi 曲決定時の画面フェードアウトの省略 + // this.actFOtoNowLoading.tフェードアウト開始(); // #27787 2012.3.10 yyagi 曲決定時の画面フェードアウトの省略 base.eフェーズID = CStage.Eフェーズ.選曲_NowLoading画面へのフェードアウト; } CDTXMania.app.Skin.bgm選曲画面.t停止する(); } - private List t指定された曲が存在する場所の曲を列挙する_子リスト含む( C曲リストノード song ) + private List t指定された曲が存在する場所の曲を列挙する_子リスト含む(C曲リストノード song) { List list = new List(); song = song.r親ノード; - if( ( song == null ) && ( CDTXMania.app.Songs管理.list曲ルート.Count > 0 ) ) + if ((song == null) && (CDTXMania.app.Songs管理.list曲ルート.Count > 0)) { - foreach( C曲リストノード c曲リストノード in CDTXMania.app.Songs管理.list曲ルート ) + foreach (C曲リストノード c曲リストノード in CDTXMania.app.Songs管理.list曲ルート) { - if( ( c曲リストノード.eノード種別 == C曲リストノード.Eノード種別.SCORE ) || ( c曲リストノード.eノード種別 == C曲リストノード.Eノード種別.SCORE_MIDI ) ) + if ((c曲リストノード.eノード種別 == C曲リストノード.Eノード種別.SCORE) || (c曲リストノード.eノード種別 == C曲リストノード.Eノード種別.SCORE_MIDI)) { - list.Add( c曲リストノード ); + list.Add(c曲リストノード); } - if( ( c曲リストノード.list子リスト != null ) && CDTXMania.app.ConfigIni.bランダムセレクトで子BOXを検索対象とする ) + if ((c曲リストノード.list子リスト != null) && CDTXMania.app.ConfigIni.bランダムセレクトで子BOXを検索対象とする) { - this.t指定された曲の子リストの曲を列挙する_孫リスト含む( c曲リストノード, ref list ); + this.t指定された曲の子リストの曲を列挙する_孫リスト含む(c曲リストノード, ref list); } } return list; } - this.t指定された曲の子リストの曲を列挙する_孫リスト含む( song, ref list ); + this.t指定された曲の子リストの曲を列挙する_孫リスト含む(song, ref list); return list; } - private void t指定された曲の子リストの曲を列挙する_孫リスト含む( C曲リストノード r親, ref List list ) + private void t指定された曲の子リストの曲を列挙する_孫リスト含む(C曲リストノード r親, ref List list) { - if( ( r親 != null ) && ( r親.list子リスト != null ) ) + if ((r親 != null) && (r親.list子リスト != null)) { - foreach( C曲リストノード c曲リストノード in r親.list子リスト ) + foreach (C曲リストノード c曲リストノード in r親.list子リスト) { - if( ( c曲リストノード.eノード種別 == C曲リストノード.Eノード種別.SCORE ) || ( c曲リストノード.eノード種別 == C曲リストノード.Eノード種別.SCORE_MIDI ) ) + if ((c曲リストノード.eノード種別 == C曲リストノード.Eノード種別.SCORE) || (c曲リストノード.eノード種別 == C曲リストノード.Eノード種別.SCORE_MIDI)) { - list.Add( c曲リストノード ); + list.Add(c曲リストノード); } - if( ( c曲リストノード.list子リスト != null ) && CDTXMania.app.ConfigIni.bランダムセレクトで子BOXを検索対象とする ) + if ((c曲リストノード.list子リスト != null) && CDTXMania.app.ConfigIni.bランダムセレクトで子BOXを検索対象とする) { - this.t指定された曲の子リストの曲を列挙する_孫リスト含む( c曲リストノード, ref list ); + this.t指定された曲の子リストの曲を列挙する_孫リスト含む(c曲リストノード, ref list); } } } diff --git a/DTXManiaプロジェクト/コード/ステージ/06.曲読み込み/CStage曲読み込み.cs b/DTXManiaプロジェクト/コード/ステージ/06.曲読み込み/CStage曲読み込み.cs index 8e5e3eac..95e5109e 100644 --- a/DTXManiaプロジェクト/コード/ステージ/06.曲読み込み/CStage曲読み込み.cs +++ b/DTXManiaプロジェクト/コード/ステージ/06.曲読み込み/CStage曲読み込み.cs @@ -302,7 +302,7 @@ namespace DTXMania Trace.TraceInformation("FILE: {0}", CDTXMania.app.DTX.strファイル名の絶対パス); Trace.TraceInformation("---------------------------"); - string [] inst = new string [3] {"dr", "gt", "bs"}; + string[] inst = new string[3] { "dr", "gt", "bs" }; for (int instIndex = 0; instIndex < 3; ++instIndex) { bool readAutoGhostCond = false; diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏AVI.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏AVI.cs index 8a6b2664..8c4bb671 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏AVI.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏AVI.cs @@ -43,13 +43,13 @@ namespace DTXMania { try { - if ( this.tx描画用 != null && ( this.tx描画用.szテクスチャサイズ.Width != width || this.tx描画用.szテクスチャサイズ.Height != height ) ) + if (this.tx描画用 != null && (this.tx描画用.szテクスチャサイズ.Width != width || this.tx描画用.szテクスチャサイズ.Height != height)) { -//Debug.WriteLine( "orgW=" + this.tx描画用.szテクスチャサイズ.Width + ", W=" + width + ", orgH=" + this.tx描画用.szテクスチャサイズ.Height + ", H=" + height ); + //Debug.WriteLine( "orgW=" + this.tx描画用.szテクスチャサイズ.Width + ", W=" + width + ", orgH=" + this.tx描画用.szテクスチャサイズ.Height + ", H=" + height ); this.tx描画用.Dispose(); this.tx描画用 = null; } - if ( this.tx描画用 == null ) + if (this.tx描画用 == null) { this.tx描画用 = new CTexture( CDTXMania.app.Device, width, height, @@ -67,7 +67,7 @@ namespace DTXMania // メソッド public void Start(Ech定義 nチャンネル番号, CDTX.CAVI rAVI, int n開始サイズW, int n開始サイズH, int n終了サイズW, int n終了サイズH, int n画像側開始位置X, int n画像側開始位置Y, int n画像側終了位置X, int n画像側終了位置Y, int n表示側開始位置X, int n表示側開始位置Y, int n表示側終了位置X, int n表示側終了位置Y, int n総移動時間ms, int n移動開始時刻ms) { - if( nチャンネル番号 == Ech定義.Movie || nチャンネル番号 == Ech定義.MovieFull ) + if (nチャンネル番号 == Ech定義.Movie || nチャンネル番号 == Ech定義.MovieFull) { this.rAVI = rAVI; this.n開始サイズW = n開始サイズW; @@ -84,45 +84,45 @@ namespace DTXMania this.n表示側終了位置Y = n表示側終了位置Y * 2; this.n総移動時間ms = n総移動時間ms; this.PrepareProperSizeTexture((int)this.rAVI.avi.nフレーム幅, (int)this.rAVI.avi.nフレーム高さ); - this.n移動開始時刻ms = ( n移動開始時刻ms != -1 ) ? n移動開始時刻ms : CSound管理.rc演奏用タイマ.n現在時刻; + this.n移動開始時刻ms = (n移動開始時刻ms != -1) ? n移動開始時刻ms : CSound管理.rc演奏用タイマ.n現在時刻; this.rAVI.avi.Run(); } } - public void SkipStart( int n移動開始時刻ms ) + public void SkipStart(int n移動開始時刻ms) { - foreach( CChip chip in CDTXMania.app.DTX.listChip ) + foreach (CChip chip in CDTXMania.app.DTX.listChip) { - if( chip.n発声時刻ms > n移動開始時刻ms ) + if (chip.n発声時刻ms > n移動開始時刻ms) { break; } - switch( chip.eAVI種別 ) + switch (chip.eAVI種別) { case EAVI種別.AVI: { - if( chip.rAVI != null ) + if (chip.rAVI != null) { - if (this.rAVI == null ) + if (this.rAVI == null) { this.rAVI = chip.rAVI; // DTXVモードで、最初に途中再生で起動したときに、ここに来る } - this.bFullScreenMovie = ( chip.eチャンネル番号 == Ech定義.MovieFull || CDTXMania.app.ConfigIni.bForceAVIFullscreen ); // DTXVモードで、最初に途中再生で起動したときのために必要 - this.rAVI.avi.Seek( n移動開始時刻ms - chip.n発声時刻ms ); - this.Start( chip.eチャンネル番号, chip.rAVI, SampleFramework.GameWindowSize.Width, SampleFramework.GameWindowSize.Height, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, chip.n発声時刻ms ); + this.bFullScreenMovie = (chip.eチャンネル番号 == Ech定義.MovieFull || CDTXMania.app.ConfigIni.bForceAVIFullscreen); // DTXVモードで、最初に途中再生で起動したときのために必要 + this.rAVI.avi.Seek(n移動開始時刻ms - chip.n発声時刻ms); + this.Start(chip.eチャンネル番号, chip.rAVI, SampleFramework.GameWindowSize.Width, SampleFramework.GameWindowSize.Height, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, chip.n発声時刻ms); } continue; } case EAVI種別.AVIPAN: { - if( chip.rAVIPan != null ) + if (chip.rAVIPan != null) { - if ( this.rAVI == null ) + if (this.rAVI == null) { this.rAVI = chip.rAVI; // DTXVモードで、最初に途中再生で起動したときに、ここに来る } - this.bFullScreenMovie = ( chip.eチャンネル番号 == Ech定義.MovieFull || CDTXMania.app.ConfigIni.bForceAVIFullscreen ); // DTXVモードで、最初に途中再生で起動したときのために必要 - this.rAVI.avi.Seek( n移動開始時刻ms - chip.n発声時刻ms ); - this.Start( chip.eチャンネル番号, chip.rAVI, chip.rAVIPan.sz開始サイズ.Width, chip.rAVIPan.sz開始サイズ.Height, chip.rAVIPan.sz終了サイズ.Width, chip.rAVIPan.sz終了サイズ.Height, chip.rAVIPan.pt動画側開始位置.X, chip.rAVIPan.pt動画側開始位置.Y, chip.rAVIPan.pt動画側終了位置.X, chip.rAVIPan.pt動画側終了位置.Y, chip.rAVIPan.pt表示側開始位置.X, chip.rAVIPan.pt表示側開始位置.Y, chip.rAVIPan.pt表示側終了位置.X, chip.rAVIPan.pt表示側終了位置.Y, chip.n総移動時間, chip.n発声時刻ms ); + this.bFullScreenMovie = (chip.eチャンネル番号 == Ech定義.MovieFull || CDTXMania.app.ConfigIni.bForceAVIFullscreen); // DTXVモードで、最初に途中再生で起動したときのために必要 + this.rAVI.avi.Seek(n移動開始時刻ms - chip.n発声時刻ms); + this.Start(chip.eチャンネル番号, chip.rAVI, chip.rAVIPan.sz開始サイズ.Width, chip.rAVIPan.sz開始サイズ.Height, chip.rAVIPan.sz終了サイズ.Width, chip.rAVIPan.sz終了サイズ.Height, chip.rAVIPan.pt動画側開始位置.X, chip.rAVIPan.pt動画側開始位置.Y, chip.rAVIPan.pt動画側終了位置.X, chip.rAVIPan.pt動画側終了位置.Y, chip.rAVIPan.pt表示側開始位置.X, chip.rAVIPan.pt表示側開始位置.Y, chip.rAVIPan.pt表示側終了位置.X, chip.rAVIPan.pt表示側終了位置.Y, chip.n総移動時間, chip.n発声時刻ms); } continue; } @@ -131,50 +131,50 @@ namespace DTXMania } public void Stop() { - if( ( this.rAVI != null ) && ( this.rAVI.avi != null ) ) + if ((this.rAVI != null) && (this.rAVI.avi != null)) { this.n移動開始時刻ms = -1; } } - public void Cont( int n再開時刻ms ) + public void Cont(int n再開時刻ms) { - if( ( this.rAVI != null ) && ( this.rAVI.avi != null ) ) + if ((this.rAVI != null) && (this.rAVI.avi != null)) { this.n移動開始時刻ms = n再開時刻ms; } } public unsafe int t進行描画(int x, int y, int areaDrawingWidth, int areaDrawingHeight) { - if( !base.b活性化してない ) + if (!base.b活性化してない) { // Rectangle rectangle; // Rectangle rectangle2; - if ( ( ( this.n移動開始時刻ms == -1 ) || ( this.rAVI == null ) ) || ( this.rAVI.avi == null ) ) + if (((this.n移動開始時刻ms == -1) || (this.rAVI == null)) || (this.rAVI.avi == null)) { return 0; } - if ( this.tx描画用 == null ) + if (this.tx描画用 == null) { return 0; } int time = (int)((CSound管理.rc演奏用タイマ.n現在時刻 - this.n移動開始時刻ms) * (((double)CDTXMania.app.ConfigIni.n演奏速度) / 20.0)); - if( ( this.n総移動時間ms != 0 ) && ( this.n総移動時間ms < time ) ) + if ((this.n総移動時間ms != 0) && (this.n総移動時間ms < time)) { this.n総移動時間ms = 0; this.n移動開始時刻ms = -1; return 0; } - if( ( this.n総移動時間ms == 0 ) && time >= this.rAVI.avi.GetDuration() ) + if ((this.n総移動時間ms == 0) && time >= this.rAVI.avi.GetDuration()) { - if ( !bIsPreviewMovie ) + if (!bIsPreviewMovie) { this.n移動開始時刻ms = -1; return 0; } // PREVIEW時はループ再生する。移動開始時刻msを現時刻にして(=AVIを最初に巻き戻して)、ここまでに行った計算をやり直す。 this.n移動開始時刻ms = CSound管理.rc演奏用タイマ.n現在時刻; - time = (int) ( ( CSound管理.rc演奏用タイマ.n現在時刻 - this.n移動開始時刻ms ) * ( ( (double) CDTXMania.app.ConfigIni.n演奏速度 ) / 20.0 ) ); + time = (int)((CSound管理.rc演奏用タイマ.n現在時刻 - this.n移動開始時刻ms) * (((double)CDTXMania.app.ConfigIni.n演奏速度) / 20.0)); this.rAVI.avi.Seek(0); } /* @@ -295,7 +295,7 @@ namespace DTXMania */ if ((this.tx描画用 != null) && (this.n総移動時間ms != -1)) { - this.rAVI.avi.tGetBitmap( CDTXMania.app.Device, this.tx描画用, time); + this.rAVI.avi.tGetBitmap(CDTXMania.app.Device, this.tx描画用, time); // 旧動画 (278x355以下)の場合と、それ以上の場合とで、拡大/表示位置補正ロジックを変えること。 // 旧動画の場合は、「278x355の領域に表示される」ことを踏まえて扱う必要あり。 // 例: 上半分だけ動画表示するような場合は・・・「上半分だけ」という表示意図を維持すべきか?それとも無視して全画面拡大すべきか?? @@ -307,12 +307,12 @@ namespace DTXMania float magX = 2, magY = 2; int xx = x, yy = y; - if( CDTXMania.app.DTX != null && CDTXMania.app.DTX.bUse556x710BGAAVI ) + if (CDTXMania.app.DTX != null && CDTXMania.app.DTX.bUse556x710BGAAVI) { magX = magY = 1; } - if ( bFullScreenMovie || bIsPreviewMovie ) + if (bFullScreenMovie || bIsPreviewMovie) { #region [ アスペクト比を維持した拡大縮小 ] if (bFullScreenMovie) @@ -322,7 +322,7 @@ namespace DTXMania areaDrawingWidth = SampleFramework.GameWindowSize.Width; areaDrawingHeight = SampleFramework.GameWindowSize.Height; } - + magX = (float)areaDrawingWidth / this.rAVI.avi.nフレーム幅; magY = (float)areaDrawingHeight / this.rAVI.avi.nフレーム高さ; if (magX > magY) @@ -342,13 +342,13 @@ namespace DTXMania this.tx描画用.vc拡大縮小倍率.Y = magY; this.tx描画用.vc拡大縮小倍率.Z = 1.0f; this.tx描画用.bFlipY = true; - this.tx描画用.t2D描画( CDTXMania.app.Device, xx, yy ); + this.tx描画用.t2D描画(CDTXMania.app.Device, xx, yy); } } return 0; } - + // CActivity 実装 public override void On活性化() @@ -361,7 +361,7 @@ namespace DTXMania } public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { #if TEST_Direct3D9Ex this.tx描画用 = new CTexture( CDTXMania.app.Device, @@ -374,15 +374,15 @@ namespace DTXMania (bIsPreviewMovie) ? 269 : SampleFramework.GameWindowSize.Height ); #endif - this.tx描画用.vc拡大縮小倍率 = new Vector3( Scale.X, Scale.Y, 1f ); + this.tx描画用.vc拡大縮小倍率 = new Vector3(Scale.X, Scale.Y, 1f); base.OnManagedリソースの作成(); } } public override void OnManagedリソースの解放() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - if( this.tx描画用 != null ) + if (this.tx描画用 != null) { this.tx描画用.Dispose(); this.tx描画用 = null; @@ -392,7 +392,7 @@ namespace DTXMania } public override int On進行描画() { - throw new InvalidOperationException( "t進行描画(int,int)のほうを使用してください。" ); + throw new InvalidOperationException("t進行描画(int,int)のほうを使用してください。"); } diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏BGA.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏BGA.cs index 42099a0a..ee6028f2 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏BGA.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏BGA.cs @@ -18,87 +18,87 @@ namespace DTXMania { base.b活性化してない = true; } - - + + // メソッド - public void ChangeScope( Ech定義 nチャンネル, CDTX.CBMP bmp, CDTX.CBMPTEX bmptex ) + public void ChangeScope(Ech定義 nチャンネル, CDTX.CBMP bmp, CDTX.CBMPTEX bmptex) { - for( int i = 0; i < 8; i++ ) + for (int i = 0; i < 8; i++) { - if( nチャンネル == this.eChannel[ i ] ) + if (nチャンネル == this.eChannel[i]) { - this.stLayer[ i ].rBMP = bmp; - this.stLayer[ i ].rBMPTEX = bmptex; + this.stLayer[i].rBMP = bmp; + this.stLayer[i].rBMPTEX = bmptex; return; } } } - public void Start( Ech定義 nチャンネル, CDTX.CBMP bmp, CDTX.CBMPTEX bmptex, int n開始サイズW, int n開始サイズH, int n終了サイズW, int n終了サイズH, int n画像側開始位置X, int n画像側開始位置Y, int n画像側終了位置X, int n画像側終了位置Y, int n表示側開始位置X, int n表示側開始位置Y, int n表示側終了位置X, int n表示側終了位置Y, int n総移動時間ms ) + public void Start(Ech定義 nチャンネル, CDTX.CBMP bmp, CDTX.CBMPTEX bmptex, int n開始サイズW, int n開始サイズH, int n終了サイズW, int n終了サイズH, int n画像側開始位置X, int n画像側開始位置Y, int n画像側終了位置X, int n画像側終了位置Y, int n表示側開始位置X, int n表示側開始位置Y, int n表示側終了位置X, int n表示側終了位置Y, int n総移動時間ms) { - this.Start( nチャンネル, bmp, bmptex, n開始サイズW, n開始サイズH, n終了サイズW, n終了サイズH, n画像側開始位置X, n画像側開始位置Y, n画像側終了位置X, n画像側終了位置Y, n表示側開始位置X, n表示側開始位置Y, n表示側終了位置X, n表示側終了位置Y, n総移動時間ms, -1 ); + this.Start(nチャンネル, bmp, bmptex, n開始サイズW, n開始サイズH, n終了サイズW, n終了サイズH, n画像側開始位置X, n画像側開始位置Y, n画像側終了位置X, n画像側終了位置Y, n表示側開始位置X, n表示側開始位置Y, n表示側終了位置X, n表示側終了位置Y, n総移動時間ms, -1); } public void Start(Ech定義 nチャンネル, CDTX.CBMP bmp, CDTX.CBMPTEX bmptex, int n開始サイズW, int n開始サイズH, int n終了サイズW, int n終了サイズH, int n画像側開始位置X, int n画像側開始位置Y, int n画像側終了位置X, int n画像側終了位置Y, int n表示側開始位置X, int n表示側開始位置Y, int n表示側終了位置X, int n表示側終了位置Y, int n総移動時間ms, int n移動開始時刻ms) { - for( int i = 0; i < 8; i++ ) + for (int i = 0; i < 8; i++) { - if( nチャンネル == this.eChannel[ i ] ) + if (nチャンネル == this.eChannel[i]) { - this.stLayer[ i ].rBMP = bmp; - this.stLayer[ i ].rBMPTEX = bmptex; - this.stLayer[ i ].sz開始サイズ.Width = n開始サイズW; - this.stLayer[ i ].sz開始サイズ.Height = n開始サイズH; - this.stLayer[ i ].sz終了サイズ.Width = n終了サイズW; - this.stLayer[ i ].sz終了サイズ.Height = n終了サイズH; - this.stLayer[ i ].pt画像側開始位置.X = n画像側開始位置X; - this.stLayer[ i ].pt画像側開始位置.Y = n画像側開始位置Y; - this.stLayer[ i ].pt画像側終了位置.X = n画像側終了位置X; - this.stLayer[ i ].pt画像側終了位置.Y = n画像側終了位置Y; - this.stLayer[ i ].pt表示側開始位置.X = n表示側開始位置X * 2; - this.stLayer[ i ].pt表示側開始位置.Y = n表示側開始位置Y * 2; - this.stLayer[ i ].pt表示側終了位置.X = n表示側終了位置X * 2; - this.stLayer[ i ].pt表示側終了位置.Y = n表示側終了位置Y * 2; - this.stLayer[ i ].n総移動時間ms = n総移動時間ms; - this.stLayer[ i ].n移動開始時刻ms = ( n移動開始時刻ms != -1 ) ? n移動開始時刻ms : CDTXMania.app.Timer.n現在時刻; + this.stLayer[i].rBMP = bmp; + this.stLayer[i].rBMPTEX = bmptex; + this.stLayer[i].sz開始サイズ.Width = n開始サイズW; + this.stLayer[i].sz開始サイズ.Height = n開始サイズH; + this.stLayer[i].sz終了サイズ.Width = n終了サイズW; + this.stLayer[i].sz終了サイズ.Height = n終了サイズH; + this.stLayer[i].pt画像側開始位置.X = n画像側開始位置X; + this.stLayer[i].pt画像側開始位置.Y = n画像側開始位置Y; + this.stLayer[i].pt画像側終了位置.X = n画像側終了位置X; + this.stLayer[i].pt画像側終了位置.Y = n画像側終了位置Y; + this.stLayer[i].pt表示側開始位置.X = n表示側開始位置X * 2; + this.stLayer[i].pt表示側開始位置.Y = n表示側開始位置Y * 2; + this.stLayer[i].pt表示側終了位置.X = n表示側終了位置X * 2; + this.stLayer[i].pt表示側終了位置.Y = n表示側終了位置Y * 2; + this.stLayer[i].n総移動時間ms = n総移動時間ms; + this.stLayer[i].n移動開始時刻ms = (n移動開始時刻ms != -1) ? n移動開始時刻ms : CDTXMania.app.Timer.n現在時刻; } } } - public void SkipStart( int n移動開始時刻ms ) + public void SkipStart(int n移動開始時刻ms) { - for( int i = 0; i < CDTXMania.app.DTX.listChip.Count; i++ ) + for (int i = 0; i < CDTXMania.app.DTX.listChip.Count; i++) { - CChip chip = CDTXMania.app.DTX.listChip[ i ]; - if( chip.n発声時刻ms > n移動開始時刻ms ) + CChip chip = CDTXMania.app.DTX.listChip[i]; + if (chip.n発声時刻ms > n移動開始時刻ms) { return; } - switch( chip.eBGA種別 ) + switch (chip.eBGA種別) { case EBGA種別.BMP: - if( ( chip.rBMP != null ) && ( chip.rBMP.tx画像 != null ) ) + if ((chip.rBMP != null) && (chip.rBMP.tx画像 != null)) { - this.Start( chip.eチャンネル番号, chip.rBMP, null, chip.rBMP.n幅, chip.rBMP.n高さ, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, chip.n発声時刻ms ); + this.Start(chip.eチャンネル番号, chip.rBMP, null, chip.rBMP.n幅, chip.rBMP.n高さ, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, chip.n発声時刻ms); } break; case EBGA種別.BMPTEX: - if( ( chip.rBMPTEX != null ) && ( chip.rBMPTEX.tx画像 != null ) ) + if ((chip.rBMPTEX != null) && (chip.rBMPTEX.tx画像 != null)) { - this.Start( chip.eチャンネル番号, null, chip.rBMPTEX, chip.rBMPTEX.tx画像.sz画像サイズ.Width, chip.rBMPTEX.tx画像.sz画像サイズ.Height, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, chip.n発声時刻ms ); + this.Start(chip.eチャンネル番号, null, chip.rBMPTEX, chip.rBMPTEX.tx画像.sz画像サイズ.Width, chip.rBMPTEX.tx画像.sz画像サイズ.Height, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, chip.n発声時刻ms); } break; case EBGA種別.BGA: - if( chip.rBGA != null ) + if (chip.rBGA != null) { - this.Start( chip.eチャンネル番号, chip.rBMP, chip.rBMPTEX, chip.rBGA.pt画像側右下座標.X - chip.rBGA.pt画像側左上座標.X, chip.rBGA.pt画像側右下座標.Y - chip.rBGA.pt画像側左上座標.Y, 0, 0, chip.rBGA.pt画像側左上座標.X, chip.rBGA.pt画像側左上座標.Y, 0, 0, chip.rBGA.pt表示座標.X, chip.rBGA.pt表示座標.Y, 0, 0, 0, chip.n発声時刻ms ); + this.Start(chip.eチャンネル番号, chip.rBMP, chip.rBMPTEX, chip.rBGA.pt画像側右下座標.X - chip.rBGA.pt画像側左上座標.X, chip.rBGA.pt画像側右下座標.Y - chip.rBGA.pt画像側左上座標.Y, 0, 0, chip.rBGA.pt画像側左上座標.X, chip.rBGA.pt画像側左上座標.Y, 0, 0, chip.rBGA.pt表示座標.X, chip.rBGA.pt表示座標.Y, 0, 0, 0, chip.n発声時刻ms); } break; case EBGA種別.BGAPAN: - if( chip.rBGAPan != null ) + if (chip.rBGAPan != null) { - this.Start( chip.eチャンネル番号, chip.rBMP, chip.rBMPTEX, chip.rBGAPan.sz開始サイズ.Width, chip.rBGAPan.sz開始サイズ.Height, chip.rBGAPan.sz終了サイズ.Width, chip.rBGAPan.sz終了サイズ.Height, chip.rBGAPan.pt画像側開始位置.X, chip.rBGAPan.pt画像側開始位置.Y, chip.rBGAPan.pt画像側終了位置.X, chip.rBGAPan.pt画像側終了位置.Y, chip.rBGAPan.pt表示側開始位置.X, chip.rBGAPan.pt表示側開始位置.Y, chip.rBGAPan.pt表示側終了位置.X, chip.rBGAPan.pt表示側終了位置.Y, chip.n総移動時間, chip.n発声時刻ms ); + this.Start(chip.eチャンネル番号, chip.rBMP, chip.rBMPTEX, chip.rBGAPan.sz開始サイズ.Width, chip.rBGAPan.sz開始サイズ.Height, chip.rBGAPan.sz終了サイズ.Width, chip.rBGAPan.sz終了サイズ.Height, chip.rBGAPan.pt画像側開始位置.X, chip.rBGAPan.pt画像側開始位置.Y, chip.rBGAPan.pt画像側終了位置.X, chip.rBGAPan.pt画像側終了位置.Y, chip.rBGAPan.pt表示側開始位置.X, chip.rBGAPan.pt表示側開始位置.Y, chip.rBGAPan.pt表示側終了位置.X, chip.rBGAPan.pt表示側終了位置.Y, chip.n総移動時間, chip.n発声時刻ms); } break; } @@ -106,9 +106,9 @@ namespace DTXMania } public void Stop() { - for( int i = 0; i < 8; i++ ) + for (int i = 0; i < 8; i++) { - this.stLayer[ i ].n移動開始時刻ms = -1; + this.stLayer[i].n移動開始時刻ms = -1; } } @@ -117,30 +117,30 @@ namespace DTXMania public override void On活性化() { - for( int i = 0; i < 8; i++ ) + for (int i = 0; i < 8; i++) { STLAYER stlayer2 = new STLAYER(); STLAYER stlayer = stlayer2; stlayer.rBMP = null; stlayer.rBMPTEX = null; stlayer.n移動開始時刻ms = -1; - this.stLayer[ i ] = stlayer; + this.stLayer[i] = stlayer; } base.On活性化(); } public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - using( Surface surface = CDTXMania.app.Device.GetBackBuffer( 0, 0 ) ) + using (Surface surface = CDTXMania.app.Device.GetBackBuffer(0, 0)) { try { - this.sfBackBuffer = Surface.CreateOffscreenPlain( CDTXMania.app.Device, surface.Description.Width, surface.Description.Height, surface.Description.Format, Pool.SystemMemory ); + this.sfBackBuffer = Surface.CreateOffscreenPlain(CDTXMania.app.Device, surface.Description.Width, surface.Description.Height, surface.Description.Format, Pool.SystemMemory); } - catch ( Direct3D9Exception e ) + catch (Direct3D9Exception e) { - Trace.TraceError( "CAct演奏BGA: Error: ( " + e.Message + " )" ); + Trace.TraceError("CAct演奏BGA: Error: ( " + e.Message + " )"); } } base.OnManagedリソースの作成(); @@ -148,9 +148,9 @@ namespace DTXMania } public override void OnManagedリソースの解放() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - if( this.sfBackBuffer != null ) + if (this.sfBackBuffer != null) { this.sfBackBuffer.Dispose(); this.sfBackBuffer = null; @@ -160,54 +160,54 @@ namespace DTXMania } public override int On進行描画() { - throw new InvalidOperationException( "t進行描画(x,y)のほうを使用してください。" ); + throw new InvalidOperationException("t進行描画(x,y)のほうを使用してください。"); } - public int t進行描画( int x, int y ) + public int t進行描画(int x, int y) { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - for( int i = 0; i < 8; i++ ) + for (int i = 0; i < 8; i++) { - if( ( ( this.stLayer[ i ].n移動開始時刻ms != -1 ) && ( ( this.stLayer[ i ].rBMP != null ) || ( this.stLayer[ i ].rBMPTEX != null ) ) ) && ( ( ( this.stLayer[ i ].rBMP == null ) || ( this.stLayer[ i ].rBMP.bUse && ( this.stLayer[ i ].rBMP.tx画像 != null ) ) ) && ( ( this.stLayer[ i ].rBMPTEX == null ) || ( this.stLayer[ i ].rBMPTEX.bUse && ( this.stLayer[ i ].rBMPTEX.tx画像 != null ) ) ) ) ) + if (((this.stLayer[i].n移動開始時刻ms != -1) && ((this.stLayer[i].rBMP != null) || (this.stLayer[i].rBMPTEX != null))) && (((this.stLayer[i].rBMP == null) || (this.stLayer[i].rBMP.bUse && (this.stLayer[i].rBMP.tx画像 != null))) && ((this.stLayer[i].rBMPTEX == null) || (this.stLayer[i].rBMPTEX.bUse && (this.stLayer[i].rBMPTEX.tx画像 != null))))) { - Size sizeStart = this.stLayer[ i ].sz開始サイズ; - Size sizeEnd = this.stLayer[ i ].sz終了サイズ; - Point ptImgStart = this.stLayer[ i ].pt画像側開始位置; - Point ptImgEnd = this.stLayer[ i ].pt画像側終了位置; - Point ptDispStart = this.stLayer[ i ].pt表示側開始位置; - Point ptDispEnd = this.stLayer[ i ].pt表示側終了位置; - long timeTotal = this.stLayer[ i ].n総移動時間ms; - long timeMoveStart = this.stLayer[ i ].n移動開始時刻ms; - - if( CDTXMania.app.Timer.n現在時刻 < timeMoveStart ) + Size sizeStart = this.stLayer[i].sz開始サイズ; + Size sizeEnd = this.stLayer[i].sz終了サイズ; + Point ptImgStart = this.stLayer[i].pt画像側開始位置; + Point ptImgEnd = this.stLayer[i].pt画像側終了位置; + Point ptDispStart = this.stLayer[i].pt表示側開始位置; + Point ptDispEnd = this.stLayer[i].pt表示側終了位置; + long timeTotal = this.stLayer[i].n総移動時間ms; + long timeMoveStart = this.stLayer[i].n移動開始時刻ms; + + if (CDTXMania.app.Timer.n現在時刻 < timeMoveStart) { timeMoveStart = CDTXMania.app.Timer.n現在時刻; } // Size size3 = new Size( 0x116, 0x163 ); - Size size表示域 = new Size( 278 * 2, 355 * 2 ); + Size size表示域 = new Size(278 * 2, 355 * 2); // chnrm0 : #34192 // 表示域を2倍に変更した。 // x,yについては次のように変更した。 // 338,57 => 1014+139,128 (Dr.) 139は278の半分で、GR領域の中央によせるためにすこし右側にずらした。 // 181,50 => 682, 112 (Gt.) Size sizeBMP = new Size( - ( this.stLayer[ i ].rBMP != null ) ? this.stLayer[ i ].rBMP.n幅 : this.stLayer[ i ].rBMPTEX.tx画像.sz画像サイズ.Width, - ( this.stLayer[ i ].rBMP != null ) ? this.stLayer[ i ].rBMP.n高さ : this.stLayer[ i ].rBMPTEX.tx画像.sz画像サイズ.Height ); + (this.stLayer[i].rBMP != null) ? this.stLayer[i].rBMP.n幅 : this.stLayer[i].rBMPTEX.tx画像.sz画像サイズ.Width, + (this.stLayer[i].rBMP != null) ? this.stLayer[i].rBMP.n高さ : this.stLayer[i].rBMPTEX.tx画像.sz画像サイズ.Height); + + int n再生位置 = (int)((CDTXMania.app.Timer.n現在時刻 - timeMoveStart) * (((double)CDTXMania.app.ConfigIni.n演奏速度) / 20.0)); - int n再生位置 = (int) ( ( CDTXMania.app.Timer.n現在時刻 - timeMoveStart ) * ( ( (double) CDTXMania.app.ConfigIni.n演奏速度 ) / 20.0 ) ); - - if( ( timeTotal != 0 ) && ( timeTotal < n再生位置 ) ) + if ((timeTotal != 0) && (timeTotal < n再生位置)) { - this.stLayer[ i ].pt画像側開始位置 = ptImgStart = ptImgEnd; - this.stLayer[ i ].pt表示側開始位置 = ptDispStart = ptDispEnd; - this.stLayer[ i ].sz開始サイズ = sizeStart = sizeEnd; - this.stLayer[ i ].n総移動時間ms = timeTotal = 0; + this.stLayer[i].pt画像側開始位置 = ptImgStart = ptImgEnd; + this.stLayer[i].pt表示側開始位置 = ptDispStart = ptDispEnd; + this.stLayer[i].sz開始サイズ = sizeStart = sizeEnd; + this.stLayer[i].n総移動時間ms = timeTotal = 0; } - + Rectangle rect画像側 = new Rectangle(); Rectangle rect表示側 = new Rectangle(); - - if( timeTotal == 0 ) + + if (timeTotal == 0) { rect画像側.X = ptImgStart.X; rect画像側.Y = ptImgStart.Y; @@ -220,123 +220,123 @@ namespace DTXMania } else { - double coefSizeWhileMoving = ( (double) n再生位置 ) / ( (double) timeTotal ); - Size sizeWhileMoving = new Size( sizeStart.Width + ( (int) ( ( sizeEnd.Width - sizeStart.Width ) * coefSizeWhileMoving ) ), sizeStart.Height + ( (int) ( ( sizeEnd.Height - sizeStart.Height ) * coefSizeWhileMoving ) ) ); - rect画像側.X = ptImgStart.X + ( (int) ( ( ptImgEnd.X - ptImgStart.X ) * coefSizeWhileMoving ) ); - rect画像側.Y = ptImgStart.Y + ( (int) ( ( ptImgEnd.Y - ptImgStart.Y ) * coefSizeWhileMoving ) ); + double coefSizeWhileMoving = ((double)n再生位置) / ((double)timeTotal); + Size sizeWhileMoving = new Size(sizeStart.Width + ((int)((sizeEnd.Width - sizeStart.Width) * coefSizeWhileMoving)), sizeStart.Height + ((int)((sizeEnd.Height - sizeStart.Height) * coefSizeWhileMoving))); + rect画像側.X = ptImgStart.X + ((int)((ptImgEnd.X - ptImgStart.X) * coefSizeWhileMoving)); + rect画像側.Y = ptImgStart.Y + ((int)((ptImgEnd.Y - ptImgStart.Y) * coefSizeWhileMoving)); rect画像側.Width = sizeWhileMoving.Width; rect画像側.Height = sizeWhileMoving.Height; - rect表示側.X = ptDispStart.X + ( (int) ( ( ptDispEnd.X - ptDispStart.X ) * coefSizeWhileMoving ) ); - rect表示側.Y = ptDispStart.Y + ( (int) ( ( ptDispEnd.Y - ptDispStart.Y ) * coefSizeWhileMoving ) ); + rect表示側.X = ptDispStart.X + ((int)((ptDispEnd.X - ptDispStart.X) * coefSizeWhileMoving)); + rect表示側.Y = ptDispStart.Y + ((int)((ptDispEnd.Y - ptDispStart.Y) * coefSizeWhileMoving)); rect表示側.Width = sizeWhileMoving.Width * 2; rect表示側.Height = sizeWhileMoving.Height * 2; } - if( - ( rect画像側.Right > 0 ) && - ( rect画像側.Bottom > 0 ) && - ( rect画像側.Left < sizeBMP.Width ) && - ( rect画像側.Top < sizeBMP.Height ) && - ( rect表示側.Right > 0 ) && - ( rect表示側.Bottom > 0 ) && - ( rect表示側.Left < size表示域.Width ) && - ( rect表示側.Top < size表示域.Height ) + if ( + (rect画像側.Right > 0) && + (rect画像側.Bottom > 0) && + (rect画像側.Left < sizeBMP.Width) && + (rect画像側.Top < sizeBMP.Height) && + (rect表示側.Right > 0) && + (rect表示側.Bottom > 0) && + (rect表示側.Left < size表示域.Width) && + (rect表示側.Top < size表示域.Height) ) { // 画像側の表示指定が画像の境界をまたいでいる場合補正 - if( rect画像側.X < 0 ) + if (rect画像側.X < 0) { rect表示側.Width -= -rect画像側.X; rect表示側.X += -rect画像側.X; rect画像側.Width -= -rect画像側.X; rect画像側.X = 0; } - if( rect画像側.Y < 0 ) + if (rect画像側.Y < 0) { rect表示側.Height -= -rect画像側.Y; rect表示側.Y += -rect画像側.Y; rect画像側.Height -= -rect画像側.Y; rect画像側.Y = 0; } - if( rect画像側.Right > sizeBMP.Width ) + if (rect画像側.Right > sizeBMP.Width) { rect表示側.Width -= rect画像側.Right - sizeBMP.Width; rect画像側.Width -= rect画像側.Right - sizeBMP.Width; } - if( rect画像側.Bottom > sizeBMP.Height ) + if (rect画像側.Bottom > sizeBMP.Height) { rect表示側.Height -= rect画像側.Bottom - sizeBMP.Height; rect画像側.Height -= rect画像側.Bottom - sizeBMP.Height; } // 表示側の表示指定が表示域の境界をまたいでいる場合補正 - if( rect表示側.X < 0 ) + if (rect表示側.X < 0) { rect画像側.Width -= -rect表示側.X; rect画像側.X += -rect表示側.X; rect表示側.Width -= rect表示側.X; rect表示側.X = 0; } - if( rect表示側.Y < 0 ) + if (rect表示側.Y < 0) { rect画像側.Height -= -rect表示側.Y; rect画像側.Y += -rect表示側.Y; rect表示側.Height -= -rect表示側.Y; rect表示側.Y = 0; } - if( rect表示側.Right > size表示域.Width ) + if (rect表示側.Right > size表示域.Width) { - rect画像側.Width -= ( rect表示側.Right - size表示域.Width ) / 2; + rect画像側.Width -= (rect表示側.Right - size表示域.Width) / 2; rect表示側.Width -= rect表示側.Right - size表示域.Width; } - if( rect表示側.Bottom > size表示域.Height ) + if (rect表示側.Bottom > size表示域.Height) { - rect画像側.Height -= ( rect表示側.Bottom - size表示域.Height ) / 2; + rect画像側.Height -= (rect表示側.Bottom - size表示域.Height) / 2; rect表示側.Height -= rect表示側.Bottom - size表示域.Height; } - - if( - ( rect画像側.Width > 0 ) && - ( rect画像側.Height > 0 ) && - ( rect表示側.Width > 0 ) && - ( rect表示側.Height > 0 ) && - ( rect画像側.Right >= 0 ) && - ( rect画像側.Bottom >= 0 ) && - ( rect画像側.Left <= sizeBMP.Width ) && - ( rect画像側.Top <= sizeBMP.Height ) && - ( rect表示側.Right >= 0 ) && - ( rect表示側.Bottom >= 0 ) && - ( rect表示側.Left <= size表示域.Width ) && - ( rect表示側.Top <= size表示域.Height ) + if ( + (rect画像側.Width > 0) && + (rect画像側.Height > 0) && + (rect表示側.Width > 0) && + (rect表示側.Height > 0) && + + (rect画像側.Right >= 0) && + (rect画像側.Bottom >= 0) && + (rect画像側.Left <= sizeBMP.Width) && + (rect画像側.Top <= sizeBMP.Height) && + (rect表示側.Right >= 0) && + (rect表示側.Bottom >= 0) && + (rect表示側.Left <= size表示域.Width) && + (rect表示側.Top <= size表示域.Height) ) { - if ( ( this.stLayer[ i ].rBMP != null ) && ( this.stLayer[ i ].rBMP.tx画像 != null ) ) + if ((this.stLayer[i].rBMP != null) && (this.stLayer[i].rBMP.tx画像 != null)) { - if ( CDTXMania.app.DTX != null && !CDTXMania.app.DTX.bUse556x710BGAAVI ) + if (CDTXMania.app.DTX != null && !CDTXMania.app.DTX.bUse556x710BGAAVI) { this.stLayer[i].rBMP.tx画像.vc拡大縮小倍率.X = 2.0f; this.stLayer[i].rBMP.tx画像.vc拡大縮小倍率.Y = 2.0f; this.stLayer[i].rBMP.tx画像.vc拡大縮小倍率.Z = 1.0f; } - this.stLayer[ i ].rBMP.tx画像.t2D描画( + this.stLayer[i].rBMP.tx画像.t2D描画( CDTXMania.app.Device, (x + rect表示側.X), (y + rect表示側.Y), - rect画像側 ); + rect画像側); } - else if( ( this.stLayer[ i ].rBMPTEX != null ) && ( this.stLayer[ i ].rBMPTEX.tx画像 != null ) ) + else if ((this.stLayer[i].rBMPTEX != null) && (this.stLayer[i].rBMPTEX.tx画像 != null)) { - if ( CDTXMania.app.DTX != null && !CDTXMania.app.DTX.bUse556x710BGAAVI ) + if (CDTXMania.app.DTX != null && !CDTXMania.app.DTX.bUse556x710BGAAVI) { this.stLayer[i].rBMPTEX.tx画像.vc拡大縮小倍率.X = 2.0f; this.stLayer[i].rBMPTEX.tx画像.vc拡大縮小倍率.Y = 2.0f; this.stLayer[i].rBMPTEX.tx画像.vc拡大縮小倍率.Z = 1.0f; } - this.stLayer[ i ].rBMPTEX.tx画像.t2D描画( + this.stLayer[i].rBMPTEX.tx画像.t2D描画( CDTXMania.app.Device, (x + rect表示側.X), (y + rect表示側.Y), - rect画像側 ); + rect画像側); } } } @@ -345,13 +345,13 @@ namespace DTXMania } return 0; } - + // その他 #region [ private ] //----------------- - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] private struct STLAYER { public CDTX.CBMP rBMP; @@ -378,7 +378,7 @@ namespace DTXMania Ech定義.BGALayer8 // 0x60 }; private Surface sfBackBuffer; - private STLAYER[] stLayer = new STLAYER[ 8 ]; + private STLAYER[] stLayer = new STLAYER[8]; //----------------- #endregion } diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏Combo共通.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏Combo共通.cs index 8bb6812c..f08c34a2 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏Combo共通.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏Combo共通.cs @@ -17,11 +17,11 @@ namespace DTXMania { public CAct演奏Combo共通 act; - public int this[ int index ] + public int this[int index] { get { - switch( index ) + switch (index) { case 0: return this.Drums; @@ -36,7 +36,7 @@ namespace DTXMania } set { - switch( index ) + switch (index) { case 0: this.Drums = value; @@ -62,7 +62,7 @@ namespace DTXMania set { this.drums = value; - if( this.drums > this.Drums最高値 ) + if (this.drums > this.Drums最高値) { this.Drums最高値 = this.drums; } @@ -79,7 +79,7 @@ namespace DTXMania set { this.guitar = value; - if( this.guitar > this.Guitar最高値 ) + if (this.guitar > this.Guitar最高値) { this.Guitar最高値 = this.guitar; } @@ -96,7 +96,7 @@ namespace DTXMania set { this.bass = value; - if( this.bass > this.Bass最高値 ) + if (this.bass > this.Bass最高値) { this.Bass最高値 = this.bass; } @@ -120,17 +120,17 @@ namespace DTXMania protected enum EEvent { 非表示, 数値更新, 同一数値, ミス通知 } protected enum EMode { 非表示中, 進行表示中, 残像表示中 } - protected const int nギターコンボのCOMBO文字の高さ = (int) ( 16 * Scale.Y ); - protected const int nギターコンボのCOMBO文字の幅 = (int) ( 124 ); - protected const int nギターコンボの高さ = (int) ( 78 ); - protected const int nギターコンボの幅 = (int) ( 64 ); - protected const int nギターコンボの文字間隔 = (int) ( 1 * Scale.X ); - protected const int nドラムコンボのCOMBO文字の高さ = (int) ( 32 * Scale.Y ); - protected const int nドラムコンボのCOMBO文字の幅 = (int) 256; //( 90 * Scale.X ); - protected const int nドラムコンボの高さ = (int) ( 158 ); - protected const int nドラムコンボの幅 = (int) ( 128 ); - protected const int nドラムコンボの文字間隔 = (int) ( 2 * Scale.X ); - protected int[] nジャンプ差分値 = new int[ 180 ]; + protected const int nギターコンボのCOMBO文字の高さ = (int)(16 * Scale.Y); + protected const int nギターコンボのCOMBO文字の幅 = (int)(124); + protected const int nギターコンボの高さ = (int)(78); + protected const int nギターコンボの幅 = (int)(64); + protected const int nギターコンボの文字間隔 = (int)(1 * Scale.X); + protected const int nドラムコンボのCOMBO文字の高さ = (int)(32 * Scale.Y); + protected const int nドラムコンボのCOMBO文字の幅 = (int)256; //( 90 * Scale.X ); + protected const int nドラムコンボの高さ = (int)(158); + protected const int nドラムコンボの幅 = (int)(128); + protected const int nドラムコンボの文字間隔 = (int)(2 * Scale.X); + protected int[] nジャンプ差分値 = new int[180]; protected CSTATUS status; protected CTexture txCOMBOギター; protected CTexture txCOMBOドラム; @@ -142,11 +142,11 @@ namespace DTXMania public CSTAT Bass = new CSTAT(); public CSTAT Drums = new CSTAT(); public CSTAT Guitar = new CSTAT(); - public CSTAT this[ int index ] + public CSTAT this[int index] { get { - switch( index ) + switch (index) { case 0: return this.Drums; @@ -161,7 +161,7 @@ namespace DTXMania } set { - switch( index ) + switch (index) { case 0: this.Drums = value; @@ -200,36 +200,36 @@ namespace DTXMania this.b活性化してない = true; // 180度分のジャンプY座標差分を取得。(0度: 0 → 90度:-15 → 180度: 0) - for( int i = 0; i < 180; i++ ) - this.nジャンプ差分値[ i ] = (int) ( -15.0 * Math.Sin( ( Math.PI * i ) / 180.0 ) * Scale.Y ); + for (int i = 0; i < 180; i++) + this.nジャンプ差分値[i] = (int)(-15.0 * Math.Sin((Math.PI * i) / 180.0) * Scale.Y); 演奏判定ライン座標 = new C演奏判定ライン座標共通(); } // メソッド - protected virtual void tコンボ表示_ドラム( int nCombo値, int nジャンプインデックス ) + protected virtual void tコンボ表示_ドラム(int nCombo値, int nジャンプインデックス) { #region [ 事前チェック。] //----------------- - if( CDTXMania.app.ConfigIni.ドラムコンボ文字の表示位置 == Eドラムコンボ文字の表示位置.OFF ) + if (CDTXMania.app.ConfigIni.ドラムコンボ文字の表示位置 == Eドラムコンボ文字の表示位置.OFF) return; // 表示OFF。 - if( nCombo値 == 0 ) + if (nCombo値 == 0) return; // コンボゼロは表示しない。 //----------------- #endregion - int[] n位の数 = new int[ 10 ]; // 表示は10桁もあれば足りるだろう + int[] n位の数 = new int[10]; // 表示は10桁もあれば足りるだろう #region [ nCombo値を桁数ごとに n位の数[] に格納する。(例:nCombo値=125 のとき n位の数 = { 5,2,1,0,0,0,0,0,0,0 } ) ] //----------------- int n = nCombo値; int n桁数 = 0; - while( ( n > 0 ) && ( n桁数 < 10 ) ) + while ((n > 0) && (n桁数 < 10)) { - n位の数[ n桁数 ] = n % 10; // 1の位を格納 - n = ( n - ( n % 10 ) ) / 10; // 右へシフト(例: 12345 → 1234 ) + n位の数[n桁数] = n % 10; // 1の位を格納 + n = (n - (n % 10)) / 10; // 右へシフト(例: 12345 → 1234 ) n桁数++; } //----------------- @@ -241,14 +241,14 @@ namespace DTXMania #region [ e表示位置 の調整 ] //----------------- - if( CDTXMania.app.ConfigIni.bGuitar有効 ) + if (CDTXMania.app.ConfigIni.bGuitar有効) { - if( bass ) + if (bass) { // ベースがあるときは問答無用で LEFT 表示のみ。 e表示位置 = Eドラムコンボ文字の表示位置.LEFT; } - else if( guitar && ( e表示位置 == Eドラムコンボ文字の表示位置.RIGHT ) ) + else if (guitar && (e表示位置 == Eドラムコンボ文字の表示位置.RIGHT)) { // ベースがなくてもギターがあるなら、RIGHT は CENTER に強制変更。 e表示位置 = Eドラムコンボ文字の表示位置.CENTER; @@ -261,36 +261,36 @@ namespace DTXMania //----------------- const int n1桁ごとのジャンプの遅れ = 50; // 1桁につき 50 インデックス遅れる - int nX中央位置px = (int) ( 187 * Scale.X ); - switch( e表示位置 ) + int nX中央位置px = (int)(187 * Scale.X); + switch (e表示位置) { case Eドラムコンボ文字の表示位置.LEFT: - nX中央位置px = ( CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ) ?(int) ( 187 * Scale.X ) : 360; + nX中央位置px = (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left) ? (int)(187 * Scale.X) : 360; break; case Eドラムコンボ文字の表示位置.CENTER: - nX中央位置px = ( CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ) ? (int) ( 320 * Scale.X ) : 960; + nX中央位置px = (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left) ? (int)(320 * Scale.X) : 960; break; case Eドラムコンボ文字の表示位置.RIGHT: - nX中央位置px = ( CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ) ?(int) ( 485 * Scale.X ) : 1920 - 340; + nX中央位置px = (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left) ? (int)(485 * Scale.X) : 1920 - 340; break; } - int nY上辺位置px = CDTXMania.app.ConfigIni.bReverse.Drums ? (int) ( 350 * Scale.Y ) : (int) ( 60 * Scale.Y ); + int nY上辺位置px = CDTXMania.app.ConfigIni.bReverse.Drums ? (int)(350 * Scale.Y) : (int)(60 * Scale.Y); int n数字の全長px = ((nドラムコンボの幅 + nドラムコンボの文字間隔) * n桁数);// +nドラムコンボのCOMBO文字の幅; int x = (nX中央位置px + (n数字の全長px / 2));// -nドラムコンボのCOMBO文字の幅; int y = (nY上辺位置px + nドラムコンボの高さ);// -nドラムコンボのCOMBO文字の高さ; - if( this.txCOMBOドラム != null ) + if (this.txCOMBOドラム != null) this.txCOMBOドラム.t2D描画( CDTXMania.app.Device, nX中央位置px - nドラムコンボのCOMBO文字の幅 / 2, y,//nドラムコンボのCOMBO文字の高さ / 2, new Rectangle( 256, - (int) 316, //( 140 * Scale.Y ), - (int) 256, //( 90 * Scale.X ), - (int) 72 + (int)316, //( 140 * Scale.Y ), + (int)256, //( 90 * Scale.X ), + (int)72 ) ); // "COMBO" を表示。 @@ -299,74 +299,74 @@ namespace DTXMania y += this.nジャンプ差分値[nJump]; // COMBO値を1の位から順に表示。 - for( int i = 0; i < n桁数; i++ ) + for (int i = 0; i < n桁数; i++) { x -= nドラムコンボの幅 + nドラムコンボの文字間隔; y = nY上辺位置px; - nJump = nジャンプインデックス - ( ( ( n桁数 - i ) - 1 ) * n1桁ごとのジャンプの遅れ ); - if( ( nJump >= 0 ) && ( nJump < 180 ) ) - y += this.nジャンプ差分値[ nJump ]; + nJump = nジャンプインデックス - (((n桁数 - i) - 1) * n1桁ごとのジャンプの遅れ); + if ((nJump >= 0) && (nJump < 180)) + y += this.nジャンプ差分値[nJump]; - if( this.txCOMBOドラム != null ) + if (this.txCOMBOドラム != null) { - this.txCOMBOドラム.t2D描画( CDTXMania.app.Device, + this.txCOMBOドラム.t2D描画(CDTXMania.app.Device, x, y, new Rectangle( - ( n位の数[ i ] % 4 ) * nドラムコンボの幅, - ( n位の数[ i ] / 4 ) * nドラムコンボの高さ, + (n位の数[i] % 4) * nドラムコンボの幅, + (n位の数[i] / 4) * nドラムコンボの高さ, nドラムコンボの幅, - nドラムコンボの高さ ) + nドラムコンボの高さ) ); } } //----------------- #endregion } - protected virtual void tコンボ表示_ギター( int nCombo値, int nジャンプインデックス ) + protected virtual void tコンボ表示_ギター(int nCombo値, int nジャンプインデックス) { } - protected virtual void tコンボ表示_ベース( int nCombo値, int nジャンプインデックス ) + protected virtual void tコンボ表示_ベース(int nCombo値, int nジャンプインデックス) { } - protected void tコンボ表示_ギター( int nCombo値, int n表示中央X, int n表示中央Y, int nジャンプインデックス ) + protected void tコンボ表示_ギター(int nCombo値, int n表示中央X, int n表示中央Y, int nジャンプインデックス) { #region [ 事前チェック。] //----------------- - if ( ( (E判定文字表示位置) CDTXMania.app.ConfigIni.判定文字表示位置.Guitar ) == E判定文字表示位置.表示OFF ) + if (((E判定文字表示位置)CDTXMania.app.ConfigIni.判定文字表示位置.Guitar) == E判定文字表示位置.表示OFF) return; // 表示OFF。 - if ( nCombo値 == 0 ) + if (nCombo値 == 0) return; // コンボゼロは表示しない。 - //----------------- + //----------------- #endregion - tコンボ表示_ギターベース( nCombo値, n表示中央X, n表示中央Y, nジャンプインデックス ); + tコンボ表示_ギターベース(nCombo値, n表示中央X, n表示中央Y, nジャンプインデックス); } - protected void tコンボ表示_ベース( int nCombo値, int n表示中央X, int n表示中央Y, int nジャンプインデックス ) + protected void tコンボ表示_ベース(int nCombo値, int n表示中央X, int n表示中央Y, int nジャンプインデックス) { #region [ 事前チェック。] //----------------- - if ( ( (E判定文字表示位置) CDTXMania.app.ConfigIni.判定文字表示位置.Bass ) == E判定文字表示位置.表示OFF ) + if (((E判定文字表示位置)CDTXMania.app.ConfigIni.判定文字表示位置.Bass) == E判定文字表示位置.表示OFF) return; // 表示OFF。 - if ( nCombo値 == 0 ) + if (nCombo値 == 0) return; // コンボゼロは表示しない。 - //----------------- + //----------------- #endregion - tコンボ表示_ギターベース( nCombo値, n表示中央X, n表示中央Y, nジャンプインデックス ); + tコンボ表示_ギターベース(nCombo値, n表示中央X, n表示中央Y, nジャンプインデックス); } - protected void tコンボ表示_ギターベース( int nCombo値, int n表示中央X, int n表示中央Y, int nジャンプインデックス ) + protected void tコンボ表示_ギターベース(int nCombo値, int n表示中央X, int n表示中央Y, int nジャンプインデックス) { - int[] n位の数 = new int[ 10 ]; // 表示は10桁もあれば足りるだろう + int[] n位の数 = new int[10]; // 表示は10桁もあれば足りるだろう #region [ nCombo値を桁数ごとに n位の数[] に格納する。(例:nCombo値=125 のとき n位の数 = { 5,2,1,0,0,0,0,0,0,0 } ) ] //----------------- int n = nCombo値; int n桁数 = 0; - while( ( n > 0 ) && ( n桁数 < 10 ) ) + while ((n > 0) && (n桁数 < 10)) { - n位の数[ n桁数 ] = n % 10; // 1の位を格納 - n = ( n - ( n % 10 ) ) / 10; // 右へシフト(例: 12345 → 1234 ) + n位の数[n桁数] = n % 10; // 1の位を格納 + n = (n - (n % 10)) / 10; // 右へシフト(例: 12345 → 1234 ) n桁数++; } //----------------- @@ -377,45 +377,45 @@ namespace DTXMania #region [ "COMBO" の拡大率を設定。] //----------------- float f拡大率 = 1.0f; - if( nジャンプインデックス >= 0 && nジャンプインデックス < 180 ) - f拡大率 = 1.0f - ( ( (float) this.nジャンプ差分値[ nジャンプインデックス ] ) / 45.0f ); // f拡大率 = 1.0 → 1.3333... → 1.0 + if (nジャンプインデックス >= 0 && nジャンプインデックス < 180) + f拡大率 = 1.0f - (((float)this.nジャンプ差分値[nジャンプインデックス]) / 45.0f); // f拡大率 = 1.0 → 1.3333... → 1.0 - if( this.txCOMBOギター != null ) - this.txCOMBOギター.vc拡大縮小倍率 = new Vector3( f拡大率, f拡大率, 1.0f ); + if (this.txCOMBOギター != null) + this.txCOMBOギター.vc拡大縮小倍率 = new Vector3(f拡大率, f拡大率, 1.0f); //----------------- #endregion #region [ "COMBO" 文字を表示。] //----------------- - int x = (int) ( n表示中央X ) - ( (int) ( ( nギターコンボのCOMBO文字の幅 * f拡大率 ) / 2.0f ) ); - int y = (int) ( n表示中央Y ); + int x = (int)(n表示中央X) - ((int)((nギターコンボのCOMBO文字の幅 * f拡大率) / 2.0f)); + int y = (int)(n表示中央Y); - if ( this.txCOMBOギター != null ) + if (this.txCOMBOギター != null) this.txCOMBOギター.t2D描画( CDTXMania.app.Device, x, y, new Rectangle( 128, - (int) ( 158 ), - (int) ( 124 ), - (int) ( 16 * Scale.Y ) + (int)(158), + (int)(124), + (int)(16 * Scale.Y) ) - ); + ); //----------------- #endregion //x = (int) ( n表示中央X * Scale.X ) + ( n全桁の合計幅 / 2 ); - x = n表示中央X + ( n全桁の合計幅 / 2 ); - for ( int i = 0; i < n桁数; i++ ) + x = n表示中央X + (n全桁の合計幅 / 2); + for (int i = 0; i < n桁数; i++) { #region [ 数字の拡大率を設定。] //----------------- f拡大率 = 1.0f; - if( nジャンプインデックス >= 0 && nジャンプインデックス < 180 ) - f拡大率 = 1.0f - ( ( (float) this.nジャンプ差分値[ nジャンプインデックス ] ) / 45f ); // f拡大率 = 1.0 → 1.3333... → 1.0 + if (nジャンプインデックス >= 0 && nジャンプインデックス < 180) + f拡大率 = 1.0f - (((float)this.nジャンプ差分値[nジャンプインデックス]) / 45f); // f拡大率 = 1.0 → 1.3333... → 1.0 - if( this.txCOMBOギター != null ) - this.txCOMBOギター.vc拡大縮小倍率 = new Vector3( f拡大率, f拡大率, 1.0f ); + if (this.txCOMBOギター != null) + this.txCOMBOギター.vc拡大縮小倍率 = new Vector3(f拡大率, f拡大率, 1.0f); //----------------- #endregion #region [ 数字を1桁表示。] @@ -424,15 +424,15 @@ namespace DTXMania //y = (int) ( n表示中央Y * Scale.Y ) - nギターコンボの高さ; y = n表示中央Y - nギターコンボの高さ; - if( this.txCOMBOギター != null ) + if (this.txCOMBOギター != null) { this.txCOMBOギター.t2D描画( CDTXMania.app.Device, - x - ( (int) ( ( ( f拡大率 - 1.0f ) * nギターコンボの幅 ) / 2.0f ) ), - y - ( (int) ( ( ( f拡大率 - 1.0f ) * nギターコンボの高さ ) / 2.0f ) ), + x - ((int)(((f拡大率 - 1.0f) * nギターコンボの幅) / 2.0f)), + y - ((int)(((f拡大率 - 1.0f) * nギターコンボの高さ) / 2.0f)), new Rectangle( - ( n位の数[ i ] % 4 ) * nギターコンボの幅, - ( n位の数[ i ] / 4 ) * nギターコンボの高さ, + (n位の数[i] % 4) * nギターコンボの幅, + (n位の数[i] / 4) * nギターコンボの高さ, nギターコンボの幅, nギターコンボの高さ ) @@ -450,66 +450,66 @@ namespace DTXMania { this.n現在のコンボ数 = new STCOMBO() { act = this }; this.status = new CSTATUS(); - for( int i = 0; i < 3; i++ ) + for (int i = 0; i < 3; i++) { - this.status[ i ].e現在のモード = EMode.非表示中; - this.status[ i ].nCOMBO値 = 0; - this.status[ i ].n最高COMBO値 = 0; - this.status[ i ].n現在表示中のCOMBO値 = 0; - this.status[ i ].n残像表示中のCOMBO値 = 0; - this.status[ i ].nジャンプインデックス値 = 99999; - this.status[ i ].n前回の時刻_ジャンプ用 = -1; - this.status[ i ].nコンボが切れた時刻 = -1; + this.status[i].e現在のモード = EMode.非表示中; + this.status[i].nCOMBO値 = 0; + this.status[i].n最高COMBO値 = 0; + this.status[i].n現在表示中のCOMBO値 = 0; + this.status[i].n残像表示中のCOMBO値 = 0; + this.status[i].nジャンプインデックス値 = 99999; + this.status[i].n前回の時刻_ジャンプ用 = -1; + this.status[i].nコンボが切れた時刻 = -1; } base.On活性化(); } public override void On非活性化() { - if( this.status != null ) + if (this.status != null) this.status = null; base.On非活性化(); } public override void OnManagedリソースの作成() { - if( this.b活性化してない ) + if (this.b活性化してない) return; - this.txCOMBOドラム = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlayDrums-combo-drums2.png" ) ); - this.txCOMBOギター = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlayDrums-combo-guitar2.png" ) ); + this.txCOMBOドラム = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenPlayDrums-combo-drums2.png")); + this.txCOMBOギター = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenPlayDrums-combo-guitar2.png")); base.OnManagedリソースの作成(); } public override void OnManagedリソースの解放() { - if( this.b活性化してない ) + if (this.b活性化してない) return; - TextureFactory.tテクスチャの解放( ref this.txCOMBOドラム ); - TextureFactory.tテクスチャの解放( ref this.txCOMBOギター ); + TextureFactory.tテクスチャの解放(ref this.txCOMBOドラム); + TextureFactory.tテクスチャの解放(ref this.txCOMBOギター); base.OnManagedリソースの解放(); } public override int On進行描画() { - if( this.b活性化してない ) + if (this.b活性化してない) return 0; - for( int i = 2; i >= 0; i-- ) + for (int i = 2; i >= 0; i--) { EEvent e今回の状態遷移イベント; #region [ 前回と今回の COMBO 値から、e今回の状態遷移イベントを決定する。] //----------------- - if( this.status[ i ].n現在表示中のCOMBO値 == this.status[ i ].nCOMBO値 ) + if (this.status[i].n現在表示中のCOMBO値 == this.status[i].nCOMBO値) { e今回の状態遷移イベント = EEvent.同一数値; } - else if( this.status[ i ].n現在表示中のCOMBO値 > this.status[ i ].nCOMBO値 ) + else if (this.status[i].n現在表示中のCOMBO値 > this.status[i].nCOMBO値) { e今回の状態遷移イベント = EEvent.ミス通知; } - else if( ( this.status[ i ].n現在表示中のCOMBO値 < CDTXMania.app.ConfigIni.n表示可能な最小コンボ数[ i ] ) && ( this.status[ i ].nCOMBO値 < CDTXMania.app.ConfigIni.n表示可能な最小コンボ数[ i ] ) ) + else if ((this.status[i].n現在表示中のCOMBO値 < CDTXMania.app.ConfigIni.n表示可能な最小コンボ数[i]) && (this.status[i].nCOMBO値 < CDTXMania.app.ConfigIni.n表示可能な最小コンボ数[i])) { e今回の状態遷移イベント = EEvent.非表示; } @@ -522,18 +522,18 @@ namespace DTXMania #region [ nジャンプインデックス値 の進行。] //----------------- - if( this.status[ i ].nジャンプインデックス値 < 360 ) + if (this.status[i].nジャンプインデックス値 < 360) { - if( ( this.status[ i ].n前回の時刻_ジャンプ用 == -1 ) || ( CDTXMania.app.Timer.n現在時刻 < this.status[ i ].n前回の時刻_ジャンプ用) ) - this.status[ i ].n前回の時刻_ジャンプ用 = CDTXMania.app.Timer.n現在時刻; + if ((this.status[i].n前回の時刻_ジャンプ用 == -1) || (CDTXMania.app.Timer.n現在時刻 < this.status[i].n前回の時刻_ジャンプ用)) + this.status[i].n前回の時刻_ジャンプ用 = CDTXMania.app.Timer.n現在時刻; const long INTERVAL = 2; - while( ( CDTXMania.app.Timer.n現在時刻 - this.status[ i ].n前回の時刻_ジャンプ用) >= INTERVAL ) + while ((CDTXMania.app.Timer.n現在時刻 - this.status[i].n前回の時刻_ジャンプ用) >= INTERVAL) { - if( this.status[ i ].nジャンプインデックス値 < 2000 ) - this.status[ i ].nジャンプインデックス値 += 3; + if (this.status[i].nジャンプインデックス値 < 2000) + this.status[i].nジャンプインデックス値 += 3; - this.status[ i ].n前回の時刻_ジャンプ用 += INTERVAL; + this.status[i].n前回の時刻_ジャンプ用 += INTERVAL; } } //----------------- @@ -542,22 +542,22 @@ namespace DTXMania Retry: // モードが変化した場合はここからリトライする。 - switch( this.status[ i ].e現在のモード ) + switch (this.status[i].e現在のモード) { case EMode.非表示中: #region [ *** ] //----------------- - if( e今回の状態遷移イベント == EEvent.数値更新 ) + if (e今回の状態遷移イベント == EEvent.数値更新) { // モード変更 - this.status[ i ].e現在のモード = EMode.進行表示中; - this.status[ i ].nジャンプインデックス値 = 0; - this.status[ i ].n前回の時刻_ジャンプ用 = CDTXMania.app.Timer.n現在時刻; + this.status[i].e現在のモード = EMode.進行表示中; + this.status[i].nジャンプインデックス値 = 0; + this.status[i].n前回の時刻_ジャンプ用 = CDTXMania.app.Timer.n現在時刻; goto Retry; } - this.status[ i ].n現在表示中のCOMBO値 = this.status[ i ].nCOMBO値; + this.status[i].n現在表示中のCOMBO値 = this.status[i].nCOMBO値; break; //----------------- #endregion @@ -566,34 +566,34 @@ namespace DTXMania #region [ *** ] //----------------- - if( ( e今回の状態遷移イベント == EEvent.非表示 ) || ( e今回の状態遷移イベント == EEvent.ミス通知 ) ) + if ((e今回の状態遷移イベント == EEvent.非表示) || (e今回の状態遷移イベント == EEvent.ミス通知)) { // モード変更 - this.status[ i ].e現在のモード = EMode.残像表示中; - this.status[ i ].n残像表示中のCOMBO値 = this.status[ i ].n現在表示中のCOMBO値; - this.status[ i ].nコンボが切れた時刻 = CDTXMania.app.Timer.n現在時刻; + this.status[i].e現在のモード = EMode.残像表示中; + this.status[i].n残像表示中のCOMBO値 = this.status[i].n現在表示中のCOMBO値; + this.status[i].nコンボが切れた時刻 = CDTXMania.app.Timer.n現在時刻; goto Retry; } - if( e今回の状態遷移イベント == EEvent.数値更新 ) + if (e今回の状態遷移イベント == EEvent.数値更新) { - this.status[ i ].nジャンプインデックス値 = 0; - this.status[ i ].n前回の時刻_ジャンプ用 = CDTXMania.app.Timer.n現在時刻; + this.status[i].nジャンプインデックス値 = 0; + this.status[i].n前回の時刻_ジャンプ用 = CDTXMania.app.Timer.n現在時刻; } - this.status[ i ].n現在表示中のCOMBO値 = this.status[ i ].nCOMBO値; - switch( i ) + this.status[i].n現在表示中のCOMBO値 = this.status[i].nCOMBO値; + switch (i) { case 0: - this.tコンボ表示_ドラム( this.status[ i ].nCOMBO値, this.status[ i ].nジャンプインデックス値 ); + this.tコンボ表示_ドラム(this.status[i].nCOMBO値, this.status[i].nジャンプインデックス値); break; case 1: - this.tコンボ表示_ギター( this.status[ i ].nCOMBO値, this.status[ i ].nジャンプインデックス値 ); + this.tコンボ表示_ギター(this.status[i].nCOMBO値, this.status[i].nジャンプインデックス値); break; case 2: - this.tコンボ表示_ベース( this.status[ i ].nCOMBO値, this.status[ i ].nジャンプインデックス値 ); + this.tコンボ表示_ベース(this.status[i].nCOMBO値, this.status[i].nジャンプインデックス値); break; } break; @@ -603,21 +603,21 @@ namespace DTXMania case EMode.残像表示中: #region [ *** ] //----------------- - if( e今回の状態遷移イベント == EEvent.数値更新 ) + if (e今回の状態遷移イベント == EEvent.数値更新) { // モード変更1 - this.status[ i ].e現在のモード = EMode.進行表示中; + this.status[i].e現在のモード = EMode.進行表示中; goto Retry; } - if( ( CDTXMania.app.Timer.n現在時刻 - this.status[ i ].nコンボが切れた時刻 ) > 1000 ) + if ((CDTXMania.app.Timer.n現在時刻 - this.status[i].nコンボが切れた時刻) > 1000) { // モード変更2 - this.status[ i ].e現在のモード = EMode.非表示中; + this.status[i].e現在のモード = EMode.非表示中; goto Retry; } - this.status[ i ].n現在表示中のCOMBO値 = this.status[ i ].nCOMBO値; + this.status[i].n現在表示中のCOMBO値 = this.status[i].nCOMBO値; break; - //----------------- + //----------------- #endregion } } diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏Danger共通.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏Danger共通.cs index 28d4d8ca..4317f069 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏Danger共通.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏Danger共通.cs @@ -20,12 +20,12 @@ namespace DTXMania public override void On活性化() { - for ( int i = 0; i < 3; i++ ) + for (int i = 0; i < 3; i++) { this.bDanger中[i] = false; } -// this.ct移動用 = new CCounter(); -// this.ct透明度用 = new CCounter(); + // this.ct移動用 = new CCounter(); + // this.ct透明度用 = new CCounter(); this.ct移動用 = null; this.ct透明度用 = null; @@ -45,7 +45,7 @@ namespace DTXMania /// GuitarがDangerならtrue /// BassがDangerならtrue /// - public abstract int t進行描画( bool bIsDangerDrums, bool bIsDamgerGuitar, bool bIsDangerBass ); + public abstract int t進行描画(bool bIsDangerDrums, bool bIsDamgerGuitar, bool bIsDangerBass); @@ -53,11 +53,11 @@ namespace DTXMania #region [ private ] //----------------- - protected bool[] bDanger中 = { false, false, false}; + protected bool[] bDanger中 = { false, false, false }; protected CCounter ct移動用; protected CCounter ct透明度用; //----------------- #endregion - + } } diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏RGB共通.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏RGB共通.cs index 73472912..2b7fce43 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏RGB共通.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏RGB共通.cs @@ -9,7 +9,7 @@ namespace DTXMania { // プロパティ - protected bool[] b押下状態 = new bool[ 6 ]; + protected bool[] b押下状態 = new bool[6]; protected CTexture txRGB; @@ -19,13 +19,13 @@ namespace DTXMania { base.b活性化してない = true; } - - + + // メソッド - public void Push( int nLane ) + public void Push(int nLane) { - this.b押下状態[ nLane ] = true; + this.b押下状態[nLane] = true; } @@ -33,30 +33,30 @@ namespace DTXMania public override void On活性化() { - for( int i = 0; i < 6; i++ ) + for (int i = 0; i < 6; i++) { - this.b押下状態[ i ] = false; + this.b押下状態[i] = false; } base.On活性化(); } public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - this.txRGB = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlay RGB buttons.png" ) ); + this.txRGB = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenPlay RGB buttons.png")); base.OnManagedリソースの作成(); } } public override void OnManagedリソースの解放() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.txRGB ); + TextureFactory.tテクスチャの解放(ref this.txRGB); base.OnManagedリソースの解放(); } } - public virtual int t進行描画( C演奏判定ライン座標共通 演奏判定ライン座標共通 ) + public virtual int t進行描画(C演奏判定ライン座標共通 演奏判定ライン座標共通) { return 0; } diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏WailingBonus共通.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏WailingBonus共通.cs index 2863f309..c80028ac 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏WailingBonus共通.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏WailingBonus共通.cs @@ -15,11 +15,11 @@ namespace DTXMania base.b活性化してない = true; } - public void Start( E楽器パート part ) + public void Start(E楽器パート part) { - this.Start( part, null ); + this.Start(part, null); } - public abstract void Start( E楽器パート part, CChip r歓声Chip ); + public abstract void Start(E楽器パート part, CChip r歓声Chip); @@ -36,17 +36,17 @@ namespace DTXMania public override void OnManagedリソースの作成() { - if ( !base.b活性化してない ) + if (!base.b活性化してない) { - this.txWailingBonus = TextureFactory.tテクスチャの生成Af( CSkin.Path( @"Graphics\ScreenPlay wailing bonus.png" ), false ); + this.txWailingBonus = TextureFactory.tテクスチャの生成Af(CSkin.Path(@"Graphics\ScreenPlay wailing bonus.png"), false); base.OnManagedリソースの作成(); } } public override void OnManagedリソースの解放() { - if ( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.txWailingBonus ); + TextureFactory.tテクスチャの解放(ref this.txWailingBonus); base.OnManagedリソースの解放(); } } @@ -56,7 +56,7 @@ namespace DTXMania #region [ private ] //----------------- - protected CCounter[,] ct進行用 = new CCounter[ 3, 4 ]; + protected CCounter[,] ct進行用 = new CCounter[3, 4]; protected CTextureAf txWailingBonus; //----------------- #endregion diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏ゲージ共通.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏ゲージ共通.cs index 36f34865..e4842bd6 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏ゲージ共通.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏ゲージ共通.cs @@ -38,13 +38,13 @@ namespace DTXMania actLVLNFont = null; base.On非活性化(); } - + const double GAUGE_MAX = 1.0; - const double GAUGE_INITIAL = 2.0 / 3; + const double GAUGE_INITIAL = 2.0 / 3; const double GAUGE_MIN = -0.1; const double GAUGE_ZERO = 0.0; const double GAUGE_DANGER = 0.3; - + public bool bRisky // Riskyモードか否か { get; @@ -60,28 +60,30 @@ namespace DTXMania get; private set; } - public bool IsFailed( E楽器パート part ) // 閉店状態になったかどうか + public bool IsFailed(E楽器パート part) // 閉店状態になったかどうか { - if ( bRisky ) { - return ( nRiskyTimes <= 0 ); + if (bRisky) + { + return (nRiskyTimes <= 0); } - return this.db現在のゲージ値[ (int) part ] <= GAUGE_MIN; + return this.db現在のゲージ値[(int)part] <= GAUGE_MIN; } - public bool IsDanger( E楽器パート part ) // DANGERかどうか + public bool IsDanger(E楽器パート part) // DANGERかどうか { - if ( bRisky ) + if (bRisky) { - switch ( nRiskyTimes_Initial ) { + switch (nRiskyTimes_Initial) + { case 1: return false; case 2: case 3: - return ( nRiskyTimes <= 1 ); - default: - return ( nRiskyTimes <= 2 ); + return (nRiskyTimes <= 1); + default: + return (nRiskyTimes <= 2); } } - return ( this.db現在のゲージ値[ (int) part ] <= GAUGE_DANGER ); + return (this.db現在のゲージ値[(int)part] <= GAUGE_DANGER); } public double dbゲージ値 // Drums専用 @@ -93,7 +95,7 @@ namespace DTXMania set { this.db現在のゲージ値.Drums = value; - if ( this.db現在のゲージ値.Drums > GAUGE_MAX ) + if (this.db現在のゲージ値.Drums > GAUGE_MAX) { this.db現在のゲージ値.Drums = GAUGE_MAX; } @@ -105,25 +107,25 @@ namespace DTXMania /// ゲージの初期化 /// /// Riskyの初期値(0でRisky未使用) - public void Init(int nRiskyTimes_InitialVal ) // ゲージ初期化 + public void Init(int nRiskyTimes_InitialVal) // ゲージ初期化 { nRiskyTimes_Initial = nRiskyTimes_InitialVal; nRiskyTimes = nRiskyTimes_InitialVal; - bRisky = ( this.nRiskyTimes > 0 ); + bRisky = (this.nRiskyTimes > 0); - for ( int i = 0; i < 3; i++ ) + for (int i = 0; i < 3; i++) { - if ( !bRisky ) + if (!bRisky) { - this.db現在のゲージ値[ i ] = GAUGE_INITIAL; + this.db現在のゲージ値[i] = GAUGE_INITIAL; } - else if ( nRiskyTimes_InitialVal == 1 ) + else if (nRiskyTimes_InitialVal == 1) { - this.db現在のゲージ値[ i ] = GAUGE_ZERO; + this.db現在のゲージ値[i] = GAUGE_ZERO; } else { - this.db現在のゲージ値[ i ] = GAUGE_MAX; + this.db現在のゲージ値[i] = GAUGE_MAX; } } } @@ -132,7 +134,7 @@ namespace DTXMania #if true // DAMAGELEVELTUNING #region [ DAMAGELEVELTUNING ] // ---------------------------------- - public float[ , ] fDamageGaugeDelta = { // #23625 2011.1.10 ickw_284: tuned damage/recover factors + public float[,] fDamageGaugeDelta = { // #23625 2011.1.10 ickw_284: tuned damage/recover factors // drums, guitar, bass { 0.004f, 0.006f, 0.006f }, { 0.002f, 0.003f, 0.003f }, @@ -144,35 +146,35 @@ namespace DTXMania 0.5f, 1.0f, 1.5f }; // ---------------------------------- -#endregion + #endregion #endif - public void Damage( E楽器パート screenmode, E楽器パート part, E判定 e今回の判定 ) + public void Damage(E楽器パート screenmode, E楽器パート part, E判定 e今回の判定) { double fDamage; #if true // DAMAGELEVELTUNING - switch ( e今回の判定 ) + switch (e今回の判定) { case E判定.Perfect: case E判定.Great: case E判定.Good: - fDamage = bRisky ? 0 : fDamageGaugeDelta[ (int) e今回の判定, (int) part ]; + fDamage = bRisky ? 0 : fDamageGaugeDelta[(int)e今回の判定, (int)part]; break; case E判定.Poor: case E判定.Miss: - if ( bRisky ) + if (bRisky) { - fDamage = (nRiskyTimes == 1)? 0 : -GAUGE_MAX / ( nRiskyTimes_Initial - 1); // Risky=1のときは1Miss即閉店なのでダメージ計算しない + fDamage = (nRiskyTimes == 1) ? 0 : -GAUGE_MAX / (nRiskyTimes_Initial - 1); // Risky=1のときは1Miss即閉店なのでダメージ計算しない if (nRiskyTimes >= 0) nRiskyTimes--; // 念のため-1未満には減らないようにしておく } else { - fDamage = fDamageGaugeDelta[ (int) e今回の判定, (int) part ]; + fDamage = fDamageGaugeDelta[(int)e今回の判定, (int)part]; } - if ( e今回の判定 == E判定.Miss && !bRisky ) + if (e今回の判定 == E判定.Miss && !bRisky) { - fDamage *= fDamageLevelFactor[ (int) CDTXMania.app.ConfigIni.eダメージレベル ]; + fDamage *= fDamageLevelFactor[(int)CDTXMania.app.ConfigIni.eダメージレベル]; } break; @@ -222,26 +224,26 @@ namespace DTXMania break; } #endif - if ( screenmode == E楽器パート.DRUMS ) // ドラム演奏画面なら、ギター/ベースのダメージも全部ドラムのゲージに集約する + if (screenmode == E楽器パート.DRUMS) // ドラム演奏画面なら、ギター/ベースのダメージも全部ドラムのゲージに集約する { part = E楽器パート.DRUMS; - this.db現在のゲージ値[ (int) part ] += fDamage; + this.db現在のゲージ値[(int)part] += fDamage; } else { - if ( this.bRisky ) // ギター画面且つRISKYなら、ギターとベースのゲージをセットで減少 + if (this.bRisky) // ギター画面且つRISKYなら、ギターとベースのゲージをセットで減少 { - this.db現在のゲージ値[ (int) E楽器パート.GUITAR ] += fDamage; - this.db現在のゲージ値[ (int) E楽器パート.BASS ] += fDamage; + this.db現在のゲージ値[(int)E楽器パート.GUITAR] += fDamage; + this.db現在のゲージ値[(int)E楽器パート.BASS] += fDamage; } else { - this.db現在のゲージ値[ (int) part ] += fDamage; + this.db現在のゲージ値[(int)part] += fDamage; } } - if ( this.db現在のゲージ値[ (int) part ] > GAUGE_MAX ) // RISKY時は決してゲージが増加しないので、ギタレボモード時のギター/ベース両チェック(上限チェック)はしなくて良い - this.db現在のゲージ値[ (int) part ] = GAUGE_MAX; + if (this.db現在のゲージ値[(int)part] > GAUGE_MAX) // RISKY時は決してゲージが増加しないので、ギタレボモード時のギター/ベース両チェック(上限チェック)はしなくて良い + this.db現在のゲージ値[(int)part] = GAUGE_MAX; } //----------------- #endregion diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏スクロール速度.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏スクロール速度.cs index 8f97491e..5324fac5 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏スクロール速度.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏スクロール速度.cs @@ -24,51 +24,51 @@ namespace DTXMania public override void On活性化() { - for( int i = 0; i < 3; i++ ) + for (int i = 0; i < 3; i++) { - this.db現在の譜面スクロール速度[ i ] = (double) CDTXMania.app.ConfigIni.n譜面スクロール速度[ i ]; - this.n速度変更制御タイマ[ i ] = -1; + this.db現在の譜面スクロール速度[i] = (double)CDTXMania.app.ConfigIni.n譜面スクロール速度[i]; + this.n速度変更制御タイマ[i] = -1; } base.On活性化(); } public override unsafe int On進行描画() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - if( base.b初めての進行描画 ) + if (base.b初めての進行描画) { this.n速度変更制御タイマ.Drums = this.n速度変更制御タイマ.Guitar = this.n速度変更制御タイマ.Bass = CSound管理.rc演奏用タイマ.n現在時刻; base.b初めての進行描画 = false; } long n現在時刻 = CSound管理.rc演奏用タイマ.n現在時刻; - for( int i = 0; i < 3; i++ ) + for (int i = 0; i < 3; i++) { - double db譜面スクロールスピード = (double) CDTXMania.app.ConfigIni.n譜面スクロール速度[ i ]; - if( n現在時刻 < this.n速度変更制御タイマ[ i ] ) + double db譜面スクロールスピード = (double)CDTXMania.app.ConfigIni.n譜面スクロール速度[i]; + if (n現在時刻 < this.n速度変更制御タイマ[i]) { - this.n速度変更制御タイマ[ i ] = n現在時刻; + this.n速度変更制御タイマ[i] = n現在時刻; } - while( ( n現在時刻 - this.n速度変更制御タイマ[ i ] ) >= 2 ) // 2msに1回ループ + while ((n現在時刻 - this.n速度変更制御タイマ[i]) >= 2) // 2msに1回ループ { - if( this.db現在の譜面スクロール速度[ i ] < db譜面スクロールスピード ) // Config.iniのスクロール速度を変えると、それに追いつくように実画面のスクロール速度を変える + if (this.db現在の譜面スクロール速度[i] < db譜面スクロールスピード) // Config.iniのスクロール速度を変えると、それに追いつくように実画面のスクロール速度を変える { - this.db現在の譜面スクロール速度[ i ] += 0.012; + this.db現在の譜面スクロール速度[i] += 0.012; - if( this.db現在の譜面スクロール速度[ i ] > db譜面スクロールスピード ) + if (this.db現在の譜面スクロール速度[i] > db譜面スクロールスピード) { - this.db現在の譜面スクロール速度[ i ] = db譜面スクロールスピード; + this.db現在の譜面スクロール速度[i] = db譜面スクロールスピード; } } - else if ( this.db現在の譜面スクロール速度[ i ] > db譜面スクロールスピード ) + else if (this.db現在の譜面スクロール速度[i] > db譜面スクロールスピード) { - this.db現在の譜面スクロール速度[ i ] -= 0.012; + this.db現在の譜面スクロール速度[i] -= 0.012; - if( this.db現在の譜面スクロール速度[ i ] < db譜面スクロールスピード ) + if (this.db現在の譜面スクロール速度[i] < db譜面スクロールスピード) { - this.db現在の譜面スクロール速度[ i ] = db譜面スクロールスピード; + this.db現在の譜面スクロール速度[i] = db譜面スクロールスピード; } } - this.n速度変更制御タイマ[ i ] += 2; + this.n速度変更制御タイマ[i] += 2; } } } diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏スコア共通.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏スコア共通.cs index f0227cd6..305f5906 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏スコア共通.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏スコア共通.cs @@ -15,7 +15,7 @@ namespace DTXMania protected long n進行用タイマ; protected CTexture txScore; - + // コンストラクタ public CAct演奏スコア共通() @@ -26,20 +26,20 @@ namespace DTXMania // メソッド - public double Get( E楽器パート part ) + public double Get(E楽器パート part) { - return this.n現在の本当のスコア[ (int) part ]; + return this.n現在の本当のスコア[(int)part]; } - public void Set( E楽器パート part, double nScore ) + public void Set(E楽器パート part, double nScore) { - int nPart = (int) part; - if( this.n現在の本当のスコア[ nPart ] != nScore ) + int nPart = (int)part; + if (this.n現在の本当のスコア[nPart] != nScore) { - this.n現在の本当のスコア[ nPart ] = nScore; - this.nスコアの増分[ nPart ] = (long) ( ( (double) ( this.n現在の本当のスコア[ nPart ] - this.n現在表示中のスコア[ nPart ] ) ) / 20.0 ); - if( this.nスコアの増分[ nPart ] < 1L ) + this.n現在の本当のスコア[nPart] = nScore; + this.nスコアの増分[nPart] = (long)(((double)(this.n現在の本当のスコア[nPart] - this.n現在表示中のスコア[nPart])) / 20.0); + if (this.nスコアの増分[nPart] < 1L) { - this.nスコアの増分[ nPart ] = 1L; + this.nスコアの増分[nPart] = 1L; } } } @@ -49,10 +49,10 @@ namespace DTXMania /// /// /// - public void Add( E楽器パート part, STAUTOPLAY bAutoPlay, long delta ) + public void Add(E楽器パート part, STAUTOPLAY bAutoPlay, long delta) { double rev = 1.0; - switch ( part ) + switch (part) { #region [ Unknown ] case E楽器パート.UNKNOWN: @@ -60,10 +60,10 @@ namespace DTXMania #endregion #region [ Drums ] case E楽器パート.DRUMS: - if ( !CDTXMania.app.ConfigIni.bドラムが全部オートプレイである ) + if (!CDTXMania.app.ConfigIni.bドラムが全部オートプレイである) { #region [ Auto BD ] - if ( bAutoPlay.BD == true ) + if (bAutoPlay.BD == true) { rev /= 2; } @@ -73,22 +73,22 @@ namespace DTXMania #endregion #region [ Gutiar ] case E楽器パート.GUITAR: - if ( !CDTXMania.app.ConfigIni.bギターが全部オートプレイである ) + if (!CDTXMania.app.ConfigIni.bギターが全部オートプレイである) { #region [ Auto Wailing ] - if ( bAutoPlay.GtW ) + if (bAutoPlay.GtW) { rev /= 2; } #endregion #region [ Auto Pick ] - if ( bAutoPlay.GtPick ) + if (bAutoPlay.GtPick) { rev /= 3; } #endregion #region [ Auto Neck ] - if ( bAutoPlay.GtR || bAutoPlay.GtG || bAutoPlay.GtB ) + if (bAutoPlay.GtR || bAutoPlay.GtG || bAutoPlay.GtB) { rev /= 4; } @@ -98,22 +98,22 @@ namespace DTXMania #endregion #region [ Bass ] case E楽器パート.BASS: - if ( !CDTXMania.app.ConfigIni.bベースが全部オートプレイである ) + if (!CDTXMania.app.ConfigIni.bベースが全部オートプレイである) { #region [ Auto Wailing ] - if ( bAutoPlay.BsW ) + if (bAutoPlay.BsW) { rev /= 2; } #endregion #region [ Auto Pick ] - if ( bAutoPlay.BsPick ) + if (bAutoPlay.BsPick) { rev /= 3; } #endregion #region [ Auto Neck ] - if ( bAutoPlay.BsR || bAutoPlay.BsG || bAutoPlay.BsB ) + if (bAutoPlay.BsR || bAutoPlay.BsG || bAutoPlay.BsB) { rev /= 4; } @@ -122,7 +122,7 @@ namespace DTXMania break; #endregion } - this.Set( part, this.Get( part ) + delta * rev ); + this.Set(part, this.Get(part) + delta * rev); } @@ -131,27 +131,27 @@ namespace DTXMania public override void On活性化() { this.n進行用タイマ = -1; - for( int i = 0; i < 3; i++ ) + for (int i = 0; i < 3; i++) { - this.n現在表示中のスコア[ i ] = 0L; - this.n現在の本当のスコア[ i ] = 0L; - this.nスコアの増分[ i ] = 0L; + this.n現在表示中のスコア[i] = 0L; + this.n現在の本当のスコア[i] = 0L; + this.nスコアの増分[i] = 0L; } base.On活性化(); } public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - this.txScore = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlay score numbers.png" ) ); + this.txScore = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenPlay score numbers.png")); base.OnManagedリソースの作成(); } } public override void OnManagedリソースの解放() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.txScore ); + TextureFactory.tテクスチャの解放(ref this.txScore); base.OnManagedリソースの解放(); } } diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏ステージ失敗.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏ステージ失敗.cs index 1530fa76..8c457716 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏ステージ失敗.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏ステージ失敗.cs @@ -21,7 +21,7 @@ namespace DTXMania public void Start() { - this.ct進行 = new CCounter( 0, 0x3e8, 2, CDTXMania.app.Timer ); + this.ct進行 = new CCounter(0, 0x3e8, 2, CDTXMania.app.Timer); } @@ -37,80 +37,80 @@ namespace DTXMania public override void On非活性化() { this.ct進行 = null; - if( this.sd効果音 != null ) + if (this.sd効果音 != null) { - CDTXMania.app.Sound管理.tサウンドを破棄する( this.sd効果音 ); + CDTXMania.app.Sound管理.tサウンドを破棄する(this.sd効果音); this.sd効果音 = null; } base.On非活性化(); } public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - this.txStageFailed = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlay stage failed.jpg" ) ); + this.txStageFailed = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenPlay stage failed.jpg")); base.OnManagedリソースの作成(); } } public override void OnManagedリソースの解放() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.txStageFailed ); + TextureFactory.tテクスチャの解放(ref this.txStageFailed); base.OnManagedリソースの解放(); } } public override int On進行描画() { - if( base.b活性化してない ) + if (base.b活性化してない) { return 0; } - if( ( this.ct進行 == null ) || this.ct進行.b停止中 ) + if ((this.ct進行 == null) || this.ct進行.b停止中) { return 0; } this.ct進行.t進行(); - if( this.ct進行.n現在の値 < 100 ) + if (this.ct進行.n現在の値 < 100) { - int x = (int) ( 320.0 * Math.Cos( ( Math.PI / 2 * this.ct進行.n現在の値 ) / 100.0 ) ); - if ( ( x != 320 ) && ( this.txStageFailed != null ) ) + int x = (int)(320.0 * Math.Cos((Math.PI / 2 * this.ct進行.n現在の値) / 100.0)); + if ((x != 320) && (this.txStageFailed != null)) { - this.txStageFailed.t2D描画( CDTXMania.app.Device, + this.txStageFailed.t2D描画(CDTXMania.app.Device, 0, 0, - new Rectangle( (int) ( x * Scale.X ), 0, (int) ( ( 320 - x ) * Scale.X ), (int) ( 480 * Scale.Y ) ) ); - this.txStageFailed.t2D描画( CDTXMania.app.Device, - (int) ( ( 320 + x ) * Scale.X ), 0, - new Rectangle( (int) ( 320 * Scale.X ), 0, (int) ( ( 320 - x ) * Scale.X ), (int) ( 480 * Scale.Y ) ) ); + new Rectangle((int)(x * Scale.X), 0, (int)((320 - x) * Scale.X), (int)(480 * Scale.Y))); + this.txStageFailed.t2D描画(CDTXMania.app.Device, + (int)((320 + x) * Scale.X), 0, + new Rectangle((int)(320 * Scale.X), 0, (int)((320 - x) * Scale.X), (int)(480 * Scale.Y))); } } else { - if( this.txStageFailed != null ) + if (this.txStageFailed != null) { - this.txStageFailed.t2D描画( CDTXMania.app.Device, 0, 0 ); + this.txStageFailed.t2D描画(CDTXMania.app.Device, 0, 0); } - if( this.ct進行.n現在の値 <= 250 ) + if (this.ct進行.n現在の値 <= 250) { - int num2 = CDTXMania.app.Random.Next( 5 ) - 2; - int y = CDTXMania.app.Random.Next( 5 ) - 2; - if( this.txStageFailed != null ) + int num2 = CDTXMania.app.Random.Next(5) - 2; + int y = CDTXMania.app.Random.Next(5) - 2; + if (this.txStageFailed != null) { - this.txStageFailed.t2D描画( CDTXMania.app.Device, num2 * Scale.X, y * Scale.Y ); + this.txStageFailed.t2D描画(CDTXMania.app.Device, num2 * Scale.X, y * Scale.Y); } } - if( !this.b効果音再生済み ) + if (!this.b効果音再生済み) { - if( ( ( CDTXMania.app.DTX.SOUND_STAGEFAILED != null ) && ( CDTXMania.app.DTX.SOUND_STAGEFAILED.Length > 0 ) ) && File.Exists( CDTXMania.app.DTX.strフォルダ名 + CDTXMania.app.DTX.SOUND_STAGEFAILED ) ) + if (((CDTXMania.app.DTX.SOUND_STAGEFAILED != null) && (CDTXMania.app.DTX.SOUND_STAGEFAILED.Length > 0)) && File.Exists(CDTXMania.app.DTX.strフォルダ名 + CDTXMania.app.DTX.SOUND_STAGEFAILED)) { try { - if( this.sd効果音 != null ) + if (this.sd効果音 != null) { - CDTXMania.app.Sound管理.tサウンドを破棄する( this.sd効果音 ); + CDTXMania.app.Sound管理.tサウンドを破棄する(this.sd効果音); this.sd効果音 = null; } - this.sd効果音 = CDTXMania.app.Sound管理.tサウンドを生成する( CDTXMania.app.DTX.strフォルダ名 + CDTXMania.app.DTX.SOUND_STAGEFAILED ); + this.sd効果音 = CDTXMania.app.Sound管理.tサウンドを生成する(CDTXMania.app.DTX.strフォルダ名 + CDTXMania.app.DTX.SOUND_STAGEFAILED); this.sd効果音.t再生を開始する(); } catch @@ -124,13 +124,13 @@ namespace DTXMania this.b効果音再生済み = true; } } - if( !this.ct進行.b終了値に達した ) + if (!this.ct進行.b終了値に達した) { return 0; } return 1; } - + // その他 diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏ステータスパネル共通.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏ステータスパネル共通.cs index 5ee0ae18..b6f33c1f 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏ステータスパネル共通.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏ステータスパネル共通.cs @@ -13,21 +13,21 @@ namespace DTXMania // コンストラクタ public CAct演奏ステータスパネル共通() { - this.stパネルマップ = new STATUSPANEL[ 12 ]; // yyagi: 以下、手抜きの初期化でスマン - // { "DTXMANIA", 0 }, { "EXTREME", 1 }, ... みたいに書きたいが・・・ - string[] labels = new string[ 12 ] { + this.stパネルマップ = new STATUSPANEL[12]; // yyagi: 以下、手抜きの初期化でスマン + // { "DTXMANIA", 0 }, { "EXTREME", 1 }, ... みたいに書きたいが・・・ + string[] labels = new string[12] { "DTXMANIA", "EXTREME", "ADVANCED", "ADVANCE", "BASIC", "RAW", "REAL", "EASY", "EX-REAL", "ExREAL", "ExpertReal", "NORMAL" }; - int[] status = new int[ 12 ] { + int[] status = new int[12] { 0, 1, 2, 2, 3, 4, 5, 6, 7, 7, 7, 8 }; - for ( int i = 0; i < 12; i++ ) + for (int i = 0; i < 12; i++) { - this.stパネルマップ[ i ] = new STATUSPANEL(); - this.stパネルマップ[ i ].status = status[ i ]; - this.stパネルマップ[ i ].label = labels[ i ]; + this.stパネルマップ[i] = new STATUSPANEL(); + this.stパネルマップ[i].status = status[i]; + this.stパネルマップ[i].label = labels[i]; } #region [ 旧初期化処理(注釈化) ] @@ -88,17 +88,17 @@ namespace DTXMania // メソッド - public void tラベル名からステータスパネルを決定する( string strラベル名 ) + public void tラベル名からステータスパネルを決定する(string strラベル名) { - if ( string.IsNullOrEmpty( strラベル名 ) ) + if (string.IsNullOrEmpty(strラベル名)) { this.nStatus = 0; } else { - foreach ( STATUSPANEL statuspanel in this.stパネルマップ ) + foreach (STATUSPANEL statuspanel in this.stパネルマップ) { - if ( strラベル名.Equals( statuspanel.label, StringComparison.CurrentCultureIgnoreCase ) ) // #24482 2011.2.17 yyagi ignore case + if (strラベル名.Equals(statuspanel.label, StringComparison.CurrentCultureIgnoreCase)) // #24482 2011.2.17 yyagi ignore case { this.nStatus = statuspanel.status; return; @@ -119,7 +119,7 @@ namespace DTXMania #region [ protected ] //----------------- - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] protected struct STATUSPANEL { public string label; diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏チップファイアGB.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏チップファイアGB.cs index 48bb6a31..23cc673f 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏チップファイアGB.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏チップファイアGB.cs @@ -19,103 +19,103 @@ namespace DTXMania // メソッド - public virtual void Start( int nLane, int n中央X, int n中央Y, C演奏判定ライン座標共通 演奏判定ライン座標 ) + public virtual void Start(int nLane, int n中央X, int n中央Y, C演奏判定ライン座標共通 演奏判定ライン座標) { - if( ( nLane >= 0 ) || ( nLane <= 5 ) ) + if ((nLane >= 0) || (nLane <= 5)) { - this.pt中央位置[ nLane ].X = n中央X; - this.pt中央位置[ nLane ].Y = n中央Y; - this.ct進行[ nLane ].t開始( 28, 56, 8, CDTXMania.app.Timer ); // #24736 2011.2.17 yyagi: (0, 0x38, 4,..) -> (24, 0x38, 8) に変更 ギターチップの光り始めを早くするため + this.pt中央位置[nLane].X = n中央X; + this.pt中央位置[nLane].Y = n中央Y; + this.ct進行[nLane].t開始(28, 56, 8, CDTXMania.app.Timer); // #24736 2011.2.17 yyagi: (0, 0x38, 4,..) -> (24, 0x38, 8) に変更 ギターチップの光り始めを早くするため //this.nJudgeLinePosY_delta = _nJudgeLinePosY_delta; // #31602 2013.6.24 yyagi this._演奏判定ライン座標 = 演奏判定ライン座標; this.bReverse = CDTXMania.app.ConfigIni.bReverse; // } } - public abstract void Start( int nLane, C演奏判定ライン座標共通 演奏判定ライン座標 ); -// public abstract void Start( int nLane ); + public abstract void Start(int nLane, C演奏判定ライン座標共通 演奏判定ライン座標); + // public abstract void Start( int nLane ); // CActivity 実装 public override void On活性化() { - for( int i = 0; i < 6; i++ ) + for (int i = 0; i < 6; i++) { - this.pt中央位置[ i ] = new Point( 0, 0 ); - this.ct進行[ i ] = new CCounter(); + this.pt中央位置[i] = new Point(0, 0); + this.ct進行[i] = new CCounter(); } base.On活性化(); } public override void On非活性化() { - for( int i = 0; i < 6; i++ ) + for (int i = 0; i < 6; i++) { - this.ct進行[ i ] = null; + this.ct進行[i] = null; } base.On非活性化(); } public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - this.tx火花[ 0 ] = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlay chip fire red.png" ) ); - if( this.tx火花[ 0 ] != null ) + this.tx火花[0] = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenPlay chip fire red.png")); + if (this.tx火花[0] != null) { - this.tx火花[ 0 ].b加算合成 = true; + this.tx火花[0].b加算合成 = true; } - this.tx火花[ 1 ] = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlay chip fire green.png" ) ); - if( this.tx火花[ 1 ] != null ) + this.tx火花[1] = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenPlay chip fire green.png")); + if (this.tx火花[1] != null) { - this.tx火花[ 1 ].b加算合成 = true; + this.tx火花[1].b加算合成 = true; } - this.tx火花[ 2 ] = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlay chip fire blue.png" ) ); - if( this.tx火花[ 2 ] != null ) + this.tx火花[2] = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenPlay chip fire blue.png")); + if (this.tx火花[2] != null) { - this.tx火花[ 2 ].b加算合成 = true; + this.tx火花[2].b加算合成 = true; } base.OnManagedリソースの作成(); } } public override void OnManagedリソースの解放() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.tx火花[ 0 ] ); - TextureFactory.tテクスチャの解放( ref this.tx火花[ 1 ] ); - TextureFactory.tテクスチャの解放( ref this.tx火花[ 2 ] ); + TextureFactory.tテクスチャの解放(ref this.tx火花[0]); + TextureFactory.tテクスチャの解放(ref this.tx火花[1]); + TextureFactory.tテクスチャの解放(ref this.tx火花[2]); base.OnManagedリソースの解放(); } } public override int On進行描画() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - for( int i = 0; i < 6; i++ ) + for (int i = 0; i < 6; i++) { - this.ct進行[ i ].t進行(); - if( this.ct進行[ i ].b終了値に達した ) + this.ct進行[i].t進行(); + if (this.ct進行[i].b終了値に達した) { - this.ct進行[ i ].t停止(); + this.ct進行[i].t停止(); } } - for( int j = 0; j < 6; j++ ) + for (int j = 0; j < 6; j++) { - if( ( this.ct進行[ j ].n現在の経過時間ms != -1 ) && ( this.tx火花[ j % 3 ] != null ) ) + if ((this.ct進行[j].n現在の経過時間ms != -1) && (this.tx火花[j % 3] != null)) { - float scale = (float) ( 3.0 * Math.Cos( ( Math.PI * ( 90.0 - ( 90.0 * ( ( (double) this.ct進行[ j ].n現在の値 ) / 56.0 ) ) ) ) / 180.0 ) ); - int x = (int) ( this.pt中央位置[ j ].X ) - ( (int) ( ( this.tx火花[ j % 3 ].sz画像サイズ.Width * scale ) / 2f ) ); - int y = (int) ( this.pt中央位置[ j ].Y ) - ( (int) ( ( this.tx火花[ j % 3 ].sz画像サイズ.Height * scale ) / 2f ) ); - this.tx火花[ j % 3 ].n透明度 = ( this.ct進行[ j ].n現在の値 < 0x1c ) ? 0xff : ( 0xff - ( (int) ( 255.0 * Math.Cos( ( Math.PI * ( 90.0 - ( 90.0 * ( ( (double) ( this.ct進行[ j ].n現在の値 - 0x1c ) ) / 28.0 ) ) ) ) / 180.0 ) ) ) ); - this.tx火花[ j % 3 ].vc拡大縮小倍率 = new Vector3( scale, scale, 1f ); + float scale = (float)(3.0 * Math.Cos((Math.PI * (90.0 - (90.0 * (((double)this.ct進行[j].n現在の値) / 56.0)))) / 180.0)); + int x = (int)(this.pt中央位置[j].X) - ((int)((this.tx火花[j % 3].sz画像サイズ.Width * scale) / 2f)); + int y = (int)(this.pt中央位置[j].Y) - ((int)((this.tx火花[j % 3].sz画像サイズ.Height * scale) / 2f)); + this.tx火花[j % 3].n透明度 = (this.ct進行[j].n現在の値 < 0x1c) ? 0xff : (0xff - ((int)(255.0 * Math.Cos((Math.PI * (90.0 - (90.0 * (((double)(this.ct進行[j].n現在の値 - 0x1c)) / 28.0)))) / 180.0)))); + this.tx火花[j % 3].vc拡大縮小倍率 = new Vector3(scale, scale, 1f); - E楽器パート e楽器パート = ( j < 3 ) ? E楽器パート.GUITAR : E楽器パート.BASS; // BEGIN #31602 2013.6.24 yyagi - int deltaY = _演奏判定ライン座標.nJudgeLinePosY_delta[ (int)e楽器パート ]; - if ( this.bReverse[ (int)e楽器パート ] ) + E楽器パート e楽器パート = (j < 3) ? E楽器パート.GUITAR : E楽器パート.BASS; // BEGIN #31602 2013.6.24 yyagi + int deltaY = _演奏判定ライン座標.nJudgeLinePosY_delta[(int)e楽器パート]; + if (this.bReverse[(int)e楽器パート]) { deltaY = -deltaY; } // END #31602 - - this.tx火花[ j % 3 ].t2D描画( CDTXMania.app.Device, x, y - deltaY ); + + this.tx火花[j % 3].t2D描画(CDTXMania.app.Device, x, y - deltaY); } } } @@ -127,9 +127,9 @@ namespace DTXMania #region [ private ] //----------------- - private CCounter[] ct進行 = new CCounter[ 6 ]; - private Point[] pt中央位置 = new Point[ 6 ]; - private CTexture[] tx火花 = new CTexture[ 3 ]; + private CCounter[] ct進行 = new CCounter[6]; + private Point[] pt中央位置 = new Point[6]; + private CTexture[] tx火花 = new CTexture[3]; //private STDGBVALUE nJudgeLinePosY_delta = new STDGBVALUE(); C演奏判定ライン座標共通 _演奏判定ライン座標 = new C演奏判定ライン座標共通(); private STDGBVALUE bReverse = new STDGBVALUE(); diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏パネル文字列.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏パネル文字列.cs index d8dd109d..9d8fe329 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏パネル文字列.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏パネル文字列.cs @@ -19,39 +19,39 @@ namespace DTXMania this.strパネル文字列 = ""; this.Start(); } - - + + // メソッド - public void SetPanelString( string str ) + public void SetPanelString(string str) { this.strパネル文字列 = str; - if( base.b活性化してる ) + if (base.b活性化してる) { - TextureFactory.tテクスチャの解放( ref this.txPanel ); - if( ( this.strパネル文字列 != null ) && ( this.strパネル文字列.Length > 0 ) ) + TextureFactory.tテクスチャの解放(ref this.txPanel); + if ((this.strパネル文字列 != null) && (this.strパネル文字列.Length > 0)) { - Bitmap image = new Bitmap( 1, 1 ); - Graphics graphics = Graphics.FromImage( image ); + Bitmap image = new Bitmap(1, 1); + Graphics graphics = Graphics.FromImage(image); graphics.PageUnit = GraphicsUnit.Pixel; - this.n文字列の長さdot = (int) graphics.MeasureString( this.strパネル文字列, this.ft表示用フォント ).Width; + this.n文字列の長さdot = (int)graphics.MeasureString(this.strパネル文字列, this.ft表示用フォント).Width; graphics.Dispose(); try { - Bitmap bitmap2 = new Bitmap( this.n文字列の長さdot, (int) this.ft表示用フォント.Size ); - graphics = Graphics.FromImage( bitmap2 ); - graphics.DrawString( this.strパネル文字列, this.ft表示用フォント, Brushes.Red, (float) 0f, (float) 0f ); + Bitmap bitmap2 = new Bitmap(this.n文字列の長さdot, (int)this.ft表示用フォント.Size); + graphics = Graphics.FromImage(bitmap2); + graphics.DrawString(this.strパネル文字列, this.ft表示用フォント, Brushes.Red, (float)0f, (float)0f); graphics.Dispose(); - this.txPanel = new CTexture( CDTXMania.app.Device, bitmap2, CDTXMania.app.TextureFormat ); - this.txPanel.vc拡大縮小倍率 = new Vector3( 0.5f, 0.5f, 1f ); + this.txPanel = new CTexture(CDTXMania.app.Device, bitmap2, CDTXMania.app.TextureFormat); + this.txPanel.vc拡大縮小倍率 = new Vector3(0.5f, 0.5f, 1f); bitmap2.Dispose(); } - catch( CTextureCreateFailedException ) + catch (CTextureCreateFailedException) { - Trace.TraceError( "パネル文字列テクスチャの生成に失敗しました。" ); + Trace.TraceError("パネル文字列テクスチャの生成に失敗しました。"); this.txPanel = null; } - this.ct進行用 = new CCounter( (int) ( -278 * Scale.X ), this.n文字列の長さdot / 2, unchecked( (int) ( 12.0f / Scale.X ) ), CDTXMania.app.Timer ); + this.ct進行用 = new CCounter((int)(-278 * Scale.X), this.n文字列の長さdot / 2, unchecked((int)(12.0f / Scale.X)), CDTXMania.app.Timer); } this.Start(); } @@ -71,7 +71,7 @@ namespace DTXMania public override void On活性化() { - this.ft表示用フォント = new Font( "MS PGothic", 48f * Scale.Y, FontStyle.Italic | FontStyle.Bold, GraphicsUnit.Pixel ); + this.ft表示用フォント = new Font("MS PGothic", 48f * Scale.Y, FontStyle.Italic | FontStyle.Bold, GraphicsUnit.Pixel); this.n文字列の長さdot = 0; this.txPanel = null; this.ct進行用 = new CCounter(); @@ -80,64 +80,64 @@ namespace DTXMania } public override void On非活性化() { - if( this.ft表示用フォント != null ) + if (this.ft表示用フォント != null) { this.ft表示用フォント.Dispose(); this.ft表示用フォント = null; } - TextureFactory.tテクスチャの解放( ref this.txPanel ); + TextureFactory.tテクスチャの解放(ref this.txPanel); this.ct進行用 = null; base.On非活性化(); } public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - this.SetPanelString( this.strパネル文字列 ); + this.SetPanelString(this.strパネル文字列); base.OnManagedリソースの作成(); } } public override void OnManagedリソースの解放() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.txPanel ); + TextureFactory.tテクスチャの解放(ref this.txPanel); base.OnManagedリソースの解放(); } } public override int On進行描画() { - throw new InvalidOperationException( "t進行描画(x,y)のほうを使用してください。" ); + throw new InvalidOperationException("t進行描画(x,y)のほうを使用してください。"); } - public int t進行描画( int x, int y ) + public int t進行描画(int x, int y) { - if( !base.b活性化してない && !this.bMute ) + if (!base.b活性化してない && !this.bMute) { this.ct進行用.t進行Loop(); - if( ( string.IsNullOrEmpty( this.strパネル文字列 ) || ( this.txPanel == null ) ) || ( this.ct進行用 == null ) ) + if ((string.IsNullOrEmpty(this.strパネル文字列) || (this.txPanel == null)) || (this.ct進行用 == null)) { return 0; } float magX = this.txPanel.vc拡大縮小倍率.X; Rectangle rectangle = new Rectangle( - (int) ( ( (float) this.ct進行用.n現在の値 ) / magX ), + (int)(((float)this.ct進行用.n現在の値) / magX), 0, - (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left)? - (int) ( 278f / magX * Scale.X ) : - (int) ( 180f / magX * Scale.X ), - (int) this.ft表示用フォント.Size + (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left) ? + (int)(278f / magX * Scale.X) : + (int)(180f / magX * Scale.X), + (int)this.ft表示用フォント.Size ); - if ( rectangle.X < 0 ) + if (rectangle.X < 0) { - x -= (int) ( rectangle.X * magX / Scale.X ); + x -= (int)(rectangle.X * magX / Scale.X); rectangle.Width += rectangle.X; rectangle.X = 0; } - if( rectangle.Right >= this.n文字列の長さdot ) + if (rectangle.Right >= this.n文字列の長さdot) { rectangle.Width -= rectangle.Right - this.n文字列の長さdot; } - this.txPanel.t2D描画( CDTXMania.app.Device, x * Scale.X, y * Scale.Y, rectangle ); + this.txPanel.t2D描画(CDTXMania.app.Device, x * Scale.X, y * Scale.Y, rectangle); } return 0; } diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏レーンフラッシュGB共通.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏レーンフラッシュGB共通.cs index 3ecd4785..3df4d20d 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏レーンフラッシュGB共通.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏レーンフラッシュGB共通.cs @@ -9,8 +9,8 @@ namespace DTXMania { // プロパティ - protected CCounter[] ct進行 = new CCounter[ 6 ]; - protected CTextureAf[] txFlush = new CTextureAf[ 6 ]; + protected CCounter[] ct進行 = new CCounter[6]; + protected CTextureAf[] txFlush = new CTextureAf[6]; // コンストラクタ @@ -23,13 +23,13 @@ namespace DTXMania // メソッド - public void Start( int nLane ) + public void Start(int nLane) { - if( ( nLane < 0 ) || ( nLane > 6 ) ) + if ((nLane < 0) || (nLane > 6)) { - throw new IndexOutOfRangeException( "有効範囲は 0~6 です。" ); + throw new IndexOutOfRangeException("有効範囲は 0~6 です。"); } - this.ct進行[ nLane ] = new CCounter( 0, 100, 1, CDTXMania.app.Timer ); + this.ct進行[nLane] = new CCounter(0, 100, 1, CDTXMania.app.Timer); } @@ -37,40 +37,40 @@ namespace DTXMania public override void On活性化() { - for( int i = 0; i < 6; i++ ) + for (int i = 0; i < 6; i++) { - this.ct進行[ i ] = new CCounter(); + this.ct進行[i] = new CCounter(); } base.On活性化(); } public override void On非活性化() { - for( int i = 0; i < 6; i++ ) + for (int i = 0; i < 6; i++) { - this.ct進行[ i ] = null; + this.ct進行[i] = null; } base.On非活性化(); } public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - this.txFlush[ 0 ] = TextureFactory.tテクスチャの生成Af( CSkin.Path( @"Graphics\ScreenPlay lane flush red.png" ) ); - this.txFlush[ 1 ] = TextureFactory.tテクスチャの生成Af( CSkin.Path( @"Graphics\ScreenPlay lane flush green.png" ) ); - this.txFlush[ 2 ] = TextureFactory.tテクスチャの生成Af( CSkin.Path( @"Graphics\ScreenPlay lane flush blue.png" ) ); - this.txFlush[ 3 ] = TextureFactory.tテクスチャの生成Af( CSkin.Path( @"Graphics\ScreenPlay lane flush red reverse.png" ) ); - this.txFlush[ 4 ] = TextureFactory.tテクスチャの生成Af( CSkin.Path( @"Graphics\ScreenPlay lane flush green reverse.png" ) ); - this.txFlush[ 5 ] = TextureFactory.tテクスチャの生成Af( CSkin.Path( @"Graphics\ScreenPlay lane flush blue reverse.png" ) ); + this.txFlush[0] = TextureFactory.tテクスチャの生成Af(CSkin.Path(@"Graphics\ScreenPlay lane flush red.png")); + this.txFlush[1] = TextureFactory.tテクスチャの生成Af(CSkin.Path(@"Graphics\ScreenPlay lane flush green.png")); + this.txFlush[2] = TextureFactory.tテクスチャの生成Af(CSkin.Path(@"Graphics\ScreenPlay lane flush blue.png")); + this.txFlush[3] = TextureFactory.tテクスチャの生成Af(CSkin.Path(@"Graphics\ScreenPlay lane flush red reverse.png")); + this.txFlush[4] = TextureFactory.tテクスチャの生成Af(CSkin.Path(@"Graphics\ScreenPlay lane flush green reverse.png")); + this.txFlush[5] = TextureFactory.tテクスチャの生成Af(CSkin.Path(@"Graphics\ScreenPlay lane flush blue reverse.png")); base.OnManagedリソースの作成(); } } public override void OnManagedリソースの解放() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - for( int i = 0; i < 6; i++ ) + for (int i = 0; i < 6; i++) { - TextureFactory.tテクスチャの解放( ref this.txFlush[ i ] ); + TextureFactory.tテクスチャの解放(ref this.txFlush[i]); } base.OnManagedリソースの解放(); } diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏判定文字列共通.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏判定文字列共通.cs index ccc0b03f..85c05883 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏判定文字列共通.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏判定文字列共通.cs @@ -11,8 +11,8 @@ namespace DTXMania { // プロパティ - protected STSTATUS[] st状態 = new STSTATUS[ 12 ]; - [StructLayout( LayoutKind.Sequential )] + protected STSTATUS[] st状態 = new STSTATUS[12]; + [StructLayout(LayoutKind.Sequential)] protected struct STSTATUS { public CCounter ct進行; @@ -26,7 +26,7 @@ namespace DTXMania } protected readonly ST判定文字列[] st判定文字列; - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] protected struct ST判定文字列 { public int n画像番号; @@ -34,14 +34,14 @@ namespace DTXMania } protected readonly STlag数値[] stLag数値; // #25370 2011.2.1 yyagi - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] protected struct STlag数値 { public Rectangle rc; } - - protected CTexture[] tx判定文字列 = new CTexture[ 3 ]; + + protected CTexture[] tx判定文字列 = new CTexture[3]; protected CTexture txlag数値 = new CTexture(); // #25370 2011.2.1 yyagi public int nShowLagType // #25370 2011.6.3 yyagi @@ -54,7 +54,7 @@ namespace DTXMania public CAct演奏判定文字列共通() { - this.st判定文字列 = new ST判定文字列[ 7 ]; + this.st判定文字列 = new ST判定文字列[7]; Rectangle[] r = new Rectangle[] { new Rectangle( 0, 256 / 3 * 0, 256, 256 / 3 ), // Perfect new Rectangle( 0, 256 / 3 * 1, 256, 256 / 3 ), // Great @@ -65,28 +65,28 @@ namespace DTXMania new Rectangle( 0, 256 / 3 * 0, 256, 256 / 3 ) // Auto }; - for ( int i = 0; i < 7; i++ ) + for (int i = 0; i < 7; i++) { - this.st判定文字列[ i ] = new ST判定文字列(); - this.st判定文字列[ i ].n画像番号 = i / 3; - this.st判定文字列[ i ].rc = r[i]; + this.st判定文字列[i] = new ST判定文字列(); + this.st判定文字列[i].n画像番号 = i / 3; + this.st判定文字列[i].rc = r[i]; } - this.stLag数値 = new STlag数値[ 12 * 2 ]; // #25370 2011.2.1 yyagi + this.stLag数値 = new STlag数値[12 * 2]; // #25370 2011.2.1 yyagi - for ( int i = 0; i < 12; i++ ) + for (int i = 0; i < 12; i++) { - this.stLag数値[ i ].rc = new Rectangle( - (int) ( ( i % 4 ) * 15 * Scale.X ), - (int) ( ( i / 4 ) * 19 * Scale.Y ), - (int) ( 15 * Scale.X ), - (int) ( 19 * Scale.Y ) + this.stLag数値[i].rc = new Rectangle( + (int)((i % 4) * 15 * Scale.X), + (int)((i / 4) * 19 * Scale.Y), + (int)(15 * Scale.X), + (int)(19 * Scale.Y) ); // plus numbers - this.stLag数値[ i + 12 ].rc = new Rectangle( - (int) ( ( ( i % 4 ) * 15 + 64 ) * Scale.X ), - (int) ( ( ( i / 4 ) * 19 + 64 ) * Scale.Y ), - (int) ( 15 * Scale.X ), - (int) ( 19 * Scale.Y ) + this.stLag数値[i + 12].rc = new Rectangle( + (int)(((i % 4) * 15 + 64) * Scale.X), + (int)(((i / 4) * 19 + 64) * Scale.Y), + (int)(15 * Scale.X), + (int)(19 * Scale.Y) ); // minus numbers } base.b活性化してない = true; @@ -95,22 +95,22 @@ namespace DTXMania // メソッド - public virtual void Start( int nLane, E判定 judge, int lag ) + public virtual void Start(int nLane, E判定 judge, int lag) { - if( ( nLane < 0 ) || ( nLane > 11 ) ) + if ((nLane < 0) || (nLane > 11)) { - throw new IndexOutOfRangeException( "有効範囲は 0~11 です。" ); + throw new IndexOutOfRangeException("有効範囲は 0~11 です。"); } - if( ( ( nLane >= 8 ) || ( ( (E判定文字表示位置) CDTXMania.app.ConfigIni.判定文字表示位置.Drums ) != E判定文字表示位置.表示OFF ) ) && ( ( ( nLane != 10 ) || ( ( (E判定文字表示位置) CDTXMania.app.ConfigIni.判定文字表示位置.Guitar ) != E判定文字表示位置.表示OFF ) ) && ( ( nLane != 11 ) || ( ( (E判定文字表示位置) CDTXMania.app.ConfigIni.判定文字表示位置.Bass ) != E判定文字表示位置.表示OFF ) ) ) ) + if (((nLane >= 8) || (((E判定文字表示位置)CDTXMania.app.ConfigIni.判定文字表示位置.Drums) != E判定文字表示位置.表示OFF)) && (((nLane != 10) || (((E判定文字表示位置)CDTXMania.app.ConfigIni.判定文字表示位置.Guitar) != E判定文字表示位置.表示OFF)) && ((nLane != 11) || (((E判定文字表示位置)CDTXMania.app.ConfigIni.判定文字表示位置.Bass) != E判定文字表示位置.表示OFF)))) { - this.st状態[ nLane ].ct進行 = new CCounter( 0, 300, 1, CDTXMania.app.Timer ); - this.st状態[ nLane ].judge = judge; - this.st状態[ nLane ].fX方向拡大率 = 1f; - this.st状態[ nLane ].fY方向拡大率 = 1f; - this.st状態[ nLane ].n相対X座標 = 0; - this.st状態[ nLane ].n相対Y座標 = 0; - this.st状態[ nLane ].n透明度 = 0xff; - this.st状態[ nLane ].nLag = lag; + this.st状態[nLane].ct進行 = new CCounter(0, 300, 1, CDTXMania.app.Timer); + this.st状態[nLane].judge = judge; + this.st状態[nLane].fX方向拡大率 = 1f; + this.st状態[nLane].fY方向拡大率 = 1f; + this.st状態[nLane].n相対X座標 = 0; + this.st状態[nLane].n相対Y座標 = 0; + this.st状態[nLane].n透明度 = 0xff; + this.st状態[nLane].nLag = lag; } } @@ -119,45 +119,45 @@ namespace DTXMania public override void On活性化() { - for( int i = 0; i < 12; i++ ) + for (int i = 0; i < 12; i++) { - this.st状態[ i ].ct進行 = new CCounter(); + this.st状態[i].ct進行 = new CCounter(); } base.On活性化(); this.nShowLagType = CDTXMania.app.ConfigIni.nShowLagType; } public override void On非活性化() { - for( int i = 0; i < 12; i++ ) + for (int i = 0; i < 12; i++) { - this.st状態[ i ].ct進行 = null; + this.st状態[i].ct進行 = null; } base.On非活性化(); } public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - this.tx判定文字列[ 0 ] = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlay judge strings 1.png" ) ); - this.tx判定文字列[ 1 ] = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlay judge strings 2.png" ) ); - this.tx判定文字列[ 2 ] = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlay judge strings 3.png" ) ); - this.txlag数値 = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenSelect level numbers.png" ) ); + this.tx判定文字列[0] = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenPlay judge strings 1.png")); + this.tx判定文字列[1] = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenPlay judge strings 2.png")); + this.tx判定文字列[2] = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenPlay judge strings 3.png")); + this.txlag数値 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenSelect level numbers.png")); base.OnManagedリソースの作成(); } } public override void OnManagedリソースの解放() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.tx判定文字列[ 0 ] ); - TextureFactory.tテクスチャの解放( ref this.tx判定文字列[ 1 ] ); - TextureFactory.tテクスチャの解放( ref this.tx判定文字列[ 2 ] ); - TextureFactory.tテクスチャの解放( ref this.txlag数値 ); + TextureFactory.tテクスチャの解放(ref this.tx判定文字列[0]); + TextureFactory.tテクスチャの解放(ref this.tx判定文字列[1]); + TextureFactory.tテクスチャの解放(ref this.tx判定文字列[2]); + TextureFactory.tテクスチャの解放(ref this.txlag数値); base.OnManagedリソースの解放(); } } - public virtual int t進行描画( C演奏判定ライン座標共通 演奏判定ライン座標共通 ) + public virtual int t進行描画(C演奏判定ライン座標共通 演奏判定ライン座標共通) { return 0; } diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏演奏情報.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏演奏情報.cs index e4197645..ab8d3a4e 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏演奏情報.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏演奏情報.cs @@ -21,7 +21,7 @@ namespace DTXMania base.b活性化してない = true; } - + // CActivity 実装 public override void On活性化() @@ -32,32 +32,32 @@ namespace DTXMania } public override int On進行描画() { - throw new InvalidOperationException( "t進行描画(int x, int y) のほうを使用してください。" ); + throw new InvalidOperationException("t進行描画(int x, int y) のほうを使用してください。"); } - public void t進行描画( int x, int y ) + public void t進行描画(int x, int y) { x = (int)(x * Scale.X); y = (int)(y * Scale.Y); - if ( !base.b活性化してない ) + if (!base.b活性化してない) { y += (int)(0x153 * Scale.Y); - CDTXMania.app.act文字コンソール.tPrint( x, y, C文字コンソール.Eフォント種別.白, - string.Format( "JudgeLine D/G/B Adj: {0} px", CDTXMania.app.ConfigIni.nJudgeLinePosOffset.Drums, CDTXMania.app.ConfigIni.nJudgeLinePosOffset.Guitar, CDTXMania.app.ConfigIni.nJudgeLinePosOffset.Bass ) ); + CDTXMania.app.act文字コンソール.tPrint(x, y, C文字コンソール.Eフォント種別.白, + string.Format("JudgeLine D/G/B Adj: {0} px", CDTXMania.app.ConfigIni.nJudgeLinePosOffset.Drums, CDTXMania.app.ConfigIni.nJudgeLinePosOffset.Guitar, CDTXMania.app.ConfigIni.nJudgeLinePosOffset.Bass)); y -= 0x10 * 2; //CDTXMania.app.act文字コンソール.tPrint( x, y, C文字コンソール.Eフォント種別.白, string.Format( "BGM/D/G/B Adj: {0:####0}/{1:####0}/{2:####0}/{3:####0} ms", CDTXMania.app.DTX.nBGMAdjust, CDTXMania.app.ConfigIni.nInputAdjustTimeMs.Drums, CDTXMania.app.ConfigIni.nInputAdjustTimeMs.Guitar, CDTXMania.app.ConfigIni.nInputAdjustTimeMs.Bass ) ); - CDTXMania.app.act文字コンソール.tPrint( x, y, C文字コンソール.Eフォント種別.白, string.Format( "BGM/D/G/B Adj: {0}/{1}/{2}/{3} ms", CDTXMania.app.DTX.nBGMAdjust, CDTXMania.app.ConfigIni.nInputAdjustTimeMs.Drums, CDTXMania.app.ConfigIni.nInputAdjustTimeMs.Guitar, CDTXMania.app.ConfigIni.nInputAdjustTimeMs.Bass ) ); + CDTXMania.app.act文字コンソール.tPrint(x, y, C文字コンソール.Eフォント種別.白, string.Format("BGM/D/G/B Adj: {0}/{1}/{2}/{3} ms", CDTXMania.app.DTX.nBGMAdjust, CDTXMania.app.ConfigIni.nInputAdjustTimeMs.Drums, CDTXMania.app.ConfigIni.nInputAdjustTimeMs.Guitar, CDTXMania.app.ConfigIni.nInputAdjustTimeMs.Bass)); y -= 0x10 * 2; - int num = ( CDTXMania.app.DTX.listChip.Count > 0 ) ? CDTXMania.app.DTX.listChip[ CDTXMania.app.DTX.listChip.Count - 1 ].n発声時刻ms : 0; - string str = "Time: " + ( ( ( ( double ) CDTXMania.app.Timer.n現在時刻 ) / 1000.0 ) ).ToString( "####0.00" ) + " / " + ( ( ( ( double ) num ) / 1000.0 ) ).ToString( "####0.00" ); - CDTXMania.app.act文字コンソール.tPrint( x, y, C文字コンソール.Eフォント種別.白, str ); + int num = (CDTXMania.app.DTX.listChip.Count > 0) ? CDTXMania.app.DTX.listChip[CDTXMania.app.DTX.listChip.Count - 1].n発声時刻ms : 0; + string str = "Time: " + ((((double)CDTXMania.app.Timer.n現在時刻) / 1000.0)).ToString("####0.00") + " / " + ((((double)num) / 1000.0)).ToString("####0.00"); + CDTXMania.app.act文字コンソール.tPrint(x, y, C文字コンソール.Eフォント種別.白, str); y -= 0x10 * 2; //CDTXMania.app.act文字コンソール.tPrint( x, y, C文字コンソール.Eフォント種別.白, string.Format( "Part: {0:####0}", this.n小節番号 ) ); - CDTXMania.app.act文字コンソール.tPrint( x, y, C文字コンソール.Eフォント種別.白, string.Format( "Part: {0}", this.n小節番号 ) ); + CDTXMania.app.act文字コンソール.tPrint(x, y, C文字コンソール.Eフォント種別.白, string.Format("Part: {0}", this.n小節番号)); y -= 0x10 * 2; - CDTXMania.app.act文字コンソール.tPrint( x, y, C文字コンソール.Eフォント種別.白, string.Format( "BPM: {0:####0.00}", this.dbBPM ) ); + CDTXMania.app.act文字コンソール.tPrint(x, y, C文字コンソール.Eフォント種別.白, string.Format("BPM: {0:####0.00}", this.dbBPM)); y -= 0x10 * 2; //CDTXMania.app.act文字コンソール.tPrint( x, y, C文字コンソール.Eフォント種別.白, string.Format( "Frame: {0:####0} fps", CDTXMania.app.FPS.n現在のFPS ) ); - CDTXMania.app.act文字コンソール.tPrint( x, y, C文字コンソール.Eフォント種別.白, string.Format( "Frame: {0} fps", CDTXMania.app.FPS.n現在のFPS ) ); + CDTXMania.app.act文字コンソール.tPrint(x, y, C文字コンソール.Eフォント種別.白, string.Format("Frame: {0} fps", CDTXMania.app.FPS.n現在のFPS)); y -= 0x10 * 2; //CDTXMania.app.act文字コンソール.tPrint( x, y, C文字コンソール.Eフォント種別.白, string.Format( "Sound CPU : {0:####0.00}%", CDTXMania.app.Sound管理.GetCPUusage() ) ); //y -= 0x10 * 2; diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CInvisibleChip.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CInvisibleChip.cs index de10d3d9..d482f6e0 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CInvisibleChip.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CInvisibleChip.cs @@ -28,18 +28,18 @@ namespace DTXMania #region [ コンストラクタ ] public CInvisibleChip() { - Initialize( 3000, 2000 ); + Initialize(3000, 2000); } /// /// コンストラクタ /// /// ミス時再表示する時間(秒) /// 再表示後フェードアウトする時間(秒) - public CInvisibleChip( int _nDisplayTimeMs, int _nFadeoutTimeMs ) + public CInvisibleChip(int _nDisplayTimeMs, int _nFadeoutTimeMs) { - Initialize( _nDisplayTimeMs, _nFadeoutTimeMs ); + Initialize(_nDisplayTimeMs, _nFadeoutTimeMs); } - private void Initialize( int _nDisplayTimeMs, int _nFadeoutTimeMs ) + private void Initialize(int _nDisplayTimeMs, int _nFadeoutTimeMs) { nDisplayTimeMs = _nDisplayTimeMs; nFadeoutTimeMs = _nFadeoutTimeMs; @@ -52,10 +52,10 @@ namespace DTXMania /// public void Reset() { - for ( int i = 0; i < 3; i++ ) + for (int i = 0; i < 3; i++) { - ccounter[ i ] = new CCounter(); - b演奏チップが1つでもバーを通過した[ i ] = false; + ccounter[i] = new CCounter(); + b演奏チップが1つでもバーを通過した[i] = false; } } @@ -63,16 +63,16 @@ namespace DTXMania /// まだSemi-Invisibleを開始していなければ、開始する /// /// - public void StartSemiInvisible( E楽器パート eInst ) + public void StartSemiInvisible(E楽器パート eInst) { - int nInst = (int) eInst; - if ( !b演奏チップが1つでもバーを通過した[ nInst ] ) + int nInst = (int)eInst; + if (!b演奏チップが1つでもバーを通過した[nInst]) { - b演奏チップが1つでもバーを通過した[ nInst ] = true; - if ( this.eInvisibleMode[ nInst ] == EInvisible.SEMI ) + b演奏チップが1つでもバーを通過した[nInst] = true; + if (this.eInvisibleMode[nInst] == EInvisible.SEMI) { - ShowChipTemporally( eInst ); - ccounter[ nInst ].n現在の値 = nDisplayTimeMs; + ShowChipTemporally(eInst); + ccounter[nInst].n現在の値 = nDisplayTimeMs; } } } @@ -80,9 +80,9 @@ namespace DTXMania /// 一時的にチップを表示するモードを開始する /// /// 楽器パート - public void ShowChipTemporally( E楽器パート eInst ) + public void ShowChipTemporally(E楽器パート eInst) { - ccounter[ (int) eInst ].t開始( 0, nDisplayTimeMs + nFadeoutTimeMs + 1, 1, CDTXMania.app.Timer ); + ccounter[(int)eInst].t開始(0, nDisplayTimeMs + nFadeoutTimeMs + 1, 1, CDTXMania.app.Timer); } /// @@ -95,18 +95,18 @@ namespace DTXMania INVISIBLE // 完全非表示 } - internal EChipInvisibleState SetInvisibleStatus( ref CChip cc ) + internal EChipInvisibleState SetInvisibleStatus(ref CChip cc) { - if ( cc.e楽器パート == E楽器パート.UNKNOWN ) + if (cc.e楽器パート == E楽器パート.UNKNOWN) { return EChipInvisibleState.SHOW; } - int nInst = (int) cc.e楽器パート; + int nInst = (int)cc.e楽器パート; EChipInvisibleState retcode = EChipInvisibleState.SHOW; - ccounter[ nInst ].t進行(); + ccounter[nInst].t進行(); - switch ( eInvisibleMode[ nInst ] ) + switch (eInvisibleMode[nInst]) { case EInvisible.OFF: cc.b可視 = true; @@ -119,30 +119,30 @@ namespace DTXMania break; case EInvisible.SEMI: - if ( !b演奏チップが1つでもバーを通過した[ nInst ] ) // まだ1つもチップがバーを通過していない時は、チップを表示する + if (!b演奏チップが1つでもバーを通過した[nInst]) // まだ1つもチップがバーを通過していない時は、チップを表示する { cc.b可視 = true; cc.n透明度 = 255; return EChipInvisibleState.SHOW; } - if ( ccounter[ nInst ].n現在の値 <= 0 || ccounter[ nInst ].n現在の値 > nDisplayTimeMs + nFadeoutTimeMs ) + if (ccounter[nInst].n現在の値 <= 0 || ccounter[nInst].n現在の値 > nDisplayTimeMs + nFadeoutTimeMs) // まだ一度もMissっていない or フェードアウトしきった後 { cc.b可視 = false; cc.n透明度 = 255; retcode = EChipInvisibleState.INVISIBLE; } - else if ( ccounter[ nInst ].n現在の値 < nDisplayTimeMs ) // 表示期間 + else if (ccounter[nInst].n現在の値 < nDisplayTimeMs) // 表示期間 { cc.b可視 = true; cc.n透明度 = 255; retcode = EChipInvisibleState.SHOW; } - else if ( ccounter[ nInst ].n現在の値 < nDisplayTimeMs + nFadeoutTimeMs ) // フェードアウト期間 + else if (ccounter[nInst].n現在の値 < nDisplayTimeMs + nFadeoutTimeMs) // フェードアウト期間 { cc.b可視 = true; - cc.n透明度 = 255 - (int) ( Convert.ToDouble( ccounter[ nInst ].n現在の値 - nDisplayTimeMs ) / nFadeoutTimeMs * 255.0 ); + cc.n透明度 = 255 - (int)(Convert.ToDouble(ccounter[nInst].n現在の値 - nDisplayTimeMs) / nFadeoutTimeMs * 255.0); retcode = EChipInvisibleState.FADEOUT; } break; @@ -154,27 +154,27 @@ namespace DTXMania } return retcode; } - + #region [ Dispose-Finalize パターン実装 ] //----------------- public void Dispose() { - this.Dispose( true ); - GC.SuppressFinalize( this ); + this.Dispose(true); + GC.SuppressFinalize(this); } - protected void Dispose( bool disposeManagedObjects ) + protected void Dispose(bool disposeManagedObjects) { - if( this.bDispose完了済み ) + if (this.bDispose完了済み) return; - if( disposeManagedObjects ) + if (disposeManagedObjects) { // (A) Managed リソースの解放 - for ( int i = 0; i < 3; i++ ) + for (int i = 0; i < 3; i++) { // ctInvisibleTimer[ i ].Dispose(); - ccounter[ i ].t停止(); - ccounter[ i ] = null; + ccounter[i].t停止(); + ccounter[i] = null; } } @@ -184,7 +184,7 @@ namespace DTXMania } ~CInvisibleChip() { - this.Dispose( false ); + this.Dispose(false); } //----------------- #endregion diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CStage演奏画面共通.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CStage演奏画面共通.cs index 071248f6..3f29169e 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CStage演奏画面共通.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CStage演奏画面共通.cs @@ -1955,7 +1955,7 @@ namespace DTXMania bool bPChipIsAutoPlay = pChip.bAssignAutoPlayState(bIsAutoPlay); - + int nInputAdjustTime = (bPChipIsAutoPlay || (pChip.e楽器パート == E楽器パート.UNKNOWN)) ? 0 : this.nInputAdjustTimeMs[(int)pChip.e楽器パート]; int instIndex = (int)pChip.e楽器パート; diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/C演奏判定ライン座標共通.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/C演奏判定ライン座標共通.cs index c32b553a..e17e0b4f 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/C演奏判定ライン座標共通.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/C演奏判定ライン座標共通.cs @@ -13,8 +13,8 @@ namespace DTXMania /// /// 判定ラインのy座標 /// - private STDGBVALUE[,,] n判定ラインY座標元データ = null; // 補正無しの時の座標データ - private STDGBVALUE[,,] n演奏RGBボタンY座標元データ = null; + private STDGBVALUE[, ,] n判定ラインY座標元データ = null; // 補正無しの時の座標データ + private STDGBVALUE[, ,] n演奏RGBボタンY座標元データ = null; /// /// 表示位置の補正データ @@ -33,93 +33,93 @@ namespace DTXMania /// public C演奏判定ライン座標共通() { - n判定ラインY座標元データ = new STDGBVALUE[ 2, 2, 2 ]; + n判定ラインY座標元データ = new STDGBVALUE[2, 2, 2]; #region [ 判定ライン座標の初期化] // Normal, Drums画面, 判定ライン - n判定ラインY座標元データ[ 0, 0, 0 ].Drums = 942; - n判定ラインY座標元データ[ 0, 0, 0 ].Guitar = (int)(95 * Scale.Y); - n判定ラインY座標元データ[ 0, 0, 0 ].Bass = (int)(95 * Scale.Y); + n判定ラインY座標元データ[0, 0, 0].Drums = 942; + n判定ラインY座標元データ[0, 0, 0].Guitar = (int)(95 * Scale.Y); + n判定ラインY座標元データ[0, 0, 0].Bass = (int)(95 * Scale.Y); // Reverse, Drums画面, 判定ライン - n判定ラインY座標元データ[ 1, 0, 0 ].Drums = 119; - n判定ラインY座標元データ[ 1, 0, 0 ].Guitar = (int)(374 * Scale.Y); - n判定ラインY座標元データ[ 1, 0, 0 ].Bass = (int)(374 * Scale.Y); + n判定ラインY座標元データ[1, 0, 0].Drums = 119; + n判定ラインY座標元データ[1, 0, 0].Guitar = (int)(374 * Scale.Y); + n判定ラインY座標元データ[1, 0, 0].Bass = (int)(374 * Scale.Y); // Normal, Drums画面, Wailing枠 - n判定ラインY座標元データ[ 0, 0, 1 ].Drums = 0; //未使用 - n判定ラインY座標元データ[ 0, 0, 1 ].Guitar = (int)(69 * Scale.Y); - n判定ラインY座標元データ[ 0, 0, 1 ].Bass = (int)(69 * Scale.Y); + n判定ラインY座標元データ[0, 0, 1].Drums = 0; //未使用 + n判定ラインY座標元データ[0, 0, 1].Guitar = (int)(69 * Scale.Y); + n判定ラインY座標元データ[0, 0, 1].Bass = (int)(69 * Scale.Y); // Reverse, Drums画面, Wailing枠 - n判定ラインY座標元データ[ 1, 0, 1 ].Drums = 0; //未使用 - n判定ラインY座標元データ[ 1, 0, 1 ].Guitar = (int)(350 * Scale.Y); - n判定ラインY座標元データ[ 1, 0, 1 ].Bass = (int)(350 * Scale.Y); + n判定ラインY座標元データ[1, 0, 1].Drums = 0; //未使用 + n判定ラインY座標元データ[1, 0, 1].Guitar = (int)(350 * Scale.Y); + n判定ラインY座標元データ[1, 0, 1].Bass = (int)(350 * Scale.Y); // Normal, GR画面, 判定ライン - n判定ラインY座標元データ[ 0, 1, 0 ].Drums = 0; //未使用 - n判定ラインY座標元データ[ 0, 1, 0 ].Guitar = (int)(40 * Scale.Y); - n判定ラインY座標元データ[ 0, 1, 0 ].Bass = (int)(40 * Scale.Y); + n判定ラインY座標元データ[0, 1, 0].Drums = 0; //未使用 + n判定ラインY座標元データ[0, 1, 0].Guitar = (int)(40 * Scale.Y); + n判定ラインY座標元データ[0, 1, 0].Bass = (int)(40 * Scale.Y); // Reverse, GR画面, 判定ライン - n判定ラインY座標元データ[ 1, 1, 0 ].Drums = 0; //未使用 - n判定ラインY座標元データ[ 1, 1, 0 ].Guitar = (int)(369 * Scale.Y); - n判定ラインY座標元データ[ 1, 1, 0 ].Bass = (int)(369 * Scale.Y); + n判定ラインY座標元データ[1, 1, 0].Drums = 0; //未使用 + n判定ラインY座標元データ[1, 1, 0].Guitar = (int)(369 * Scale.Y); + n判定ラインY座標元データ[1, 1, 0].Bass = (int)(369 * Scale.Y); // Normal, GR画面, Wailing枠 - n判定ラインY座標元データ[ 0, 1, 1 ].Drums = 0; //未使用 - n判定ラインY座標元データ[ 0, 1, 1 ].Guitar = (int)(11 * Scale.Y); - n判定ラインY座標元データ[ 0, 1, 1 ].Bass = (int)(11 * Scale.Y); + n判定ラインY座標元データ[0, 1, 1].Drums = 0; //未使用 + n判定ラインY座標元データ[0, 1, 1].Guitar = (int)(11 * Scale.Y); + n判定ラインY座標元データ[0, 1, 1].Bass = (int)(11 * Scale.Y); // Reverse, GR画面, Wailing枠 - n判定ラインY座標元データ[ 1, 1, 1 ].Drums = 0; //未使用 - n判定ラインY座標元データ[ 1, 1, 1 ].Guitar = (int)(340 * Scale.Y); - n判定ラインY座標元データ[ 1, 1, 1 ].Bass = (int)(340 * Scale.Y); + n判定ラインY座標元データ[1, 1, 1].Drums = 0; //未使用 + n判定ラインY座標元データ[1, 1, 1].Guitar = (int)(340 * Scale.Y); + n判定ラインY座標元データ[1, 1, 1].Bass = (int)(340 * Scale.Y); #endregion - n演奏RGBボタンY座標元データ = new STDGBVALUE[ 2, 2, 2 ]; + n演奏RGBボタンY座標元データ = new STDGBVALUE[2, 2, 2]; #region [ RGBボタン座標の初期化] // Normal, Drums画面, RGBボタン - n演奏RGBボタンY座標元データ[ 0, 0, 0 ].Drums = 0; // 未使用 - n演奏RGBボタンY座標元データ[ 0, 0, 0 ].Guitar = (int)(57 * Scale.Y); - n演奏RGBボタンY座標元データ[ 0, 0, 0 ].Bass = (int)(57 * Scale.Y); + n演奏RGBボタンY座標元データ[0, 0, 0].Drums = 0; // 未使用 + n演奏RGBボタンY座標元データ[0, 0, 0].Guitar = (int)(57 * Scale.Y); + n演奏RGBボタンY座標元データ[0, 0, 0].Bass = (int)(57 * Scale.Y); // Reverse, Drums画面, RGBボタン - n演奏RGBボタンY座標元データ[ 1, 0, 0 ].Drums = 0; // 未使用 - n演奏RGBボタンY座標元データ[ 1, 0, 0 ].Guitar = (int)(57 * Scale.Y); - n演奏RGBボタンY座標元データ[ 1, 0, 0 ].Bass = (int)(57 * Scale.Y); + n演奏RGBボタンY座標元データ[1, 0, 0].Drums = 0; // 未使用 + n演奏RGBボタンY座標元データ[1, 0, 0].Guitar = (int)(57 * Scale.Y); + n演奏RGBボタンY座標元データ[1, 0, 0].Bass = (int)(57 * Scale.Y); // Normal, Drums画面, RGBボタン(Vシリーズ) - n演奏RGBボタンY座標元データ[ 0, 0, 1 ].Drums = 0; // 未使用 - n演奏RGBボタンY座標元データ[ 0, 0, 1 ].Guitar = (int)(107 * Scale.Y); - n演奏RGBボタンY座標元データ[ 0, 0, 1 ].Bass = (int)(107 * Scale.Y); + n演奏RGBボタンY座標元データ[0, 0, 1].Drums = 0; // 未使用 + n演奏RGBボタンY座標元データ[0, 0, 1].Guitar = (int)(107 * Scale.Y); + n演奏RGBボタンY座標元データ[0, 0, 1].Bass = (int)(107 * Scale.Y); // Reverse, Drums画面, RGBボタン(Vシリーズ) - n演奏RGBボタンY座標元データ[ 1, 0, 1 ].Drums = 0; // 未使用 - n演奏RGBボタンY座標元データ[ 1, 0, 1 ].Guitar = (int)(107 * Scale.Y); - n演奏RGBボタンY座標元データ[ 1, 0, 1 ].Bass = (int)(107 * Scale.Y); + n演奏RGBボタンY座標元データ[1, 0, 1].Drums = 0; // 未使用 + n演奏RGBボタンY座標元データ[1, 0, 1].Guitar = (int)(107 * Scale.Y); + n演奏RGBボタンY座標元データ[1, 0, 1].Bass = (int)(107 * Scale.Y); // Normal, GR画面, RGBボタン - n演奏RGBボタンY座標元データ[ 0, 1, 0 ].Drums = 0; // 未使用 - n演奏RGBボタンY座標元データ[ 0, 1, 0 ].Guitar = (int)(3 * Scale.Y); - n演奏RGBボタンY座標元データ[ 0, 1, 0 ].Bass = (int)(3 * Scale.Y); + n演奏RGBボタンY座標元データ[0, 1, 0].Drums = 0; // 未使用 + n演奏RGBボタンY座標元データ[0, 1, 0].Guitar = (int)(3 * Scale.Y); + n演奏RGBボタンY座標元データ[0, 1, 0].Bass = (int)(3 * Scale.Y); // Reverse, GR画面, RGBボタン - n演奏RGBボタンY座標元データ[ 1, 1, 0 ].Drums = 0; // 未使用 - n演奏RGBボタンY座標元データ[ 1, 1, 0 ].Guitar = (int)(3 * Scale.Y); - n演奏RGBボタンY座標元データ[ 1, 1, 0 ].Bass = (int)(3 * Scale.Y); + n演奏RGBボタンY座標元データ[1, 1, 0].Drums = 0; // 未使用 + n演奏RGBボタンY座標元データ[1, 1, 0].Guitar = (int)(3 * Scale.Y); + n演奏RGBボタンY座標元データ[1, 1, 0].Bass = (int)(3 * Scale.Y); // Normal, GR画面, RGBボタン(Vシリーズ) - n演奏RGBボタンY座標元データ[ 0, 1, 1 ].Drums = 0; // 未使用 - n演奏RGBボタンY座標元データ[ 0, 1, 1 ].Guitar = (int)(44 * Scale.Y); - n演奏RGBボタンY座標元データ[ 0, 1, 1 ].Bass = (int)(44 * Scale.Y); + n演奏RGBボタンY座標元データ[0, 1, 1].Drums = 0; // 未使用 + n演奏RGBボタンY座標元データ[0, 1, 1].Guitar = (int)(44 * Scale.Y); + n演奏RGBボタンY座標元データ[0, 1, 1].Bass = (int)(44 * Scale.Y); // Reverse, GR画面, RGBボタン(Vシリーズ) - n演奏RGBボタンY座標元データ[ 1, 1, 1 ].Drums = 0; // 未使用 - n演奏RGBボタンY座標元データ[ 1, 1, 1 ].Guitar = (int)(44 * Scale.Y); - n演奏RGBボタンY座標元データ[ 1, 1, 1 ].Bass = (int) ( 44 * Scale.Y ); + n演奏RGBボタンY座標元データ[1, 1, 1].Drums = 0; // 未使用 + n演奏RGBボタンY座標元データ[1, 1, 1].Guitar = (int)(44 * Scale.Y); + n演奏RGBボタンY座標元データ[1, 1, 1].Bass = (int)(44 * Scale.Y); #endregion n判定位置 = new STDGBVALUE(); - n判定位置.Drums = E判定位置.標準; + n判定位置.Drums = E判定位置.標準; n判定位置.Guitar = E判定位置.標準; - n判定位置.Bass = E判定位置.標準; + n判定位置.Bass = E判定位置.標準; // 補正値は、Normal/Reverse, Drums/GR画面共通 - nJudgeLinePosY_delta.Drums = 0; + nJudgeLinePosY_delta.Drums = 0; nJudgeLinePosY_delta.Guitar = 0; - nJudgeLinePosY_delta.Bass = 0; + nJudgeLinePosY_delta.Bass = 0; } - + /// /// 判定ラインのY座標を返す。 /// @@ -127,14 +127,14 @@ namespace DTXMania /// GRmodeか否か /// Reverseか否か /// - public int n判定ラインY座標( E楽器パート eInst, bool bGRmode, bool bReverse ) + public int n判定ラインY座標(E楽器パート eInst, bool bGRmode, bool bReverse) { - return n判定ラインY座標( eInst, bGRmode, bReverse, false, false ); + return n判定ラインY座標(eInst, bGRmode, bReverse, false, false); } - public int n判定ラインY座標( E楽器パート eInst, bool bGRmode, bool bReverse, bool bWailingFrame ) + public int n判定ラインY座標(E楽器パート eInst, bool bGRmode, bool bReverse, bool bWailingFrame) { - return n判定ラインY座標( eInst, bGRmode, bReverse, bWailingFrame, false ); + return n判定ラインY座標(eInst, bGRmode, bReverse, bWailingFrame, false); } /// @@ -146,51 +146,51 @@ namespace DTXMania /// Wailing枠の座標か、判定ラインの座標か /// プレーヤーのライン表示位置補正情報を加えるかどうか /// - public int n判定ラインY座標( E楽器パート eInst, bool bGRmode, bool bReverse, bool bWailingFrame, bool b補正あり ) + public int n判定ラインY座標(E楽器パート eInst, bool bGRmode, bool bReverse, bool bWailingFrame, bool b補正あり) { - if ( eInst == E楽器パート.UNKNOWN ) + if (eInst == E楽器パート.UNKNOWN) { throw new ArgumentOutOfRangeException(); } else { - int nReverse = bReverse ? 1 : 0; - int nGRmode = bGRmode ? 1 : 0; + int nReverse = bReverse ? 1 : 0; + int nGRmode = bGRmode ? 1 : 0; int nWailing = bWailingFrame ? 1 : 0; - int nInst = (int) eInst; - int ret = this.n判定ラインY座標元データ[ nReverse, nGRmode, nWailing ][ nInst ]; // 補正無しの値 - if ( bReverse ) + int nInst = (int)eInst; + int ret = this.n判定ラインY座標元データ[nReverse, nGRmode, nWailing][nInst]; // 補正無しの値 + if (bReverse) { - if ( eInst != E楽器パート.DRUMS && n判定位置[ nInst ] == E判定位置.Lower ) - ret += (int) ( 13 * Scale.Y ); - if ( b補正あり ) - { + if (eInst != E楽器パート.DRUMS && n判定位置[nInst] == E判定位置.Lower) + ret += (int)(13 * Scale.Y); + if (b補正あり) + { if (eInst == E楽器パート.DRUMS) { - ret += nJudgeLinePosY_delta[ nInst ]; + ret += nJudgeLinePosY_delta[nInst]; } else { - ret -= nJudgeLinePosY_delta[ nInst ]; + ret -= nJudgeLinePosY_delta[nInst]; } } } else { - if ( eInst != E楽器パート.DRUMS && n判定位置[ nInst ] == E判定位置.Lower ) - ret += (int) ( 52 * Scale.Y ); - if ( b補正あり ) + if (eInst != E楽器パート.DRUMS && n判定位置[nInst] == E判定位置.Lower) + ret += (int)(52 * Scale.Y); + if (b補正あり) { - if ( eInst == E楽器パート.DRUMS ) + if (eInst == E楽器パート.DRUMS) { - ret += nJudgeLinePosY_delta[ nInst ]; + ret += nJudgeLinePosY_delta[nInst]; } else { - ret -= nJudgeLinePosY_delta[ nInst ]; + ret -= nJudgeLinePosY_delta[nInst]; } } } @@ -198,23 +198,23 @@ namespace DTXMania } } - public int n演奏RGBボタンY座標( E楽器パート eInst, bool bGRmode, bool bReverse ) + public int n演奏RGBボタンY座標(E楽器パート eInst, bool bGRmode, bool bReverse) { - if ( eInst == E楽器パート.DRUMS ) + if (eInst == E楽器パート.DRUMS) { throw new NotImplementedException(); } - else if ( eInst == E楽器パート.UNKNOWN ) + else if (eInst == E楽器パート.UNKNOWN) { throw new ArgumentOutOfRangeException(); } else { - int nInst = (int) eInst; - int nGRmode = bGRmode ? 1 : 0; + int nInst = (int)eInst; + int nGRmode = bGRmode ? 1 : 0; int nReverse = bReverse ? 1 : 0; - int nVseries = (int) n判定位置[ nInst ]; - int ret = n演奏RGBボタンY座標元データ[ nReverse, nGRmode, nVseries ][ nInst ]; // 補正無しの値 + int nVseries = (int)n判定位置[nInst]; + int ret = n演奏RGBボタンY座標元データ[nReverse, nGRmode, nVseries][nInst]; // 補正無しの値 return ret; } diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏GuitarDanger.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏GuitarDanger.cs index 6c531cef..c4ef599d 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏GuitarDanger.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏GuitarDanger.cs @@ -12,23 +12,23 @@ namespace DTXMania public override void OnManagedリソースの作成() { - if ( !base.b活性化してない ) + if (!base.b活性化してない) { - this.txDANGER = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlayGuitar danger.png" ) ); + this.txDANGER = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenPlayGuitar danger.png")); base.OnManagedリソースの作成(); } } public override void OnManagedリソースの解放() { - if ( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.txDANGER ); + TextureFactory.tテクスチャの解放(ref this.txDANGER); base.OnManagedリソースの解放(); } } public override int On進行描画() { - throw new InvalidOperationException( "t進行描画(bool)のほうを使用してください。" ); + throw new InvalidOperationException("t進行描画(bool)のほうを使用してください。"); } /// /// DANGER表示(Guitar/Bass) @@ -37,31 +37,31 @@ namespace DTXMania /// GuitarがDangerか否か /// BassがDangerか否か /// - public override int t進行描画( bool bIsDangerDrums, bool bIsDangerGuitar, bool bIsDangerBass ) + public override int t進行描画(bool bIsDangerDrums, bool bIsDangerGuitar, bool bIsDangerBass) { bool[] bIsDanger = { bIsDangerDrums, bIsDangerGuitar, bIsDangerBass }; - if ( !base.b活性化してない ) + if (!base.b活性化してない) { - if ( this.ct透明度用 == null ) + if (this.ct透明度用 == null) { //this.ct移動用 = new CCounter( 0, 0x7f, 7, CDTXMania.app.Timer ); - this.ct透明度用 = new CCounter( 0, n波長, 8, CDTXMania.app.Timer ); + this.ct透明度用 = new CCounter(0, n波長, 8, CDTXMania.app.Timer); } - if ( this.ct透明度用 != null ) + if (this.ct透明度用 != null) { //this.ct移動用.t進行Loop(); this.ct透明度用.t進行Loop(); } - for ( int nPart = (int) E楽器パート.GUITAR; nPart <= (int) E楽器パート.BASS; nPart++ ) + for (int nPart = (int)E楽器パート.GUITAR; nPart <= (int)E楽器パート.BASS; nPart++) { - // this.bDanger中[nPart] = bIsDanger[nPart]; - if ( bIsDanger[ nPart ] ) + // this.bDanger中[nPart] = bIsDanger[nPart]; + if (bIsDanger[nPart]) { - if ( this.txDANGER != null ) + if (this.txDANGER != null) { int d = this.ct透明度用.n現在の値; - this.txDANGER.n透明度 = n透明度MIN + ( ( d < n波長 / 2 ) ? ( n透明度MAX - n透明度MIN ) * d / ( n波長 / 2 ) : ( n透明度MAX - n透明度MIN ) * ( n波長 - d ) / ( n波長 / 2 ) ); // 60-200 + this.txDANGER.n透明度 = n透明度MIN + ((d < n波長 / 2) ? (n透明度MAX - n透明度MIN) * d / (n波長 / 2) : (n透明度MAX - n透明度MIN) * (n波長 - d) / (n波長 / 2)); // 60-200 // } //num = this.ct移動用.n現在の値; //int num2 = CDTXMania.app.ConfigIni.bReverse.Drums ? ( 0x7f - num ) : num; @@ -71,7 +71,7 @@ namespace DTXMania // { this.txDANGER.t2D描画( CDTXMania.app.Device, - nGaugeX[ nPart ] * Scale.X, + nGaugeX[nPart] * Scale.X, 0 ); //this.txDANGER.t2D描画( CDTXMania.app.Device, 0x26, ( ( i * 0x80 ) + num2 ) + 0x40, this.rc領域[ 1 ] ); @@ -94,7 +94,7 @@ namespace DTXMania private const int n透明度MAX = 180; private const int n透明度MIN = 20; private readonly int[] nGaugeX = { 0, 168, 328 }; -// private readonly Rectangle[] rc領域 = new Rectangle[] { new Rectangle( 0, 0, 0x20, 0x40 ), new Rectangle( 0x20, 0, 0x20, 0x40 ) }; + // private readonly Rectangle[] rc領域 = new Rectangle[] { new Rectangle( 0, 0, 0x20, 0x40 ), new Rectangle( 0x20, 0, 0x20, 0x40 ) }; private CTexture txDANGER; //----------------- #endregion diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏GuitarRGB.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏GuitarRGB.cs index 27aa575e..c98a4901 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏GuitarRGB.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏GuitarRGB.cs @@ -19,75 +19,75 @@ namespace DTXMania public override int On進行描画() { - throw new InvalidOperationException( "t進行描画(C演奏判定ライン座標共通 演奏判定ライン共通 ) のほうを使用してください。" ); + throw new InvalidOperationException("t進行描画(C演奏判定ライン座標共通 演奏判定ライン共通 ) のほうを使用してください。"); } - public override int t進行描画( C演奏判定ライン座標共通 演奏判定ライン座標 ) + public override int t進行描画(C演奏判定ライン座標共通 演奏判定ライン座標) { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - if( !CDTXMania.app.ConfigIni.bGuitar有効 ) + if (!CDTXMania.app.ConfigIni.bGuitar有効) { return 0; } - if( CDTXMania.app.DTX.bチップがある.Guitar ) + if (CDTXMania.app.DTX.bチップがある.Guitar) { - for( int j = 0; j < 3; j++ ) + for (int j = 0; j < 3; j++) { - int index = CDTXMania.app.ConfigIni.bLeft.Guitar ? ( 2 - j ) : j; + int index = CDTXMania.app.ConfigIni.bLeft.Guitar ? (2 - j) : j; Rectangle rectangle = new Rectangle( - (int) ( index * 0x18 * Scale.X ), + (int)(index * 0x18 * Scale.X), 0, - (int) ( 0x18 * Scale.X ), - (int) ( 0x20 * Scale.Y ) + (int)(0x18 * Scale.X), + (int)(0x20 * Scale.Y) ); - if( base.b押下状態[ index ] ) + if (base.b押下状態[index]) { - rectangle.Y += (int) ( 0x20 * Scale.Y ); + rectangle.Y += (int)(0x20 * Scale.Y); } - if( base.txRGB != null ) + if (base.txRGB != null) { - int y = 演奏判定ライン座標.n演奏RGBボタンY座標( E楽器パート.GUITAR, true, CDTXMania.app.ConfigIni.bReverse.Guitar ); - // int y = 演奏判定ライン座標.n判定ラインY座標( E楽器パート.GUITAR, true, CDTXMania.app.ConfigIni.bReverse.Guitar, false, false ); + int y = 演奏判定ライン座標.n演奏RGBボタンY座標(E楽器パート.GUITAR, true, CDTXMania.app.ConfigIni.bReverse.Guitar); + // int y = 演奏判定ライン座標.n判定ラインY座標( E楽器パート.GUITAR, true, CDTXMania.app.ConfigIni.bReverse.Guitar, false, false ); base.txRGB.t2D描画( CDTXMania.app.Device, - ( 0x1f + ( j * 0x24 ) ) * Scale.X, + (0x1f + (j * 0x24)) * Scale.X, y, rectangle ); } } } - if( CDTXMania.app.DTX.bチップがある.Bass ) + if (CDTXMania.app.DTX.bチップがある.Bass) { - for( int k = 0; k < 3; k++ ) + for (int k = 0; k < 3; k++) { - int index = CDTXMania.app.ConfigIni.bLeft.Bass ? ( 2 - k ) : k; + int index = CDTXMania.app.ConfigIni.bLeft.Bass ? (2 - k) : k; Rectangle rectangle2 = new Rectangle( - (int) ( index * 0x18 * Scale.X ), + (int)(index * 0x18 * Scale.X), 0, - (int) ( 0x18 * Scale.X ), - (int) ( 0x20 * Scale.Y ) + (int)(0x18 * Scale.X), + (int)(0x20 * Scale.Y) ); - if( base.b押下状態[ index + 3 ] ) + if (base.b押下状態[index + 3]) { - rectangle2.Y += (int) ( 0x20 * Scale.Y ); + rectangle2.Y += (int)(0x20 * Scale.Y); } - if( base.txRGB != null ) + if (base.txRGB != null) { - int y = 演奏判定ライン座標.n演奏RGBボタンY座標( E楽器パート.BASS, true, CDTXMania.app.ConfigIni.bReverse.Bass ); + int y = 演奏判定ライン座標.n演奏RGBボタンY座標(E楽器パート.BASS, true, CDTXMania.app.ConfigIni.bReverse.Bass); //int y = 演奏判定ライン座標.n判定ラインY座標( E楽器パート.BASS, true, CDTXMania.app.ConfigIni.bReverse.Bass, false, false ); base.txRGB.t2D描画( CDTXMania.app.Device, - ( 0x1e5 + ( k * 0x24 ) ) * Scale.X, + (0x1e5 + (k * 0x24)) * Scale.X, y, rectangle2 ); } } } - for( int i = 0; i < 6; i++ ) + for (int i = 0; i < 6; i++) { - base.b押下状態[ i ] = false; + base.b押下状態[i] = false; } } return 0; diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏GuitarWailingBonus.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏GuitarWailingBonus.cs index 49201717..a358e4e1 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏GuitarWailingBonus.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏GuitarWailingBonus.cs @@ -18,23 +18,23 @@ namespace DTXMania //{ // this.Start( part, null ); //} - public override void Start( E楽器パート part, CChip r歓声Chip ) + public override void Start(E楽器パート part, CChip r歓声Chip) { - if( part != E楽器パート.DRUMS ) + if (part != E楽器パート.DRUMS) { - for( int i = 0; i < 4; i++ ) + for (int i = 0; i < 4; i++) { - if( ( this.ct進行用[ (int) part, i ] == null ) || this.ct進行用[ (int) part, i ].b停止中 ) + if ((this.ct進行用[(int)part, i] == null) || this.ct進行用[(int)part, i].b停止中) { - this.ct進行用[ (int) part, i ] = new CCounter( 0, 300, 2, CDTXMania.app.Timer ); - if( CDTXMania.app.ConfigIni.b歓声を発声する ) + this.ct進行用[(int)part, i] = new CCounter(0, 300, 2, CDTXMania.app.Timer); + if (CDTXMania.app.ConfigIni.b歓声を発声する) { - if( r歓声Chip != null ) + if (r歓声Chip != null) { - CDTXMania.app.DTX.tチップの再生( r歓声Chip, CSound管理.rc演奏用タイマ.nシステム時刻, (int) Eレーン.BGM, CDTXMania.app.DTX.nモニタを考慮した音量( E楽器パート.UNKNOWN ) ); + CDTXMania.app.DTX.tチップの再生(r歓声Chip, CSound管理.rc演奏用タイマ.nシステム時刻, (int)Eレーン.BGM, CDTXMania.app.DTX.nモニタを考慮した音量(E楽器パート.UNKNOWN)); return; } - CDTXMania.app.Skin.sound歓声音.n位置_次に鳴るサウンド = ( part == E楽器パート.GUITAR ) ? -50 : 50; + CDTXMania.app.Skin.sound歓声音.n位置_次に鳴るサウンド = (part == E楽器パート.GUITAR) ? -50 : 50; CDTXMania.app.Skin.sound歓声音.t再生する(); return; } @@ -49,90 +49,90 @@ namespace DTXMania public override void On活性化() { - for( int i = 0; i < 3; i++ ) + for (int i = 0; i < 3; i++) { - for( int j = 0; j < 4; j++ ) + for (int j = 0; j < 4; j++) { - this.ct進行用[ i, j ] = null; + this.ct進行用[i, j] = null; } } base.On活性化(); } public override int On進行描画() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - for( int i = 0; i < 2; i++ ) + for (int i = 0; i < 2; i++) { - E楽器パート e楽器パート = ( i == 0 ) ? E楽器パート.GUITAR : E楽器パート.BASS; - for( int k = 0; k < 4; k++ ) + E楽器パート e楽器パート = (i == 0) ? E楽器パート.GUITAR : E楽器パート.BASS; + for (int k = 0; k < 4; k++) { - if( ( this.ct進行用[ (int) e楽器パート, k ] != null ) && !this.ct進行用[ (int) e楽器パート, k ].b停止中 ) + if ((this.ct進行用[(int)e楽器パート, k] != null) && !this.ct進行用[(int)e楽器パート, k].b停止中) { - if( this.ct進行用[ (int) e楽器パート, k ].b終了値に達した ) + if (this.ct進行用[(int)e楽器パート, k].b終了値に達した) { - this.ct進行用[ (int) e楽器パート, k ].t停止(); + this.ct進行用[(int)e楽器パート, k].t停止(); } else { - this.ct進行用[ (int) e楽器パート, k ].t進行(); + this.ct進行用[(int)e楽器パート, k].t進行(); } } } } - for( int j = 0; j < 2; j++ ) + for (int j = 0; j < 2; j++) { - E楽器パート e楽器パート2 = ( j == 0 ) ? E楽器パート.GUITAR : E楽器パート.BASS; - for( int m = 0; m < 4; m++ ) + E楽器パート e楽器パート2 = (j == 0) ? E楽器パート.GUITAR : E楽器パート.BASS; + for (int m = 0; m < 4; m++) { - if( ( this.ct進行用[ (int) e楽器パート2, m ] != null ) && !this.ct進行用[ (int) e楽器パート2, m ].b停止中 ) + if ((this.ct進行用[(int)e楽器パート2, m] != null) && !this.ct進行用[(int)e楽器パート2, m].b停止中) { - int x = ( ( e楽器パート2 == E楽器パート.GUITAR ) ? 0x1a : 480 ) + 0x71; + int x = ((e楽器パート2 == E楽器パート.GUITAR) ? 0x1a : 480) + 0x71; int num6 = 0; int num7 = 0; - int num8 = this.ct進行用[ (int) e楽器パート2, m ].n現在の値; - if( num8 < 100 ) + int num8 = this.ct進行用[(int)e楽器パート2, m].n現在の値; + if (num8 < 100) { - num6 = (int) ( 64.0 + ( 290.0 * Math.Cos( Math.PI / 2 * ( ( (double) num8 ) / 100.0 ) ) ) ); + num6 = (int)(64.0 + (290.0 * Math.Cos(Math.PI / 2 * (((double)num8) / 100.0)))); } - else if( num8 < 150 ) + else if (num8 < 150) { - num6 = (int) ( 64.0 + ( ( 150 - num8 ) * Math.Sin( ( Math.PI * ( ( num8 - 100 ) % 0x19 ) ) / 25.0 ) ) ); + num6 = (int)(64.0 + ((150 - num8) * Math.Sin((Math.PI * ((num8 - 100) % 0x19)) / 25.0))); } - else if( num8 < 200 ) + else if (num8 < 200) { num6 = 0x40; } else { - num6 = (int) ( 64.0 - ( ( (double) ( 290 * ( num8 - 200 ) ) ) / 100.0 ) ); + num6 = (int)(64.0 - (((double)(290 * (num8 - 200))) / 100.0)); } - if( CDTXMania.app.ConfigIni.bReverse[ (int) e楽器パート2 ] ) + if (CDTXMania.app.ConfigIni.bReverse[(int)e楽器パート2]) { - num6 = ( 0x199 - num6 ) - 0xf4; + num6 = (0x199 - num6) - 0xf4; } - Rectangle rectangle = new Rectangle( 0, 0, 0x1a, 0x7a * 2 ); - if( ( 0x199 - num6 ) < rectangle.Bottom ) + Rectangle rectangle = new Rectangle(0, 0, 0x1a, 0x7a * 2); + if ((0x199 - num6) < rectangle.Bottom) { - rectangle.Height = ( 0x199 - num6 ) - rectangle.Top; + rectangle.Height = (0x199 - num6) - rectangle.Top; } - if( num6 < 0 ) + if (num6 < 0) { rectangle.Y = -num6; rectangle.Height -= -num6; num7 = -num6; } - if ( ( rectangle.Top < rectangle.Bottom ) && ( this.txWailingBonus != null ) ) + if ((rectangle.Top < rectangle.Bottom) && (this.txWailingBonus != null)) { - rectangle.X = (int) ( rectangle.X * Scale.X ); - rectangle.Y = (int) ( rectangle.Y * Scale.Y ); - rectangle.Width = (int) ( rectangle.Width * Scale.X ); - rectangle.Height = (int) ( rectangle.Height * Scale.Y ); + rectangle.X = (int)(rectangle.X * Scale.X); + rectangle.Y = (int)(rectangle.Y * Scale.Y); + rectangle.Width = (int)(rectangle.Width * Scale.X); + rectangle.Height = (int)(rectangle.Height * Scale.Y); this.txWailingBonus.t2D描画( CDTXMania.app.Device, x * Scale.X, - ( num6 + num7 ) * Scale.Y, + (num6 + num7) * Scale.Y, rectangle ); } diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏Guitarゲージ.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏Guitarゲージ.cs index 5cb457b9..d1762dde 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏Guitarゲージ.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏Guitarゲージ.cs @@ -10,7 +10,7 @@ namespace DTXMania { // プロパティ -// public STDGBVALUE db現在のゲージ値; + // public STDGBVALUE db現在のゲージ値; // コンストラクタ @@ -26,8 +26,8 @@ namespace DTXMania public override void On活性化() { // CAct演奏ゲージ共通.Init()に移動 -// this.db現在のゲージ値.Guitar = ( CDTXMania.app.ConfigIni.nRisky > 0 ) ? 1.0 : 0.66666666666666663; -// this.db現在のゲージ値.Bass = ( CDTXMania.app.ConfigIni.nRisky > 0 ) ? 1.0 : 0.66666666666666663; + // this.db現在のゲージ値.Guitar = ( CDTXMania.app.ConfigIni.nRisky > 0 ) ? 1.0 : 0.66666666666666663; + // this.db現在のゲージ値.Bass = ( CDTXMania.app.ConfigIni.nRisky > 0 ) ? 1.0 : 0.66666666666666663; base.On活性化(); } public override void On非活性化() @@ -38,83 +38,83 @@ namespace DTXMania } public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - this.txゲージ = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlayGuitar gauge.png" ) ); + this.txゲージ = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenPlayGuitar gauge.png")); base.OnManagedリソースの作成(); } } public override void OnManagedリソースの解放() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.txゲージ ); + TextureFactory.tテクスチャの解放(ref this.txゲージ); base.OnManagedリソースの解放(); } } public override int On進行描画() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { int num; int num9; - if( base.b初めての進行描画 ) + if (base.b初めての進行描画) { - this.ct本体移動 = new CCounter( 0, 0x1a, 20, CDTXMania.app.Timer ); - this.ct本体振動 = new CCounter( 0, 360, 4, CDTXMania.app.Timer ); + this.ct本体移動 = new CCounter(0, 0x1a, 20, CDTXMania.app.Timer); + this.ct本体振動 = new CCounter(0, 360, 4, CDTXMania.app.Timer); base.b初めての進行描画 = false; } this.ct本体移動.t進行Loop(); this.ct本体振動.t進行Loop(); #region [ ギターのゲージ ] - if ( this.db現在のゲージ値.Guitar == 1.0 ) // ギターのゲージ + if (this.db現在のゲージ値.Guitar == 1.0) // ギターのゲージ { - num = (int) ( 128.0 * this.db現在のゲージ値.Guitar ); + num = (int)(128.0 * this.db現在のゲージ値.Guitar); } else { - num = (int) ( ( 128.0 * this.db現在のゲージ値.Guitar ) + ( 2.0 * Math.Sin( Math.PI * 2 * ( ( (double) this.ct本体振動.n現在の値 ) / 360.0 ) ) ) ); + num = (int)((128.0 * this.db現在のゲージ値.Guitar) + (2.0 * Math.Sin(Math.PI * 2 * (((double)this.ct本体振動.n現在の値) / 360.0)))); } - if( num > 0 ) + if (num > 0) { Rectangle rectangle; int num2 = 0x1a - this.ct本体移動.n現在の値; int x = 0xb2 - num2; int num4 = num + num2; - while( num4 > 0 ) + while (num4 > 0) { - if( this.db現在のゲージ値.Guitar == 1.0 ) + if (this.db現在のゲージ値.Guitar == 1.0) { - rectangle = new Rectangle( 0x1b, 0, 0x1b, 0x10 ); + rectangle = new Rectangle(0x1b, 0, 0x1b, 0x10); } else { - rectangle = new Rectangle( 0, 0, 0x1b, 0x10 ); + rectangle = new Rectangle(0, 0, 0x1b, 0x10); } - if( x < 0xb2 ) + if (x < 0xb2) { int num5 = 0xb2 - x; rectangle.X += num5; rectangle.Width -= num5; x += num5; } - if( ( x + rectangle.Width ) > ( 0xb2 + num ) ) + if ((x + rectangle.Width) > (0xb2 + num)) { - int num6 = ( x + rectangle.Width ) - ( 0xb2 + num ); + int num6 = (x + rectangle.Width) - (0xb2 + num); rectangle.Width -= num6; } - if( rectangle.Left >= rectangle.Right ) + if (rectangle.Left >= rectangle.Right) { break; } - if( this.txゲージ != null ) + if (this.txゲージ != null) { Rectangle rectangle1 = rectangle; - rectangle1.X = (int) ( rectangle1.X * Scale.X ); - rectangle1.Y = (int) ( rectangle1.Y * Scale.Y ); - rectangle1.Width = (int) ( rectangle1.Width * Scale.X ); - rectangle1.Height = (int) ( rectangle1.Height * Scale.Y ); + rectangle1.X = (int)(rectangle1.X * Scale.X); + rectangle1.Y = (int)(rectangle1.Y * Scale.Y); + rectangle1.Width = (int)(rectangle1.Width * Scale.X); + rectangle1.Height = (int)(rectangle1.Height * Scale.Y); this.txゲージ.b加算合成 = false; this.txゲージ.t2D描画( @@ -127,28 +127,28 @@ namespace DTXMania num4 -= rectangle.Width; x += rectangle.Width; } - rectangle = new Rectangle( 0, 0x10, 0x40, 0x10 ); - x = ( 0xb2 + num ) - 0x40; - if( x < 0xb2 ) + rectangle = new Rectangle(0, 0x10, 0x40, 0x10); + x = (0xb2 + num) - 0x40; + if (x < 0xb2) { int num7 = 0xb2 - x; rectangle.X += num7; rectangle.Width -= num7; x += num7; } - if( ( x + rectangle.Width ) > ( 0xb2 + num ) ) + if ((x + rectangle.Width) > (0xb2 + num)) { - int num8 = ( x + rectangle.Width ) - ( 0xb2 + num ); + int num8 = (x + rectangle.Width) - (0xb2 + num); rectangle.Width -= num8; } - if( ( rectangle.Left < rectangle.Right ) && ( this.txゲージ != null ) ) + if ((rectangle.Left < rectangle.Right) && (this.txゲージ != null)) { this.txゲージ.b加算合成 = true; - rectangle.X = (int) ( rectangle.X * Scale.X ); - rectangle.Y = (int) ( rectangle.Y * Scale.Y ); - rectangle.Width = (int) ( rectangle.Width * Scale.X ); - rectangle.Height = (int) ( rectangle.Height * Scale.Y ); - this.txゲージ.t2D描画( CDTXMania.app.Device, + rectangle.X = (int)(rectangle.X * Scale.X); + rectangle.Y = (int)(rectangle.Y * Scale.Y); + rectangle.Width = (int)(rectangle.Width * Scale.X); + rectangle.Height = (int)(rectangle.Height * Scale.Y); + this.txゲージ.t2D描画(CDTXMania.app.Device, x * Scale.X, 8 * Scale.Y, rectangle @@ -156,64 +156,64 @@ namespace DTXMania } if (this.bRisky && this.actLVLNFont != null) // #23599 2011.7.30 yyagi Risky残りMiss回数表示 { - CActLVLNFont.EFontColor efc = this.IsDanger( E楽器パート.GUITAR ) ? + CActLVLNFont.EFontColor efc = this.IsDanger(E楽器パート.GUITAR) ? CActLVLNFont.EFontColor.Red : CActLVLNFont.EFontColor.Yellow; actLVLNFont.t文字列描画( - (int) ( 196 * Scale.X ), - (int) ( 6 * Scale.Y ), - nRiskyTimes.ToString(), efc, CActLVLNFont.EFontAlign.Left ); + (int)(196 * Scale.X), + (int)(6 * Scale.Y), + nRiskyTimes.ToString(), efc, CActLVLNFont.EFontAlign.Left); } } #endregion #region [ ベースのゲージ ] - if ( this.db現在のゲージ値.Bass == 1.0 ) + if (this.db現在のゲージ値.Bass == 1.0) { - num9 = (int) ( 128.0 * this.db現在のゲージ値.Bass ); + num9 = (int)(128.0 * this.db現在のゲージ値.Bass); } else { - num9 = (int) ( ( 128.0 * this.db現在のゲージ値.Bass ) + ( 2.0 * Math.Sin( Math.PI * 2 * ( ( (double) this.ct本体振動.n現在の値 ) / 360.0 ) ) ) ); + num9 = (int)((128.0 * this.db現在のゲージ値.Bass) + (2.0 * Math.Sin(Math.PI * 2 * (((double)this.ct本体振動.n現在の値) / 360.0)))); } - if( num9 > 0 ) + if (num9 > 0) { Rectangle rectangle2; int num10 = this.ct本体移動.n現在の値; - int num11 = ( 0x1cf - num9 ) - num10; + int num11 = (0x1cf - num9) - num10; int num12 = num9 + num10; - while( num12 > 0 ) + while (num12 > 0) { - if( this.db現在のゲージ値.Bass == 1.0 ) + if (this.db現在のゲージ値.Bass == 1.0) { - rectangle2 = new Rectangle( 10, 0x30, 0x1b, 0x10 ); + rectangle2 = new Rectangle(10, 0x30, 0x1b, 0x10); } else { - rectangle2 = new Rectangle( 0x25, 0x30, 0x1b, 0x10 ); + rectangle2 = new Rectangle(0x25, 0x30, 0x1b, 0x10); } - if( num11 < ( 0x1cf - num9 ) ) + if (num11 < (0x1cf - num9)) { - int num13 = ( 0x1cf - num9 ) - num11; + int num13 = (0x1cf - num9) - num11; rectangle2.X += num13; rectangle2.Width -= num13; num11 += num13; } - if( ( num11 + rectangle2.Width ) > 0x1cf ) + if ((num11 + rectangle2.Width) > 0x1cf) { - int num14 = ( num11 + rectangle2.Width ) - 0x1cf; + int num14 = (num11 + rectangle2.Width) - 0x1cf; rectangle2.Width -= num14; } - if( rectangle2.Left >= rectangle2.Right ) + if (rectangle2.Left >= rectangle2.Right) { break; } - if( this.txゲージ != null ) + if (this.txゲージ != null) { Rectangle rectangle3 = rectangle2; - rectangle3.X = (int) ( rectangle3.X * Scale.X ); - rectangle3.Y = (int) ( rectangle3.Y * Scale.Y ); - rectangle3.Width = (int) ( rectangle3.Width * Scale.X ); - rectangle3.Height = (int) ( rectangle3.Height * Scale.Y ); + rectangle3.X = (int)(rectangle3.X * Scale.X); + rectangle3.Y = (int)(rectangle3.Y * Scale.Y); + rectangle3.Width = (int)(rectangle3.Width * Scale.X); + rectangle3.Height = (int)(rectangle3.Height * Scale.Y); this.txゲージ.b加算合成 = false; this.txゲージ.t2D描画( CDTXMania.app.Device, @@ -225,20 +225,20 @@ namespace DTXMania num12 -= rectangle2.Width; num11 += rectangle2.Width; } - rectangle2 = new Rectangle( 0, 0x20, 0x40, 0x10 ); + rectangle2 = new Rectangle(0, 0x20, 0x40, 0x10); num11 = 0x1cf - num9; - if( ( num11 + rectangle2.Width ) > 0x1cf ) + if ((num11 + rectangle2.Width) > 0x1cf) { - int num15 = ( num11 + rectangle2.Width ) - 0x1cf; + int num15 = (num11 + rectangle2.Width) - 0x1cf; rectangle2.Width -= num15; } - if( ( rectangle2.Left < rectangle2.Right ) && ( this.txゲージ != null ) ) + if ((rectangle2.Left < rectangle2.Right) && (this.txゲージ != null)) { this.txゲージ.b加算合成 = true; - rectangle2.X = (int) ( rectangle2.X * Scale.X ); - rectangle2.Y = (int) ( rectangle2.Y * Scale.Y ); - rectangle2.Width = (int) ( rectangle2.Width * Scale.X ); - rectangle2.Height = (int) ( rectangle2.Height * Scale.Y ); + rectangle2.X = (int)(rectangle2.X * Scale.X); + rectangle2.Y = (int)(rectangle2.Y * Scale.Y); + rectangle2.Width = (int)(rectangle2.Width * Scale.X); + rectangle2.Height = (int)(rectangle2.Height * Scale.Y); this.txゲージ.t2D描画( CDTXMania.app.Device, num11 * Scale.X, @@ -248,12 +248,12 @@ namespace DTXMania } if (this.bRisky && this.actLVLNFont != null) // #23599 2011.7.30 yyagi Risky残りMiss回数表示 { - CActLVLNFont.EFontColor efc = this.IsDanger( E楽器パート.GUITAR ) ? + CActLVLNFont.EFontColor efc = this.IsDanger(E楽器パート.GUITAR) ? CActLVLNFont.EFontColor.Red : CActLVLNFont.EFontColor.Yellow; actLVLNFont.t文字列描画( - (int) ( 445 * Scale.X ), - (int) ( 6 * Scale.Y ), - nRiskyTimes.ToString(), efc, CActLVLNFont.EFontAlign.Right ); + (int)(445 * Scale.X), + (int)(6 * Scale.Y), + nRiskyTimes.ToString(), efc, CActLVLNFont.EFontAlign.Right); } } #endregion diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏Guitarコンボ.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏Guitarコンボ.cs index 1265b599..703d7c13 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏Guitarコンボ.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏Guitarコンボ.cs @@ -8,34 +8,34 @@ namespace DTXMania { // CAct演奏Combo共通 実装 - protected override void tコンボ表示_ギター( int nCombo値, int nジャンプインデックス ) + protected override void tコンボ表示_ギター(int nCombo値, int nジャンプインデックス) { - int x = (int) ( 230 * Scale.X ); + int x = (int)(230 * Scale.X); int y = CDTXMania.app.ConfigIni.bReverse.Guitar ? 0x103 : 150; - y = (int) ( y * Scale.Y ); + y = (int)(y * Scale.Y); //int y = 演奏判定ライン座標.n判定ラインY座標( E楽器パート.GUITAR, false, CDTXMania.app.ConfigIni.bReverse.Guitar ); //y += CDTXMania.app.ConfigIni.bReverse.Guitar ? -134 : +174; - if ( base.txCOMBOギター != null ) + if (base.txCOMBOギター != null) { base.txCOMBOギター.n透明度 = 0xff; } - base.tコンボ表示_ギター( nCombo値, x, y, nジャンプインデックス ); + base.tコンボ表示_ギター(nCombo値, x, y, nジャンプインデックス); } - protected override void tコンボ表示_ドラム( int nCombo値, int nジャンプインデックス ) + protected override void tコンボ表示_ドラム(int nCombo値, int nジャンプインデックス) { } - protected override void tコンボ表示_ベース( int nCombo値, int nジャンプインデックス ) + protected override void tコンボ表示_ベース(int nCombo値, int nジャンプインデックス) { - int x = (int) ( 410 * Scale.X ); + int x = (int)(410 * Scale.X); int y = CDTXMania.app.ConfigIni.bReverse.Bass ? 0x103 : 150; - y = (int) ( y * Scale.Y ); + y = (int)(y * Scale.Y); //int y = 演奏判定ライン座標.n判定ラインY座標( E楽器パート.BASS, false, CDTXMania.app.ConfigIni.bReverse.Bass ); //y += CDTXMania.app.ConfigIni.bReverse.Bass ? -134 : +174; - if ( base.txCOMBOギター != null ) + if (base.txCOMBOギター != null) { base.txCOMBOギター.n透明度 = 0xff; } - base.tコンボ表示_ベース( nCombo値, x, y, nジャンプインデックス ); + base.tコンボ表示_ベース(nCombo値, x, y, nジャンプインデックス); } } } diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏Guitarスコア.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏Guitarスコア.cs index b7aaf89d..cb2cabdc 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏Guitarスコア.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏Guitarスコア.cs @@ -20,73 +20,73 @@ namespace DTXMania public override unsafe int On進行描画() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - if( base.b初めての進行描画 ) + if (base.b初めての進行描画) { base.n進行用タイマ = CDTXMania.app.Timer.n現在時刻; base.b初めての進行描画 = false; } long num = CDTXMania.app.Timer.n現在時刻; - if( num < base.n進行用タイマ ) + if (num < base.n進行用タイマ) { base.n進行用タイマ = num; } - while( ( num - base.n進行用タイマ ) >= 10 ) + while ((num - base.n進行用タイマ) >= 10) { - for( int j = 0; j < 3; j++ ) + for (int j = 0; j < 3; j++) { - this.n現在表示中のスコア[ j ] += this.nスコアの増分[ j ]; + this.n現在表示中のスコア[j] += this.nスコアの増分[j]; - if( this.n現在表示中のスコア[ j ] > (long) this.n現在の本当のスコア[ j ] ) - this.n現在表示中のスコア[ j ] = (long) this.n現在の本当のスコア[ j ]; + if (this.n現在表示中のスコア[j] > (long)this.n現在の本当のスコア[j]) + this.n現在表示中のスコア[j] = (long)this.n現在の本当のスコア[j]; } base.n進行用タイマ += 10; } - for( int i = 1; i < 3; i++ ) + for (int i = 1; i < 3; i++) { - string str = this.n現在表示中のスコア[ i ].ToString( "0000000000" ); - for( int k = 0; k < 10; k++ ) + string str = this.n現在表示中のスコア[i].ToString("0000000000"); + for (int k = 0; k < 10; k++) { Rectangle rectangle; - char ch = str[ k ]; - if( ch.Equals( ' ' ) ) + char ch = str[k]; + if (ch.Equals(' ')) { rectangle = new Rectangle( 0, 0, - (int) ( 12 * Scale.X ), - (int) ( 0x18 * Scale.Y ) + (int)(12 * Scale.X), + (int)(0x18 * Scale.Y) ); } else { - int num5 = int.Parse( str.Substring( k, 1 ) ); - if( num5 < 5 ) + int num5 = int.Parse(str.Substring(k, 1)); + if (num5 < 5) { rectangle = new Rectangle( - (int) ( num5 * 12 * Scale.X ), + (int)(num5 * 12 * Scale.X), 0, - (int) ( 12 * Scale.X ), - (int) ( 0x18 * Scale.Y ) + (int)(12 * Scale.X), + (int)(0x18 * Scale.Y) ); } else { rectangle = new Rectangle( - (int) ( ( num5 - 5 ) * 12 * Scale.X ), - (int) ( 0x18 * Scale.Y ), - (int) ( 12 * Scale.X ), - (int) ( 0x18 * Scale.Y ) + (int)((num5 - 5) * 12 * Scale.X), + (int)(0x18 * Scale.Y), + (int)(12 * Scale.X), + (int)(0x18 * Scale.Y) ); } } - if( base.txScore != null ) + if (base.txScore != null) { base.txScore.t2D描画( CDTXMania.app.Device, - ( this.ptSCORE[ i - 1 ].X + ( k * 12 ) ) * Scale.X, - this.ptSCORE[ i - 1 ].Y * Scale.Y, + (this.ptSCORE[i - 1].X + (k * 12)) * Scale.X, + this.ptSCORE[i - 1].Y * Scale.Y, rectangle ); } @@ -101,7 +101,7 @@ namespace DTXMania #region [ private ] //----------------- - private readonly Point[] ptSCORE = new Point[] { new Point( 0x1f, 0x1a9 ), new Point( 0x1e9, 0x1a9 ) }; + private readonly Point[] ptSCORE = new Point[] { new Point(0x1f, 0x1a9), new Point(0x1e9, 0x1a9) }; //----------------- #endregion } diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏Guitarステータスパネル.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏Guitarステータスパネル.cs index 579dd059..5f805b1f 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏Guitarステータスパネル.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏Guitarステータスパネル.cs @@ -11,9 +11,9 @@ namespace DTXMania { // コンストラクタ -// public CAct演奏Guitarステータスパネル() -// { -// } + // public CAct演奏Guitarステータスパネル() + // { + // } // メソッド @@ -48,45 +48,45 @@ namespace DTXMania //} public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - this.tx左パネル = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlay status panels left.png" ) ); - this.tx右パネル = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlay status panels right.png" ) ); + this.tx左パネル = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenPlay status panels left.png")); + this.tx右パネル = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenPlay status panels right.png")); base.OnManagedリソースの作成(); } } public override void OnManagedリソースの解放() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.tx左パネル ); - TextureFactory.tテクスチャの解放( ref this.tx右パネル ); + TextureFactory.tテクスチャの解放(ref this.tx左パネル); + TextureFactory.tテクスチャの解放(ref this.tx右パネル); base.OnManagedリソースの解放(); } } public override int On進行描画() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - if( this.tx左パネル != null ) + if (this.tx左パネル != null) { this.tx左パネル.t2D描画( CDTXMania.app.Device, 3 * Scale.X, 0x143 * Scale.Y, new Rectangle( - (int) ( this.nStatus * 15 * Scale.X ), - (int) ( 0xb7 * Scale.Y ), - (int) ( 15 * Scale.X ), - (int) ( 0x49 * Scale.Y ) + (int)(this.nStatus * 15 * Scale.X), + (int)(0xb7 * Scale.Y), + (int)(15 * Scale.X), + (int)(0x49 * Scale.Y) ) ); int guitar = CDTXMania.app.ConfigIni.n譜面スクロール速度.Guitar; - if( guitar < 0 ) + if (guitar < 0) { guitar = 0; } - if( guitar > 15 ) + if (guitar > 15) { guitar = 15; } @@ -95,32 +95,32 @@ namespace DTXMania 3 * Scale.X, 0x35 * Scale.Y, new Rectangle( - (int) ( guitar * 15 * Scale.X ), + (int)(guitar * 15 * Scale.X), 0, - (int) ( 15 * Scale.X ), - (int) ( 0xac * Scale.Y ) + (int)(15 * Scale.X), + (int)(0xac * Scale.Y) ) ); } - if( this.tx右パネル != null ) + if (this.tx右パネル != null) { this.tx右パネル.t2D描画( CDTXMania.app.Device, 0x26e * Scale.X, 0x143 * Scale.Y, new Rectangle( - (int) ( this.nStatus * 15 * Scale.X ), - (int) ( 0xb7 * Scale.Y ), - (int) ( 15 * Scale.X ), - (int) ( 0x49 * Scale.Y ) + (int)(this.nStatus * 15 * Scale.X), + (int)(0xb7 * Scale.Y), + (int)(15 * Scale.X), + (int)(0x49 * Scale.Y) ) ); int bass = CDTXMania.app.ConfigIni.n譜面スクロール速度.Bass; - if( bass < 0 ) + if (bass < 0) { bass = 0; } - if( bass > 15 ) + if (bass > 15) { bass = 15; } @@ -129,10 +129,10 @@ namespace DTXMania 0x26e * Scale.X, 0x35 * Scale.Y, new Rectangle( - (int) ( bass * 15 * Scale.X ), + (int)(bass * 15 * Scale.X), 0, - (int) ( 15 * Scale.X ), - (int) ( 0xac * Scale.Y ) + (int)(15 * Scale.X), + (int)(0xac * Scale.Y) ) ); } diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏Guitarチップファイア.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏Guitarチップファイア.cs index 6e497c64..904c9856 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏Guitarチップファイア.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏Guitarチップファイア.cs @@ -13,30 +13,30 @@ namespace DTXMania { base.b活性化してない = true; } - - + + // メソッド - public override void Start( int nLane, C演奏判定ライン座標共通 演奏判定ライン座標 ) + public override void Start(int nLane, C演奏判定ライン座標共通 演奏判定ライン座標) { - if( ( nLane < 0 ) && ( nLane > 5 ) ) + if ((nLane < 0) && (nLane > 5)) { throw new IndexOutOfRangeException(); } - E楽器パート e楽器パート = ( nLane < 3 ) ? E楽器パート.GUITAR : E楽器パート.BASS; + E楽器パート e楽器パート = (nLane < 3) ? E楽器パート.GUITAR : E楽器パート.BASS; int index = nLane; - if( CDTXMania.app.ConfigIni.bLeft[ (int) e楽器パート ] ) + if (CDTXMania.app.ConfigIni.bLeft[(int)e楽器パート]) { - index = ( ( index / 3 ) * 3 ) + ( 2 - ( index % 3 ) ); + index = ((index / 3) * 3) + (2 - (index % 3)); } - int x = (int) ( this.pt中央[ index ].X * Scale.X ); + int x = (int)(this.pt中央[index].X * Scale.X); //int y = this.pt中央[ index ].Y; - int y = 演奏判定ライン座標.n判定ラインY座標( e楽器パート, true, CDTXMania.app.ConfigIni.bReverse[ (int) e楽器パート ] ); + int y = 演奏判定ライン座標.n判定ラインY座標(e楽器パート, true, CDTXMania.app.ConfigIni.bReverse[(int)e楽器パート]); //if ( CDTXMania.app.ConfigIni.bReverse[ (int)e楽器パート ] ) //{ // y = 369; //} - base.Start( nLane, x, y, 演奏判定ライン座標 ); + base.Start(nLane, x, y, 演奏判定ライン座標); } diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏GuitarレーンフラッシュGB.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏GuitarレーンフラッシュGB.cs index 340d9ce8..0ab0dab1 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏GuitarレーンフラッシュGB.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏GuitarレーンフラッシュGB.cs @@ -20,19 +20,19 @@ namespace DTXMania public override int On進行描画() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - for( int i = 0; i < 6; i++ ) + for (int i = 0; i < 6; i++) { - if( !base.ct進行[ i ].b停止中 ) + if (!base.ct進行[i].b停止中) { - E楽器パート e楽器パート = ( i < 3 ) ? E楽器パート.GUITAR : E楽器パート.BASS; - CTextureAf texture = CDTXMania.app.ConfigIni.bReverse[ (int) e楽器パート ] ? base.txFlush[ ( i % 3 ) + 3 ] : base.txFlush[ i % 3 ]; - int num2 = CDTXMania.app.ConfigIni.bLeft[ (int) e楽器パート ] ? 1 : 0; + E楽器パート e楽器パート = (i < 3) ? E楽器パート.GUITAR : E楽器パート.BASS; + CTextureAf texture = CDTXMania.app.ConfigIni.bReverse[(int)e楽器パート] ? base.txFlush[(i % 3) + 3] : base.txFlush[i % 3]; + int num2 = CDTXMania.app.ConfigIni.bLeft[(int)e楽器パート] ? 1 : 0; { - int x = ( ( ( i < 3 ) ? 0x1a : 480 ) + this.nRGBのX座標[ num2, i ] ) + ( ( 0x10 * base.ct進行[ i ].n現在の値 ) / 100 ); - int y = CDTXMania.app.ConfigIni.bReverse[ (int) e楽器パート ] ? 0x37 : 0; - if( texture != null ) + int x = (((i < 3) ? 0x1a : 480) + this.nRGBのX座標[num2, i]) + ((0x10 * base.ct進行[i].n現在の値) / 100); + int y = CDTXMania.app.ConfigIni.bReverse[(int)e楽器パート] ? 0x37 : 0; + if (texture != null) { texture.t2D描画( CDTXMania.app.Device, @@ -41,29 +41,29 @@ namespace DTXMania new Rectangle( 0, 0, - (int) ( ( ( 0x20 * ( 100 - base.ct進行[ i ].n現在の値 ) ) / 100 ) * Scale.X ), - (int) ( 0x76 * 3 * Scale.Y ) + (int)(((0x20 * (100 - base.ct進行[i].n現在の値)) / 100) * Scale.X), + (int)(0x76 * 3 * Scale.Y) ) ); } } - base.ct進行[ i ].t進行(); - if( base.ct進行[ i ].b終了値に達した ) + base.ct進行[i].t進行(); + if (base.ct進行[i].b終了値に達した) { - base.ct進行[ i ].t停止(); + base.ct進行[i].t停止(); } } } } return 0; } - + // その他 #region [ private ] //----------------- - private readonly int[,] nRGBのX座標 = new int[ , ] { { 0, 0x24, 0x48, 0, 0x24, 0x48 }, { 0x48, 0x24, 0, 0x48, 0x24, 0 } }; + private readonly int[,] nRGBのX座標 = new int[,] { { 0, 0x24, 0x48, 0, 0x24, 0x48 }, { 0x48, 0x24, 0, 0x48, 0x24, 0 } }; //----------------- #endregion } diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏Guitar判定文字列.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏Guitar判定文字列.cs index 6a5537db..9a01e1a5 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏Guitar判定文字列.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏Guitar判定文字列.cs @@ -12,9 +12,9 @@ namespace DTXMania public CAct演奏Guitar判定文字列() { - this.stレーンサイズ = new STレーンサイズ[ 12 ]; + this.stレーンサイズ = new STレーンサイズ[12]; STレーンサイズ stレーンサイズ = new STレーンサイズ(); - int[ , ] sizeXW = new int[ , ] { + int[,] sizeXW = new int[,] { { 0x24, 0x24 }, { 0x4d, 30 }, { 0x6f, 30 }, @@ -28,153 +28,153 @@ namespace DTXMania { 0x1a, 0x6f }, // 最後2つ(Gt, Bs)がドラムスと異なる { 480, 0x6f } // }; - for ( int i = 0; i < 12; i++ ) + for (int i = 0; i < 12; i++) { - this.stレーンサイズ[ i ] = new STレーンサイズ(); - this.stレーンサイズ[ i ].x = sizeXW[ i, 0 ]; - this.stレーンサイズ[ i ].w = sizeXW[ i, 1 ]; + this.stレーンサイズ[i] = new STレーンサイズ(); + this.stレーンサイズ[i].x = sizeXW[i, 0]; + this.stレーンサイズ[i].w = sizeXW[i, 1]; } - base.b活性化してない = true; + base.b活性化してない = true; } // CActivity 実装(共通クラスからの差分のみ) public override int On進行描画() { - throw new InvalidOperationException( "t進行描画(C演奏判定ライン座標共通 演奏判定ライン共通 ) のほうを使用してください。" ); + throw new InvalidOperationException("t進行描画(C演奏判定ライン座標共通 演奏判定ライン共通 ) のほうを使用してください。"); } - public override int t進行描画( C演奏判定ライン座標共通 演奏判定ライン座標 ) + public override int t進行描画(C演奏判定ライン座標共通 演奏判定ライン座標) { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - for( int i = 0; i < 12; i++ ) + for (int i = 0; i < 12; i++) { - if( !base.st状態[ i ].ct進行.b停止中 ) + if (!base.st状態[i].ct進行.b停止中) { - base.st状態[ i ].ct進行.t進行(); - if( base.st状態[ i ].ct進行.b終了値に達した ) + base.st状態[i].ct進行.t進行(); + if (base.st状態[i].ct進行.b終了値に達した) { - base.st状態[ i ].ct進行.t停止(); + base.st状態[i].ct進行.t停止(); } - int num2 = base.st状態[ i ].ct進行.n現在の値; - if( ( base.st状態[ i ].judge != E判定.Miss ) && ( base.st状態[ i ].judge != E判定.Bad ) ) + int num2 = base.st状態[i].ct進行.n現在の値; + if ((base.st状態[i].judge != E判定.Miss) && (base.st状態[i].judge != E判定.Bad)) { - if( num2 < 50 ) + if (num2 < 50) { - base.st状態[ i ].fX方向拡大率 = 1f + ( 1f * ( 1f - ( ( (float) num2 ) / 50f ) ) ); - base.st状態[ i ].fY方向拡大率 = ( (float) num2 ) / 50f; - base.st状態[ i ].n相対X座標 = 0; - base.st状態[ i ].n相対Y座標 = 0; - base.st状態[ i ].n透明度 = 0xff; + base.st状態[i].fX方向拡大率 = 1f + (1f * (1f - (((float)num2) / 50f))); + base.st状態[i].fY方向拡大率 = ((float)num2) / 50f; + base.st状態[i].n相対X座標 = 0; + base.st状態[i].n相対Y座標 = 0; + base.st状態[i].n透明度 = 0xff; } - else if( num2 < 130 ) + else if (num2 < 130) { - base.st状態[ i ].fX方向拡大率 = 1f; - base.st状態[ i ].fY方向拡大率 = 1f; - base.st状態[ i ].n相対X座標 = 0; - base.st状態[ i ].n相対Y座標 = ( ( num2 % 6 ) == 0 ) ? ( CDTXMania.app.Random.Next( 6 ) - 3 ) : base.st状態[ i ].n相対Y座標; - base.st状態[ i ].n透明度 = 0xff; + base.st状態[i].fX方向拡大率 = 1f; + base.st状態[i].fY方向拡大率 = 1f; + base.st状態[i].n相対X座標 = 0; + base.st状態[i].n相対Y座標 = ((num2 % 6) == 0) ? (CDTXMania.app.Random.Next(6) - 3) : base.st状態[i].n相対Y座標; + base.st状態[i].n透明度 = 0xff; } - else if( num2 >= 240 ) + else if (num2 >= 240) { - base.st状態[ i ].fX方向拡大率 = 1f; - base.st状態[ i ].fY方向拡大率 = 1f - ( ( 1f * ( num2 - 240 ) ) / 60f ); - base.st状態[ i ].n相対X座標 = 0; - base.st状態[ i ].n相対Y座標 = 0; - base.st状態[ i ].n透明度 = 0xff; + base.st状態[i].fX方向拡大率 = 1f; + base.st状態[i].fY方向拡大率 = 1f - ((1f * (num2 - 240)) / 60f); + base.st状態[i].n相対X座標 = 0; + base.st状態[i].n相対Y座標 = 0; + base.st状態[i].n透明度 = 0xff; } else { - base.st状態[ i ].fX方向拡大率 = 1f; - base.st状態[ i ].fY方向拡大率 = 1f; - base.st状態[ i ].n相対X座標 = 0; - base.st状態[ i ].n相対Y座標 = 0; - base.st状態[ i ].n透明度 = 0xff; + base.st状態[i].fX方向拡大率 = 1f; + base.st状態[i].fY方向拡大率 = 1f; + base.st状態[i].n相対X座標 = 0; + base.st状態[i].n相対Y座標 = 0; + base.st状態[i].n透明度 = 0xff; } } - else if( num2 < 50 ) + else if (num2 < 50) { - base.st状態[ i ].fX方向拡大率 = 1f; - base.st状態[ i ].fY方向拡大率 = ( (float) num2 ) / 50f; - base.st状態[ i ].n相対X座標 = 0; - base.st状態[ i ].n相対Y座標 = 0; - base.st状態[ i ].n透明度 = 0xff; + base.st状態[i].fX方向拡大率 = 1f; + base.st状態[i].fY方向拡大率 = ((float)num2) / 50f; + base.st状態[i].n相対X座標 = 0; + base.st状態[i].n相対Y座標 = 0; + base.st状態[i].n透明度 = 0xff; } - else if( num2 >= 200 ) + else if (num2 >= 200) { - base.st状態[ i ].fX方向拡大率 = 1f - ( ( (float) ( num2 - 200 ) ) / 100f ); - base.st状態[ i ].fY方向拡大率 = 1f - ( ( (float) ( num2 - 200 ) ) / 100f ); - base.st状態[ i ].n相対X座標 = 0; - base.st状態[ i ].n相対Y座標 = 0; - base.st状態[ i ].n透明度 = 0xff; + base.st状態[i].fX方向拡大率 = 1f - (((float)(num2 - 200)) / 100f); + base.st状態[i].fY方向拡大率 = 1f - (((float)(num2 - 200)) / 100f); + base.st状態[i].n相対X座標 = 0; + base.st状態[i].n相対Y座標 = 0; + base.st状態[i].n透明度 = 0xff; } else { - base.st状態[ i ].fX方向拡大率 = 1f; - base.st状態[ i ].fY方向拡大率 = 1f; - base.st状態[ i ].n相対X座標 = 0; - base.st状態[ i ].n相対Y座標 = 0; - base.st状態[ i ].n透明度 = 0xff; + base.st状態[i].fX方向拡大率 = 1f; + base.st状態[i].fY方向拡大率 = 1f; + base.st状態[i].n相対X座標 = 0; + base.st状態[i].n相対Y座標 = 0; + base.st状態[i].n透明度 = 0xff; } } } - for( int j = 0; j < 12; j++ ) + for (int j = 0; j < 12; j++) { - if( !base.st状態[ j ].ct進行.b停止中 ) + if (!base.st状態[j].ct進行.b停止中) { - int index = base.st判定文字列[ (int) base.st状態[ j ].judge ].n画像番号; + int index = base.st判定文字列[(int)base.st状態[j].judge].n画像番号; int baseX = 0; int baseY = 0; - if( j >= 8 ) + if (j >= 8) { - if( j == 11 ) // Bass + if (j == 11) // Bass { - if( ( (E判定文字表示位置) CDTXMania.app.ConfigIni.判定文字表示位置.Bass ) == E判定文字表示位置.表示OFF ) + if (((E判定文字表示位置)CDTXMania.app.ConfigIni.判定文字表示位置.Bass) == E判定文字表示位置.表示OFF) { continue; } int yB; - switch ( CDTXMania.app.ConfigIni.判定文字表示位置.Bass ) + switch (CDTXMania.app.ConfigIni.判定文字表示位置.Bass) { case E判定文字表示位置.コンボ下: baseX = 0x163; baseY = CDTXMania.app.ConfigIni.bReverse.Bass ? 0x12b : 190; break; case E判定文字表示位置.レーン上: - baseX = this.stレーンサイズ[ j ].x; - yB = 演奏判定ライン座標.n判定ラインY座標( E楽器パート.BASS, true, CDTXMania.app.ConfigIni.bReverse.Bass ); + baseX = this.stレーンサイズ[j].x; + yB = 演奏判定ライン座標.n判定ラインY座標(E楽器パート.BASS, true, CDTXMania.app.ConfigIni.bReverse.Bass); baseY = CDTXMania.app.ConfigIni.bReverse.Bass ? yB - 95 - 52 + 10 : yB + 95 + 52; //baseY = CDTXMania.app.ConfigIni.bReverse.Bass ? 0x12b : 190; break; case E判定文字表示位置.判定ライン上: - baseX = this.stレーンサイズ[ j ].x; - yB = 演奏判定ライン座標.n判定ラインY座標( E楽器パート.BASS, true, CDTXMania.app.ConfigIni.bReverse.Bass ); + baseX = this.stレーンサイズ[j].x; + yB = 演奏判定ライン座標.n判定ラインY座標(E楽器パート.BASS, true, CDTXMania.app.ConfigIni.bReverse.Bass); baseY = CDTXMania.app.ConfigIni.bReverse.Bass ? yB + 30 : yB - 20; break; } } - else if( j == 10 ) // Guitar + else if (j == 10) // Guitar { - if( ( (E判定文字表示位置) CDTXMania.app.ConfigIni.判定文字表示位置.Guitar ) == E判定文字表示位置.表示OFF ) + if (((E判定文字表示位置)CDTXMania.app.ConfigIni.判定文字表示位置.Guitar) == E判定文字表示位置.表示OFF) { continue; } int yG; - switch ( CDTXMania.app.ConfigIni.判定文字表示位置.Guitar ) + switch (CDTXMania.app.ConfigIni.判定文字表示位置.Guitar) { case E判定文字表示位置.コンボ下: baseX = 0xaf; baseY = CDTXMania.app.ConfigIni.bReverse.Guitar ? 0x12b : 190; break; case E判定文字表示位置.レーン上: - baseX = this.stレーンサイズ[ j ].x; - yG = 演奏判定ライン座標.n判定ラインY座標( E楽器パート.GUITAR, true, CDTXMania.app.ConfigIni.bReverse.Guitar ); + baseX = this.stレーンサイズ[j].x; + yG = 演奏判定ライン座標.n判定ラインY座標(E楽器パート.GUITAR, true, CDTXMania.app.ConfigIni.bReverse.Guitar); baseY = CDTXMania.app.ConfigIni.bReverse.Guitar ? yG - 95 - 52 + 10 : yG + 95 + 52; //baseY = CDTXMania.app.ConfigIni.bReverse.Guitar ? 0x12b : 190; break; case E判定文字表示位置.判定ライン上: - baseX = this.stレーンサイズ[ j ].x; - yG = 演奏判定ライン座標.n判定ラインY座標( E楽器パート.GUITAR, true, CDTXMania.app.ConfigIni.bReverse.Guitar ); + baseX = this.stレーンサイズ[j].x; + yG = 演奏判定ライン座標.n判定ラインY座標(E楽器パート.GUITAR, true, CDTXMania.app.ConfigIni.bReverse.Guitar); baseY = CDTXMania.app.ConfigIni.bReverse.Guitar ? yG + 30 : yG - 20; break; } @@ -183,39 +183,39 @@ namespace DTXMania //int x = xc - ( (int) ( ( ( 128f * base.st状態[ j ].fX方向拡大率 ) * 0.8 ) / 2.0 ) ); //int y = ( baseY + base.st状態[ j ].n相対Y座標 ) - ( (int) ( ( ( 43f * base.st状態[ j ].fY方向拡大率 ) * 0.8 ) / 2.0 ) ); - int xc = (int) ( ( ( ( baseX + base.st状態[ j ].n相対X座標 ) + ( this.stレーンサイズ[ j ].w / 2 ) ) ) * Scale.X ); - int x = xc - (int) ( ( ( 256f / 2 ) * base.st状態[ j ].fX方向拡大率 ) * 0.8 ); - int y = (int) ( ( baseY + base.st状態[ j ].n相対Y座標 ) * Scale.Y ) - ( (int) ( ( ( ( 256f / 3 ) * base.st状態[ j ].fY方向拡大率 ) * 0.8 ) / 2.0 ) ); + int xc = (int)((((baseX + base.st状態[j].n相対X座標) + (this.stレーンサイズ[j].w / 2))) * Scale.X); + int x = xc - (int)(((256f / 2) * base.st状態[j].fX方向拡大率) * 0.8); + int y = (int)((baseY + base.st状態[j].n相対Y座標) * Scale.Y) - ((int)((((256f / 3) * base.st状態[j].fY方向拡大率) * 0.8) / 2.0)); - if( base.tx判定文字列[ index ] != null ) + if (base.tx判定文字列[index] != null) { - base.tx判定文字列[ index ].n透明度 = base.st状態[ j ].n透明度; - base.tx判定文字列[ index ].vc拡大縮小倍率 = new Vector3( (float) ( base.st状態[ j ].fX方向拡大率 * 0.8 ), (float) ( base.st状態[ j ].fY方向拡大率 * 0.8 ), 1f ); - base.tx判定文字列[ index ].t2D描画( CDTXMania.app.Device, x, y, base.st判定文字列[ (int) base.st状態[ j ].judge ].rc ); + base.tx判定文字列[index].n透明度 = base.st状態[j].n透明度; + base.tx判定文字列[index].vc拡大縮小倍率 = new Vector3((float)(base.st状態[j].fX方向拡大率 * 0.8), (float)(base.st状態[j].fY方向拡大率 * 0.8), 1f); + base.tx判定文字列[index].t2D描画(CDTXMania.app.Device, x, y, base.st判定文字列[(int)base.st状態[j].judge].rc); #region [ #25370 2011.6.3 yyagi ShowLag support ] - if ( base.nShowLagType == (int) EShowLagType.ON || - ( ( base.nShowLagType == (int) EShowLagType.GREAT_POOR ) && ( base.st状態[ j ].judge != E判定.Perfect ) ) ) + if (base.nShowLagType == (int)EShowLagType.ON || + ((base.nShowLagType == (int)EShowLagType.GREAT_POOR) && (base.st状態[j].judge != E判定.Perfect))) { - if ( base.st状態[ j ].judge != E判定.Auto && base.txlag数値 != null ) // #25370 2011.2.1 yyagi + if (base.st状態[j].judge != E判定.Auto && base.txlag数値 != null) // #25370 2011.2.1 yyagi { bool minus = false; int offsetX = 0; - string strDispLag = base.st状態[ j ].nLag.ToString(); - if ( st状態[ j ].nLag < 0 ) + string strDispLag = base.st状態[j].nLag.ToString(); + if (st状態[j].nLag < 0) { minus = true; } - x = xc - (int) ( strDispLag.Length * 15 / 2 * Scale.X ); - for ( int i = 0; i < strDispLag.Length; i++ ) + x = xc - (int)(strDispLag.Length * 15 / 2 * Scale.X); + for (int i = 0; i < strDispLag.Length; i++) { - int p = ( strDispLag[ i ] == '-' ) ? 11 : (int) ( strDispLag[ i ] - '0' ); //int.Parse(strDispLag[i]); + int p = (strDispLag[i] == '-') ? 11 : (int)(strDispLag[i] - '0'); //int.Parse(strDispLag[i]); p += minus ? 0 : 12; // change color if it is minus value base.txlag数値.t2D描画( CDTXMania.app.Device, x + offsetX * Scale.X, y + 35 * Scale.Y, - base.stLag数値[ p ].rc + base.stLag数値[p].rc ); offsetX += 12; } @@ -223,7 +223,7 @@ namespace DTXMania } #endregion } - // Label_06B7: ; + // Label_06B7: ; } } } @@ -236,7 +236,7 @@ namespace DTXMania #region [ private ] //----------------- - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] private struct STレーンサイズ { public int x; diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏DrumsDanger.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏DrumsDanger.cs index 81b065d7..21fa05ee 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏DrumsDanger.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏DrumsDanger.cs @@ -34,23 +34,23 @@ namespace DTXMania //} public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - this.txDANGER = TextureFactory.tテクスチャの生成Af( CSkin.Path( @"Graphics\ScreenPlayDrums danger.png" ), false ); + this.txDANGER = TextureFactory.tテクスチャの生成Af(CSkin.Path(@"Graphics\ScreenPlayDrums danger.png"), false); base.OnManagedリソースの作成(); } } public override void OnManagedリソースの解放() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.txDANGER ); + TextureFactory.tテクスチャの解放(ref this.txDANGER); base.OnManagedリソースの解放(); } } public override int On進行描画() { - throw new InvalidOperationException( "t進行描画(bool)のほうを使用してください。" ); + throw new InvalidOperationException("t進行描画(bool)のほうを使用してください。"); } /// /// ドラム画面のDANGER描画 @@ -59,44 +59,44 @@ namespace DTXMania /// Guitarのゲージ(未使用) /// Bassのゲージ(未使用) /// - public override int t進行描画( bool bIsDangerDrums, bool bIsDangerGuitar, bool bIsDangerBass ) + public override int t進行描画(bool bIsDangerDrums, bool bIsDangerGuitar, bool bIsDangerBass) { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - if( !bIsDangerDrums ) + if (!bIsDangerDrums) { this.bDanger中[(int)E楽器パート.DRUMS] = false; return 0; } - if( !this.bDanger中[(int)E楽器パート.DRUMS] ) + if (!this.bDanger中[(int)E楽器パート.DRUMS]) { - this.ct移動用 = new CCounter( 0, 0x7f, 7, CDTXMania.app.Timer ); - this.ct透明度用 = new CCounter( 0, 0x167, 4, CDTXMania.app.Timer ); + this.ct移動用 = new CCounter(0, 0x7f, 7, CDTXMania.app.Timer); + this.ct透明度用 = new CCounter(0, 0x167, 4, CDTXMania.app.Timer); } this.bDanger中[(int)E楽器パート.DRUMS] = bIsDangerDrums; this.ct移動用.t進行Loop(); this.ct透明度用.t進行Loop(); - if( !this.bDanger中[(int)E楽器パート.DRUMS] ) + if (!this.bDanger中[(int)E楽器パート.DRUMS]) { return 0; } int num = this.ct透明度用.n現在の値; - if( this.txDANGER != null ) + if (this.txDANGER != null) { - this.txDANGER.n透明度 = 60 + ( ( num < 180 ) ? num : ( 360 - num ) ); + this.txDANGER.n透明度 = 60 + ((num < 180) ? num : (360 - num)); } num = this.ct移動用.n現在の値; - int num2 = CDTXMania.app.ConfigIni.bReverse.Drums ? ( 0x7f - num ) : num; - float[,] n基準X座標 = new float[,] { { 38, 298 }, { 211f, 405.5f } }; - for( int i = -1; i < 4; i++ ) + int num2 = CDTXMania.app.ConfigIni.bReverse.Drums ? (0x7f - num) : num; + float[,] n基準X座標 = new float[,] { { 38, 298 }, { 211f, 405.5f } }; + for (int i = -1; i < 4; i++) { - if( this.txDANGER != null ) + if (this.txDANGER != null) { - float d = ( CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ) ? 1.0f : 0.75f; - this.txDANGER.vc拡大縮小倍率 = new Vector3( d, d, d ); - this.txDANGER.t2D描画( CDTXMania.app.Device, n基準X座標[( CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ? 0 : 1 ), 0] * Scale.X, ( ( i * 0x80 ) + num2 ) * Scale.Y ); + float d = (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left) ? 1.0f : 0.75f; + this.txDANGER.vc拡大縮小倍率 = new Vector3(d, d, d); + this.txDANGER.t2D描画(CDTXMania.app.Device, n基準X座標[(CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ? 0 : 1), 0] * Scale.X, ((i * 0x80) + num2) * Scale.Y); //this.txDANGER.t2D描画( CDTXMania.app.Device, 0x26 * Scale.X, ( ( ( i * 0x80 ) + num2 ) + 0x40 ) * Scale.Y, this.rc領域[ 1 ] ); - this.txDANGER.t2D描画( CDTXMania.app.Device, n基準X座標[( CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ? 0 : 1 ), 1] * Scale.X, ( ( i * 0x80 ) + num2 ) * Scale.Y ); + this.txDANGER.t2D描画(CDTXMania.app.Device, n基準X座標[(CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ? 0 : 1), 1] * Scale.X, ((i * 0x80) + num2) * Scale.Y); //this.txDANGER.t2D描画( CDTXMania.app.Device, 0x12a * Scale.X, ( ( ( i * 0x80 ) + num2 ) + 0x40 ) * Scale.Y, this.rc領域[ 1 ] ); } } @@ -112,8 +112,8 @@ namespace DTXMania //private bool bDanger中; //private CCounter ct移動用; //private CCounter ct透明度用; -// private const int n右位置 = 0x12a; -// private const int n左位置 = 0x26; + // private const int n右位置 = 0x12a; + // private const int n左位置 = 0x26; //private readonly Rectangle[] rc領域 = new Rectangle[] { // new Rectangle( 0, 0, (int)(0x20 * Scale.X), (int)(0x40 * Scale.Y) ), // new Rectangle( (int)(0x20 * Scale.X), (int)(0 * Scale.Y), (int)(0x20 * Scale.X), (int)(0x40 * Scale.Y) ) diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏DrumsRGB.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏DrumsRGB.cs index 184f2080..eae3a332 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏DrumsRGB.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏DrumsRGB.cs @@ -11,77 +11,77 @@ namespace DTXMania public override int On進行描画() { - throw new InvalidOperationException( "t進行描画(C演奏判定ライン座標共通 演奏判定ライン共通 ) のほうを使用してください。" ); + throw new InvalidOperationException("t進行描画(C演奏判定ライン座標共通 演奏判定ライン共通 ) のほうを使用してください。"); } - public override int t進行描画( C演奏判定ライン座標共通 演奏判定ライン座標 ) + public override int t進行描画(C演奏判定ライン座標共通 演奏判定ライン座標) { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - if( !CDTXMania.app.ConfigIni.bGuitar有効 ) + if (!CDTXMania.app.ConfigIni.bGuitar有効) { return 0; } - if( CDTXMania.app.DTX.bチップがある.Guitar ) + if (CDTXMania.app.DTX.bチップがある.Guitar) { - int x = ( CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ) ? 1527 : 1456; - for( int i = 0; i < 3; i++ ) + int x = (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left) ? 1527 : 1456; + for (int i = 0; i < 3; i++) { - int index = CDTXMania.app.ConfigIni.bLeft.Guitar ? ( 2 - i ) : i; + int index = CDTXMania.app.ConfigIni.bLeft.Guitar ? (2 - i) : i; Rectangle rc = new Rectangle( index * 72, 0, 72, 72 ); - if ( base.b押下状態[ index ] ) + if (base.b押下状態[index]) { rc.Y += 72; } - if( base.txRGB != null ) + if (base.txRGB != null) { // int y = 演奏判定ライン座標.n判定ラインY座標( E楽器パート.GUITAR, true, CDTXMania.app.ConfigIni.bReverse.Guitar, false, false ); //base.txRGB.t2D描画( CDTXMania.app.Device, 0x1fd + ( j * 0x1a ), 0x39, rectangle ); - int y = 演奏判定ライン座標.n演奏RGBボタンY座標( E楽器パート.GUITAR, false, CDTXMania.app.ConfigIni.bReverse.Guitar ); + int y = 演奏判定ライン座標.n演奏RGBボタンY座標(E楽器パート.GUITAR, false, CDTXMania.app.ConfigIni.bReverse.Guitar); base.txRGB.t2D描画( CDTXMania.app.Device, - x + ( i * 26 * 3 ), + x + (i * 26 * 3), y, rc ); } } } - if( CDTXMania.app.DTX.bチップがある.Bass ) + if (CDTXMania.app.DTX.bチップがある.Bass) { - for( int i = 0; i < 3; i++ ) + for (int i = 0; i < 3; i++) { - int x = ( CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ) ? 1200 : 206; - int index = CDTXMania.app.ConfigIni.bLeft.Bass ? ( 2 - i ) : i; + int x = (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left) ? 1200 : 206; + int index = CDTXMania.app.ConfigIni.bLeft.Bass ? (2 - i) : i; Rectangle rc = new Rectangle( index * 72, 0, 72, 72 ); - if( base.b押下状態[ index + 3 ] ) + if (base.b押下状態[index + 3]) { rc.Y += 72; } - if( base.txRGB != null ) + if (base.txRGB != null) { - int y = 演奏判定ライン座標.n演奏RGBボタンY座標( E楽器パート.BASS, false, CDTXMania.app.ConfigIni.bReverse.Bass ); + int y = 演奏判定ライン座標.n演奏RGBボタンY座標(E楽器パート.BASS, false, CDTXMania.app.ConfigIni.bReverse.Bass); base.txRGB.t2D描画( CDTXMania.app.Device, - x + ( i * 26 * 3 ), + x + (i * 26 * 3), y, rc ); } } } - for( int i = 0; i < 6; i++ ) + for (int i = 0; i < 6; i++) { - base.b押下状態[ i ] = false; + base.b押下状態[i] = false; } } return 0; diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏DrumsWailingBonus.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏DrumsWailingBonus.cs index 337e8546..58e1c358 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏DrumsWailingBonus.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏DrumsWailingBonus.cs @@ -14,29 +14,29 @@ namespace DTXMania { base.b活性化してない = true; } - - + + // メソッド //public override void Start( E楽器パート part ) //{ // this.Start( part, null ); //} - public override void Start( E楽器パート part, CChip r歓声Chip ) + public override void Start(E楽器パート part, CChip r歓声Chip) { - if( ( part == E楽器パート.GUITAR ) || ( part == E楽器パート.BASS ) ) + if ((part == E楽器パート.GUITAR) || (part == E楽器パート.BASS)) { - int num = (int) part; - for( int i = 0; i < 4; i++ ) + int num = (int)part; + for (int i = 0; i < 4; i++) { - if( this.ct進行用[ num, i ].b停止中 ) + if (this.ct進行用[num, i].b停止中) { - this.ct進行用[ num, i ] = new CCounter( 0, 300, 2, CDTXMania.app.Timer ); - if( CDTXMania.app.ConfigIni.b歓声を発声する ) + this.ct進行用[num, i] = new CCounter(0, 300, 2, CDTXMania.app.Timer); + if (CDTXMania.app.ConfigIni.b歓声を発声する) { - if( r歓声Chip != null ) + if (r歓声Chip != null) { - CDTXMania.app.DTX.tチップの再生( r歓声Chip, CSound管理.rc演奏用タイマ.nシステム時刻, (int) Eレーン.BGM, CDTXMania.app.DTX.nモニタを考慮した音量( E楽器パート.UNKNOWN ) ); + CDTXMania.app.DTX.tチップの再生(r歓声Chip, CSound管理.rc演奏用タイマ.nシステム時刻, (int)Eレーン.BGM, CDTXMania.app.DTX.nモニタを考慮した音量(E楽器パート.UNKNOWN)); return; } CDTXMania.app.Skin.sound歓声音.t再生する(); @@ -53,22 +53,22 @@ namespace DTXMania public override void On活性化() { - for( int i = 0; i < 3; i++ ) + for (int i = 0; i < 3; i++) { - for( int j = 0; j < 4; j++ ) + for (int j = 0; j < 4; j++) { - this.ct進行用[ i, j ] = new CCounter(); + this.ct進行用[i, j] = new CCounter(); } } base.On活性化(); } public override void On非活性化() { - for( int i = 0; i < 3; i++ ) + for (int i = 0; i < 3; i++) { - for( int j = 0; j < 4; j++ ) + for (int j = 0; j < 4; j++) { - this.ct進行用[ i, j ] = null; + this.ct進行用[i, j] = null; } } base.On非活性化(); @@ -76,70 +76,70 @@ namespace DTXMania public override int On進行描画() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - for( int i = 0; i < 2; i++ ) + for (int i = 0; i < 2; i++) { - E楽器パート e楽器パート = ( i == 0 ) ? E楽器パート.GUITAR : E楽器パート.BASS; - for( int j = 0; j < 4; j++ ) + E楽器パート e楽器パート = (i == 0) ? E楽器パート.GUITAR : E楽器パート.BASS; + for (int j = 0; j < 4; j++) { - if( !this.ct進行用[ (int) e楽器パート, j ].b停止中 ) + if (!this.ct進行用[(int)e楽器パート, j].b停止中) { - if( this.ct進行用[ (int) e楽器パート, j ].b終了値に達した ) + if (this.ct進行用[(int)e楽器パート, j].b終了値に達した) { - this.ct進行用[ (int) e楽器パート, j ].t停止(); + this.ct進行用[(int)e楽器パート, j].t停止(); } else { - this.ct進行用[ (int) e楽器パート, j ].t進行(); - int x = ( ( e楽器パート == E楽器パート.GUITAR ) ? 1521+234 : 1194+234 ); + this.ct進行用[(int)e楽器パート, j].t進行(); + int x = ((e楽器パート == E楽器パート.GUITAR) ? 1521 + 234 : 1194 + 234); if (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Center) { - x -= ( e楽器パート == E楽器パート.GUITAR ) ? 71 : 994; + x -= (e楽器パート == E楽器パート.GUITAR) ? 71 : 994; } int num4 = 0; int num5 = 0; - int num6 = this.ct進行用[ (int) e楽器パート, j ].n現在の値; - if( num6 < 100 ) + int num6 = this.ct進行用[(int)e楽器パート, j].n現在の値; + if (num6 < 100) { - num4 = (int) ( 64.0 + ( 290.0 * Math.Cos( Math.PI / 2 * ( ( (float) num6 ) / 100f ) ) ) ); + num4 = (int)(64.0 + (290.0 * Math.Cos(Math.PI / 2 * (((float)num6) / 100f)))); } - else if( num6 < 150 ) + else if (num6 < 150) { - num4 = (int) ( 64.0 + ( ( 150 - num6 ) * Math.Sin( ( Math.PI * ( ( num6 - 100 ) % 0x19 ) ) / 25.0 ) ) ); + num4 = (int)(64.0 + ((150 - num6) * Math.Sin((Math.PI * ((num6 - 100) % 0x19)) / 25.0))); } - else if( num6 < 200 ) + else if (num6 < 200) { num4 = 0x40; } else { - num4 = (int) ( 64f - ( ( (float) ( 290 * ( num6 - 200 ) ) ) / 100f ) ); + num4 = (int)(64f - (((float)(290 * (num6 - 200))) / 100f)); } - if( CDTXMania.app.ConfigIni.bReverse[ (int) e楽器パート ] ) + if (CDTXMania.app.ConfigIni.bReverse[(int)e楽器パート]) { - num4 = ( 0x163 - num4 ) - 0xf4; + num4 = (0x163 - num4) - 0xf4; } - Rectangle rectangle = new Rectangle( 0, 0, 0x1a, 0x7a * 2 ); - if ( ( 0x163 - num4 ) < rectangle.Bottom ) + Rectangle rectangle = new Rectangle(0, 0, 0x1a, 0x7a * 2); + if ((0x163 - num4) < rectangle.Bottom) { - rectangle.Height = ( 0x163 - num4 ) - rectangle.Top; + rectangle.Height = (0x163 - num4) - rectangle.Top; } - if( num4 < 0 ) + if (num4 < 0) { rectangle.Y = -num4; num5 = -num4; } - if ( ( rectangle.Top < rectangle.Bottom ) && ( this.txWailingBonus != null ) ) + if ((rectangle.Top < rectangle.Bottom) && (this.txWailingBonus != null)) { - rectangle.X = (int) ( rectangle.X * Scale.X ); - rectangle.Y = (int) ( rectangle.Y * Scale.Y ); - rectangle.Width = (int) ( rectangle.Width * Scale.X ); - rectangle.Height = (int) ( rectangle.Height * Scale.Y ); + rectangle.X = (int)(rectangle.X * Scale.X); + rectangle.Y = (int)(rectangle.Y * Scale.Y); + rectangle.Width = (int)(rectangle.Width * Scale.X); + rectangle.Height = (int)(rectangle.Height * Scale.Y); this.txWailingBonus.t2D描画( CDTXMania.app.Device, x, - ( ( ( ( e楽器パート == E楽器パート.GUITAR ) ? 0x39 : 0x39 ) + num4 ) + num5 ) * Scale.Y, + ((((e楽器パート == E楽器パート.GUITAR) ? 0x39 : 0x39) + num4) + num5) * Scale.Y, rectangle ); } diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drumsグラフ.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drumsグラフ.cs index f23e00db..37056bcc 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drumsグラフ.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drumsグラフ.cs @@ -11,16 +11,16 @@ namespace DTXMania { internal class CAct演奏Drumsグラフ : CActivity { - // #24074 2011.01.23 ikanick グラフの描画 - // 実装内容 - // ・左を現在、右を目標 - // ・基準線(60,70,80,90,100%)を超えると線が黄色くなる(元は白) - // ・目標を超えると現在が光る - // ・オート時には描画しない - // 要望・実装予定 - // ・グラフを波打たせるなどの視覚の向上→実装済 - // 修正等 - // ・画像がないと落ちる→修正済 + // #24074 2011.01.23 ikanick グラフの描画 + // 実装内容 + // ・左を現在、右を目標 + // ・基準線(60,70,80,90,100%)を超えると線が黄色くなる(元は白) + // ・目標を超えると現在が光る + // ・オート時には描画しない + // 要望・実装予定 + // ・グラフを波打たせるなどの視覚の向上→実装済 + // 修正等 + // ・画像がないと落ちる→修正済 private int XPos = 3 * 345; private int YPos = 200; @@ -31,29 +31,29 @@ namespace DTXMania // プロパティ - public double dbグラフ値現在_渡 - { - get - { - return this.dbグラフ値現在; - } - set - { - this.dbグラフ値現在 = value; - } - } - public double dbグラフ値目標_渡 - { - get - { - return this.dbグラフ値目標; - } - set - { - this.dbグラフ値目標 = value; - } - } - + public double dbグラフ値現在_渡 + { + get + { + return this.dbグラフ値現在; + } + set + { + this.dbグラフ値現在 = value; + } + } + public double dbグラフ値目標_渡 + { + get + { + return this.dbグラフ値目標; + } + set + { + this.dbグラフ値目標 = value; + } + } + // コンストラクタ public CAct演奏Drumsグラフ() @@ -65,9 +65,9 @@ namespace DTXMania // CActivity 実装 public override void On活性化() - { - this.dbグラフ値目標 = 80f; - this.dbグラフ値現在 = 0f; + { + this.dbグラフ値目標 = 80f; + this.dbグラフ値現在 = 0f; base.On活性化(); } public override void On非活性化() @@ -76,29 +76,29 @@ namespace DTXMania } public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - string pathグラフ = CSkin.Path( @"Graphics\ScreenPlay graph.png" ); - if ( File.Exists( pathグラフ ) ) + string pathグラフ = CSkin.Path(@"Graphics\ScreenPlay graph.png"); + if (File.Exists(pathグラフ)) { - this.txグラフ = TextureFactory.tテクスチャの生成( pathグラフ ); + this.txグラフ = TextureFactory.tテクスチャの生成(pathグラフ); } base.OnManagedリソースの作成(); } } public override void OnManagedリソースの解放() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.txグラフ ); + TextureFactory.tテクスチャの解放(ref this.txグラフ); base.OnManagedリソースの解放(); } } public override int On進行描画() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - if( base.b初めての進行描画 ) + if (base.b初めての進行描画) { /* #35804 エフェクトを変更しました。 for( int k = 0; k < 64; k++ ) @@ -124,45 +124,45 @@ namespace DTXMania */ base.b初めての進行描画 = false; counterYposInImg = new CCounter(0, 35, 16, CDTXMania.app.Timer); - } + } counterYposInImg.t進行Loop(); int stYposInImg = counterYposInImg.n現在の値; // レーン表示位置によって変更 - if( CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Center ) + if (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Center) { XPos = 1350; } - // 背景暗幕 - if (this.txグラフ != null) - { + // 背景暗幕 + if (this.txグラフ != null) + { this.txグラフ.vc拡大縮小倍率 = new Vector3(DispWidth, DispHeight, 1f); - this.txグラフ.n透明度 = 128; - this.txグラフ.t2D描画( - CDTXMania.app.Device, - XPos, - YPos, - new Rectangle(62, 0, 1, 1) - ); - } - - // 基準線 + this.txグラフ.n透明度 = 128; + this.txグラフ.t2D描画( + CDTXMania.app.Device, + XPos, + YPos, + new Rectangle(62, 0, 1, 1) +); + } + + // 基準線 if (this.txグラフ != null) - { + { this.txグラフ.n透明度 = 128; - this.txグラフ.vc拡大縮小倍率 = new Vector3(DispWidth, 1f, 1f); - for (int i = 0; i < slices; i++) - { - this.txグラフ.t2D描画( - CDTXMania.app.Device, - XPos, - YPos + DispHeight * i / slices, - new Rectangle(60, 0, 1, 1) - ); - } + this.txグラフ.vc拡大縮小倍率 = new Vector3(DispWidth, 1f, 1f); + for (int i = 0; i < slices; i++) + { + this.txグラフ.t2D描画( + CDTXMania.app.Device, + XPos, + YPos + DispHeight * i / slices, + new Rectangle(60, 0, 1, 1) +); + } /* #35804 chnmr0 縦線は非表示にしました。 this.txグラフ.vc拡大縮小倍率 = new Vector3(1f, DispHeight, 1f); for (int i = 0; i < 2; i++) @@ -181,65 +181,65 @@ namespace DTXMania ); } */ - } + } - if (this.txグラフ != null) - { - this.txグラフ.vc拡大縮小倍率 = new Vector3(DispWidth, 1f, 1f); - } - for (int i = 0; i < 5; i++) - { + if (this.txグラフ != null) + { + this.txグラフ.vc拡大縮小倍率 = new Vector3(DispWidth, 1f, 1f); + } + for (int i = 0; i < 5; i++) + { Rectangle rectangle; - // 基準線を越えたら線が黄色くなる - if (this.dbグラフ値現在 >= (100 - i * slices)) - { - rectangle = new Rectangle(61,0,1,1); //黄色 + // 基準線を越えたら線が黄色くなる + if (this.dbグラフ値現在 >= (100 - i * slices)) + { + rectangle = new Rectangle(61, 0, 1, 1); //黄色 if (this.txグラフ != null) - { - this.txグラフ.n透明度 = 224; - } - } - else - { - rectangle = new Rectangle(60,0,1,1); - if (this.txグラフ != null) - { - this.txグラフ.n透明度 = 160; - } - } + { + this.txグラフ.n透明度 = 224; + } + } + else + { + rectangle = new Rectangle(60, 0, 1, 1); + if (this.txグラフ != null) + { + this.txグラフ.n透明度 = 160; + } + } - if (this.txグラフ != null) - { - this.txグラフ.t2D描画( - CDTXMania.app.Device, - XPos, - YPos + i * DispHeight / slices, - rectangle - ); - } - } - // グラフ - // --現在値 - if (this.dbグラフ値現在_表示 < this.dbグラフ値現在) - { - this.dbグラフ値現在_表示 += (this.dbグラフ値現在 - this.dbグラフ値現在_表示) / 5 + 0.01; - } - if (this.dbグラフ値現在_表示 >= this.dbグラフ値現在) - { - this.dbグラフ値現在_表示 = this.dbグラフ値現在; - } + if (this.txグラフ != null) + { + this.txグラフ.t2D描画( + CDTXMania.app.Device, + XPos, + YPos + i * DispHeight / slices, + rectangle +); + } + } + // グラフ + // --現在値 + if (this.dbグラフ値現在_表示 < this.dbグラフ値現在) + { + this.dbグラフ値現在_表示 += (this.dbグラフ値現在 - this.dbグラフ値現在_表示) / 5 + 0.01; + } + if (this.dbグラフ値現在_表示 >= this.dbグラフ値現在) + { + this.dbグラフ値現在_表示 = this.dbグラフ値現在; + } int ar = (int)(DispHeight * this.dbグラフ値現在_表示 / 100.0); if (this.txグラフ != null) - { - this.txグラフ.vc拡大縮小倍率 = new Vector3(1f, 1f, 1f); - this.txグラフ.n透明度 = 255; - this.txグラフ.t2D描画( - CDTXMania.app.Device, - XPos, - YPos + DispHeight - ar, - new Rectangle(0,5 + stYposInImg,30,ar) - ); + { + this.txグラフ.vc拡大縮小倍率 = new Vector3(1f, 1f, 1f); + this.txグラフ.n透明度 = 255; + this.txグラフ.t2D描画( + CDTXMania.app.Device, + XPos, + YPos + DispHeight - ar, + new Rectangle(0, 5 + stYposInImg, 30, ar) +); this.txグラフ.t2D描画( // 上部白いバー CDTXMania.app.Device, XPos, @@ -271,7 +271,7 @@ namespace DTXMania } */ - // --現在値_追加エフェクト + // --現在値_追加エフェクト /* if (this.dbグラフ値直前 != this.dbグラフ値現在) { @@ -314,41 +314,41 @@ namespace DTXMania } */ - // --現在値_目標越 - if ((dbグラフ値現在 >= dbグラフ値目標) && (this.txグラフ != null)) - { - // this.txグラフ.vc拡大縮小倍率 = new Vector3(1.4f, 1f, 1f); - this.txグラフ.n透明度 = 128; - this.txグラフ.b加算合成 = true; - this.txグラフ.t2D描画( - CDTXMania.app.Device, - XPos, - YPos + DispHeight - ar, - new Rectangle(0, 5 + stYposInImg, 30, ar) - ); - this.txグラフ.b加算合成 = false; - } - // --目標値 - if (this.dbグラフ値目標_表示 < this.dbグラフ値目標) - { - this.dbグラフ値目標_表示 += (this.dbグラフ値目標 - this.dbグラフ値目標_表示) / 5 + 0.01; - } - if (this.dbグラフ値目標_表示 >= this.dbグラフ値目標) - { - this.dbグラフ値目標_表示 = this.dbグラフ値目標; - } + // --現在値_目標越 + if ((dbグラフ値現在 >= dbグラフ値目標) && (this.txグラフ != null)) + { + // this.txグラフ.vc拡大縮小倍率 = new Vector3(1.4f, 1f, 1f); + this.txグラフ.n透明度 = 128; + this.txグラフ.b加算合成 = true; + this.txグラフ.t2D描画( + CDTXMania.app.Device, + XPos, + YPos + DispHeight - ar, + new Rectangle(0, 5 + stYposInImg, 30, ar) +); + this.txグラフ.b加算合成 = false; + } + // --目標値 + if (this.dbグラフ値目標_表示 < this.dbグラフ値目標) + { + this.dbグラフ値目標_表示 += (this.dbグラフ値目標 - this.dbグラフ値目標_表示) / 5 + 0.01; + } + if (this.dbグラフ値目標_表示 >= this.dbグラフ値目標) + { + this.dbグラフ値目標_表示 = this.dbグラフ値目標; + } ar = (int)(DispHeight * this.dbグラフ値目標_表示 / 100.0); if (this.txグラフ != null) - { - // this.txグラフ.vc拡大縮小倍率 = new Vector3(1f, 1f, 1f); - // this.txグラフ.n透明度 = 192; - this.txグラフ.t2D描画( - CDTXMania.app.Device, - XPos + 30, - YPos + DispHeight - ar, - new Rectangle(30, 5 + stYposInImg, 30, ar) - ); + { + // this.txグラフ.vc拡大縮小倍率 = new Vector3(1f, 1f, 1f); + // this.txグラフ.n透明度 = 192; + this.txグラフ.t2D描画( + CDTXMania.app.Device, + XPos + 30, + YPos + DispHeight - ar, + new Rectangle(30, 5 + stYposInImg, 30, ar) +); this.txグラフ.n透明度 = 255; this.txグラフ.t2D描画( // 上部白いバー CDTXMania.app.Device, @@ -368,7 +368,7 @@ namespace DTXMania ); this.txグラフ.b加算合成 = false; */ - } + } /* for( int k = 32; k < 64; k++ ) { @@ -392,7 +392,7 @@ namespace DTXMania } } */ - + } return 0; } @@ -413,15 +413,15 @@ namespace DTXMania public CCounter ct進行; } */ - // private STキラキラ[] stキラキラ = new STキラキラ[ 64 ]; - // private STキラキラ[] stフラッシュ = new STキラキラ[ 16 ]; + // private STキラキラ[] stキラキラ = new STキラキラ[ 64 ]; + // private STキラキラ[] stフラッシュ = new STキラキラ[ 16 ]; - private double dbグラフ値目標; - private double dbグラフ値目標_表示; - private double dbグラフ値現在; - private double dbグラフ値現在_表示; - // private double dbグラフ値直前; - // private int nグラフフラッシュct; + private double dbグラフ値目標; + private double dbグラフ値目標_表示; + private double dbグラフ値現在; + private double dbグラフ値現在_表示; + // private double dbグラフ値直前; + // private int nグラフフラッシュct; private CTexture txグラフ; //----------------- diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drumsゲージ.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drumsゲージ.cs index 3b3894ef..79cebe7d 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drumsゲージ.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drumsゲージ.cs @@ -12,7 +12,7 @@ namespace DTXMania internal class CAct演奏Drumsゲージ : CAct演奏ゲージ共通 { // プロパティ - + // コンストラクタ public CAct演奏Drumsゲージ() @@ -33,46 +33,46 @@ namespace DTXMania { this.ct本体振動 = null; this.ct本体移動 = null; - for( int i = 0; i < 24; i++ ) + for (int i = 0; i < 24; i++) { - this.st白い星[ i ].ct進行 = null; + this.st白い星[i].ct進行 = null; } base.On非活性化(); } public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - this.txゲージ = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlayDrums gauge.png" ) ); - this.txゲージ白 = TextureFactory.tテクスチャの生成Af( CSkin.Path( @"Graphics\ScreenPlayDrums_gauge_white.png " ) ); + this.txゲージ = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenPlayDrums gauge.png")); + this.txゲージ白 = TextureFactory.tテクスチャの生成Af(CSkin.Path(@"Graphics\ScreenPlayDrums_gauge_white.png ")); base.OnManagedリソースの作成(); } } public override void OnManagedリソースの解放() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.txゲージ白 ); - TextureFactory.tテクスチャの解放( ref this.txゲージ ); + TextureFactory.tテクスチャの解放(ref this.txゲージ白); + TextureFactory.tテクスチャの解放(ref this.txゲージ); base.OnManagedリソースの解放(); } } public override int On進行描画() { - if ( !base.b活性化してない ) + if (!base.b活性化してない) { #region [ 初めての進行描画 ] - if ( base.b初めての進行描画 ) + if (base.b初めての進行描画) { - for ( int k = 0; k < 0x18; k++ ) + for (int k = 0; k < 0x18; k++) { - this.st白い星[ k ].x = 2 + CDTXMania.app.Random.Next( 4 ); - this.st白い星[ k ].fScale = 0.2f + ( CDTXMania.app.Random.Next( 2 ) * 0.05f ); - this.st白い星[ k ].ct進行 = new CCounter( 0, 0x160, 8 + CDTXMania.app.Random.Next( 4 ), CDTXMania.app.Timer ); - this.st白い星[ k ].ct進行.n現在の値 = CDTXMania.app.Random.Next( 0x160 ); + this.st白い星[k].x = 2 + CDTXMania.app.Random.Next(4); + this.st白い星[k].fScale = 0.2f + (CDTXMania.app.Random.Next(2) * 0.05f); + this.st白い星[k].ct進行 = new CCounter(0, 0x160, 8 + CDTXMania.app.Random.Next(4), CDTXMania.app.Timer); + this.st白い星[k].ct進行.n現在の値 = CDTXMania.app.Random.Next(0x160); } - this.ct本体移動 = new CCounter( 0, 0x1a, 20, CDTXMania.app.Timer ); - this.ct本体振動 = new CCounter( 0, 360, 4, CDTXMania.app.Timer ); + this.ct本体移動 = new CCounter(0, 0x1a, 20, CDTXMania.app.Timer); + this.ct本体振動 = new CCounter(0, 360, 4, CDTXMania.app.Timer); base.b初めての進行描画 = false; } #endregion @@ -80,58 +80,58 @@ namespace DTXMania this.ct本体振動.t進行Loop(); #region [ Risky残りMiss回数表示 ] - if ( this.bRisky && this.actLVLNFont != null ) // #23599 2011.7.30 yyagi Risky残りMiss回数表示 + if (this.bRisky && this.actLVLNFont != null) // #23599 2011.7.30 yyagi Risky残りMiss回数表示 { - CActLVLNFont.EFontColor efc = this.IsDanger( E楽器パート.DRUMS ) ? + CActLVLNFont.EFontColor efc = this.IsDanger(E楽器パート.DRUMS) ? CActLVLNFont.EFontColor.Red : CActLVLNFont.EFontColor.Yellow; - actLVLNFont.t文字列描画( (int) ( 12 * Scale.X ), (int) ( 408 * Scale.Y ), nRiskyTimes.ToString(), efc, CActLVLNFont.EFontAlign.Right ); + actLVLNFont.t文字列描画((int)(12 * Scale.X), (int)(408 * Scale.Y), nRiskyTimes.ToString(), efc, CActLVLNFont.EFontAlign.Right); } #endregion #region [ 緑orオレンジのゲージ表示 ] const double dbゲージ最大値 = 352.0 * Scale.Y; - int n表示するゲージの高さ = ( this.dbゲージ値 == 1.0 ) ? - ( (int) ( dbゲージ最大値 * this.dbゲージ値 ) ) : - ( (int) ( ( dbゲージ最大値 * this.dbゲージ値 ) + ( 2.0 * Math.Sin( Math.PI * 2 * ( ( (double) this.ct本体振動.n現在の値 ) / 360.0 ) ) ) ) ); + int n表示するゲージの高さ = (this.dbゲージ値 == 1.0) ? + ((int)(dbゲージ最大値 * this.dbゲージ値)) : + ((int)((dbゲージ最大値 * this.dbゲージ値) + (2.0 * Math.Sin(Math.PI * 2 * (((double)this.ct本体振動.n現在の値) / 360.0))))); - if ( n表示するゲージの高さ <= 0 ) + if (n表示するゲージの高さ <= 0) { return 0; } - if ( this.txゲージ != null ) + if (this.txゲージ != null) { - this.txゲージ.vc拡大縮小倍率 = new Vector3( 1f, 1f, 1f ); + this.txゲージ.vc拡大縮小倍率 = new Vector3(1f, 1f, 1f); this.txゲージ.n透明度 = 0xff; this.txゲージ.b加算合成 = false; } - int nCtゲージ内部上昇スクロール現在値 = (int) ( this.ct本体移動.n現在の値 * Scale.Y ); - int n表示ゲージ最大値 = (int) ( 0x195 * Scale.Y ); - int ybar = ( n表示ゲージ最大値 - n表示するゲージの高さ ) - nCtゲージ内部上昇スクロール現在値; + int nCtゲージ内部上昇スクロール現在値 = (int)(this.ct本体移動.n現在の値 * Scale.Y); + int n表示ゲージ最大値 = (int)(0x195 * Scale.Y); + int ybar = (n表示ゲージ最大値 - n表示するゲージの高さ) - nCtゲージ内部上昇スクロール現在値; int height = n表示するゲージの高さ + nCtゲージ内部上昇スクロール現在値; - while ( height > 0 ) + while (height > 0) { - Rectangle rect = ( this.dbゲージ値 == 1.0 ) ? - new Rectangle( 48, 0, 48, 61 ) : - new Rectangle( 0, 0, 48, 61 ); + Rectangle rect = (this.dbゲージ値 == 1.0) ? + new Rectangle(48, 0, 48, 61) : + new Rectangle(0, 0, 48, 61); #region [ clipping ] - if ( ybar < ( n表示ゲージ最大値 - n表示するゲージの高さ ) ) + if (ybar < (n表示ゲージ最大値 - n表示するゲージの高さ)) { - int d = ( n表示ゲージ最大値 - n表示するゲージの高さ ) - ybar; + int d = (n表示ゲージ最大値 - n表示するゲージの高さ) - ybar; rect.Y += d; rect.Height -= d; ybar += d; } - if ( ( ybar + rect.Height ) > n表示ゲージ最大値 ) + if ((ybar + rect.Height) > n表示ゲージ最大値) { - int num7 = ( ybar + rect.Height ) - n表示ゲージ最大値; + int num7 = (ybar + rect.Height) - n表示ゲージ最大値; rect.Height -= num7; } - if ( rect.Top >= rect.Bottom ) + if (rect.Top >= rect.Bottom) { break; } #endregion - if ( this.txゲージ != null ) + if (this.txゲージ != null) { this.txゲージ.t2D描画( CDTXMania.app.Device, @@ -145,9 +145,9 @@ namespace DTXMania } #endregion #region [ 光彩 ] - if ( this.txゲージ白 != null ) + if (this.txゲージ白 != null) { - this.txゲージ白.vc拡大縮小倍率 = new Vector3( 1f, 1f, 1f ); + this.txゲージ白.vc拡大縮小倍率 = new Vector3(1f, 1f, 1f); this.txゲージ白.n透明度 = 180; this.txゲージ白.b加算合成 = true; } @@ -155,12 +155,12 @@ namespace DTXMania Rectangle rect = new Rectangle( 0, 0, - (int) ( 0x10 * Scale.X ), - (int) ( 0x40 * 4 * Scale.Y ) + (int)(0x10 * Scale.X), + (int)(0x40 * 4 * Scale.Y) ); #region [ clipping1 ] - int ylight = ( n表示ゲージ最大値 - n表示するゲージの高さ ) + (int) ( 0 * 0x40 * Scale.Y ); - if ( ylight >= n表示ゲージ最大値 ) + int ylight = (n表示ゲージ最大値 - n表示するゲージの高さ) + (int)(0 * 0x40 * Scale.Y); + if (ylight >= n表示ゲージ最大値) { //break; } @@ -168,18 +168,18 @@ namespace DTXMania else { #region [ Clipping2 ] - if ( ( ylight + rect.Height ) > n表示ゲージ最大値 ) + if ((ylight + rect.Height) > n表示ゲージ最大値) { - int d = ( ylight + rect.Height ) - n表示ゲージ最大値; + int d = (ylight + rect.Height) - n表示ゲージ最大値; rect.Height -= d; } #endregion - if ( ( rect.Top < rect.Bottom ) && ( this.txゲージ白 != null ) ) + if ((rect.Top < rect.Bottom) && (this.txゲージ白 != null)) { this.txゲージ白.t2D描画( CDTXMania.app.Device, - (int) ( 6 * Scale.X ), - (int) ( ylight + 0.5f ), + (int)(6 * Scale.X), + (int)(ylight + 0.5f), rect ); } @@ -187,7 +187,7 @@ namespace DTXMania } #endregion #region [ ゲージ頂上の光源 ] - if ( this.txゲージ != null ) + if (this.txゲージ != null) { //this.txゲージ.vc拡大縮小倍率 = new Vector3( 1f, 1f, 1f ); this.txゲージ.n透明度 = 0xff; @@ -195,27 +195,27 @@ namespace DTXMania } { Rectangle rect = new Rectangle( - (int) ( 0x30 * Scale.X ), + (int)(0x30 * Scale.X), 0, - (int) ( 0x10 * Scale.X ), - (int) ( 0x10 * Scale.Y ) + (int)(0x10 * Scale.X), + (int)(0x10 * Scale.Y) ); int yゲージ頂上 = n表示ゲージ最大値 - n表示するゲージの高さ; - if ( yゲージ頂上 < n表示ゲージ最大値 ) + if (yゲージ頂上 < n表示ゲージ最大値) { #region [ clipping ] - if ( ( yゲージ頂上 + rect.Height ) > n表示ゲージ最大値 ) + if ((yゲージ頂上 + rect.Height) > n表示ゲージ最大値) { - int d = ( yゲージ頂上 + rect.Height ) - n表示ゲージ最大値; + int d = (yゲージ頂上 + rect.Height) - n表示ゲージ最大値; rect.Height -= d; } #endregion - if ( ( rect.Top < rect.Bottom ) && ( this.txゲージ != null ) ) + if ((rect.Top < rect.Bottom) && (this.txゲージ != null)) { this.txゲージ.t2D描画( CDTXMania.app.Device, - (int) ( 6 * Scale.X ), - (int) ( yゲージ頂上 + 0.5f ), + (int)(6 * Scale.X), + (int)(yゲージ頂上 + 0.5f), rect ); } @@ -223,32 +223,32 @@ namespace DTXMania } #endregion #region [ 泡 ] - if ( this.txゲージ != null ) + if (this.txゲージ != null) { this.txゲージ.b加算合成 = true; } - for ( int j = 0; j < 24; j++ ) + for (int j = 0; j < 24; j++) { - this.st白い星[ j ].ct進行.t進行Loop(); - int x = 6 + this.st白い星[ j ].x; - int y泡 = ( n表示ゲージ最大値 - n表示するゲージの高さ ) + (int) ( ( 0x160 - this.st白い星[ j ].ct進行.n現在の値 ) * Scale.Y ); - int n透明度 = ( this.st白い星[ j ].ct進行.n現在の値 < 0xb0 ) ? 0 : ( (int) ( 255.0 * ( ( (double) ( this.st白い星[ j ].ct進行.n現在の値 - 0xb0 ) ) / 176.0 ) ) ); - if ( ( n透明度 != 0 ) && ( y泡 < (int) ( 0x191 * Scale.Y ) ) ) + this.st白い星[j].ct進行.t進行Loop(); + int x = 6 + this.st白い星[j].x; + int y泡 = (n表示ゲージ最大値 - n表示するゲージの高さ) + (int)((0x160 - this.st白い星[j].ct進行.n現在の値) * Scale.Y); + int n透明度 = (this.st白い星[j].ct進行.n現在の値 < 0xb0) ? 0 : ((int)(255.0 * (((double)(this.st白い星[j].ct進行.n現在の値 - 0xb0)) / 176.0))); + if ((n透明度 != 0) && (y泡 < (int)(0x191 * Scale.Y))) { Rectangle rect = new Rectangle( - (int) ( 0 * Scale.X ), - (int) ( 0x20 * Scale.Y ), - (int) ( 0x20 * Scale.X ), - (int) ( 0x20 * Scale.Y ) + (int)(0 * Scale.X), + (int)(0x20 * Scale.Y), + (int)(0x20 * Scale.X), + (int)(0x20 * Scale.Y) ); - if ( this.txゲージ != null ) + if (this.txゲージ != null) { - this.txゲージ.vc拡大縮小倍率 = new Vector3( this.st白い星[ j ].fScale, this.st白い星[ j ].fScale, 1f ); + this.txゲージ.vc拡大縮小倍率 = new Vector3(this.st白い星[j].fScale, this.st白い星[j].fScale, 1f); this.txゲージ.n透明度 = n透明度; this.txゲージ.t2D描画( CDTXMania.app.Device, - (int) ( x * Scale.X ), - (int) ( y泡 + 0.5f ), + (int)(x * Scale.X), + (int)(y泡 + 0.5f), rect ); } @@ -264,7 +264,7 @@ namespace DTXMania #region [ private ] //----------------- - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] private struct ST白い星 { public int x; @@ -274,7 +274,7 @@ namespace DTXMania private CTextureAf txゲージ白; private const int STAR_MAX = 0x18; - private ST白い星[] st白い星 = new ST白い星[ 0x18 ]; + private ST白い星[] st白い星 = new ST白い星[0x18]; //----------------- #endregion } diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏DrumsコンボDGB.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏DrumsコンボDGB.cs index ab9d8236..cee2a14f 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏DrumsコンボDGB.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏DrumsコンボDGB.cs @@ -8,16 +8,16 @@ namespace DTXMania { // CAct演奏Combo共通 実装 - protected override void tコンボ表示_ギター( int nCombo値, int nジャンプインデックス ) + protected override void tコンボ表示_ギター(int nCombo値, int nジャンプインデックス) { int x, y; - if( CDTXMania.app.DTX.bチップがある.Bass || CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Center ) + if (CDTXMania.app.DTX.bチップがある.Bass || CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Center) { - x = (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left)? 1638 : 1567+5; + x = (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left) ? 1638 : 1567 + 5; //y = CDTXMania.app.ConfigIni.bReverse.Guitar ? 0xaf : 270; - y = 演奏判定ライン座標.n判定ラインY座標( E楽器パート.GUITAR, false, CDTXMania.app.ConfigIni.bReverse.Guitar ); - y += CDTXMania.app.ConfigIni.bReverse.Guitar ? (int) ( -134 * Scale.Y ) : (int) ( +174 * Scale.Y ); - if ( base.txCOMBOギター != null ) + y = 演奏判定ライン座標.n判定ラインY座標(E楽器パート.GUITAR, false, CDTXMania.app.ConfigIni.bReverse.Guitar); + y += CDTXMania.app.ConfigIni.bReverse.Guitar ? (int)(-134 * Scale.Y) : (int)(+174 * Scale.Y); + if (base.txCOMBOギター != null) { base.txCOMBOギター.n透明度 = 120; } @@ -26,30 +26,30 @@ namespace DTXMania { x = 1344; //y = CDTXMania.app.ConfigIni.bReverse.Guitar ? 0xee : 0xcf; - y = 演奏判定ライン座標.n判定ラインY座標( E楽器パート.GUITAR, false, CDTXMania.app.ConfigIni.bReverse.Guitar ); - y += CDTXMania.app.ConfigIni.bReverse.Guitar ? (int) ( -134 * Scale.Y ) : (int) ( +174 * Scale.Y ); - if ( base.txCOMBOギター != null ) + y = 演奏判定ライン座標.n判定ラインY座標(E楽器パート.GUITAR, false, CDTXMania.app.ConfigIni.bReverse.Guitar); + y += CDTXMania.app.ConfigIni.bReverse.Guitar ? (int)(-134 * Scale.Y) : (int)(+174 * Scale.Y); + if (base.txCOMBOギター != null) { base.txCOMBOギター.n透明度 = 0xff; } } - base.tコンボ表示_ギター( nCombo値, x, y, nジャンプインデックス ); + base.tコンボ表示_ギター(nCombo値, x, y, nジャンプインデックス); } - protected override void tコンボ表示_ドラム( int nCombo値, int nジャンプインデックス ) + protected override void tコンボ表示_ドラム(int nCombo値, int nジャンプインデックス) { - base.tコンボ表示_ドラム( nCombo値, nジャンプインデックス ); + base.tコンボ表示_ドラム(nCombo値, nジャンプインデックス); } - protected override void tコンボ表示_ベース( int nCombo値, int nジャンプインデックス ) + protected override void tコンボ表示_ベース(int nCombo値, int nジャンプインデックス) { - int x = ( CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ) ? 1311 : 1311-994+5; + int x = (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left) ? 1311 : 1311 - 994 + 5; //int y = CDTXMania.app.ConfigIni.bReverse.Bass ? 0xaf : 270; - int y = 演奏判定ライン座標.n判定ラインY座標( E楽器パート.BASS, false, CDTXMania.app.ConfigIni.bReverse.Bass ); - y += CDTXMania.app.ConfigIni.bReverse.Bass ? (int) ( -134 * Scale.Y ) : (int) ( +174 * Scale.Y ); - if ( base.txCOMBOギター != null ) + int y = 演奏判定ライン座標.n判定ラインY座標(E楽器パート.BASS, false, CDTXMania.app.ConfigIni.bReverse.Bass); + y += CDTXMania.app.ConfigIni.bReverse.Bass ? (int)(-134 * Scale.Y) : (int)(+174 * Scale.Y); + if (base.txCOMBOギター != null) { base.txCOMBOギター.n透明度 = 120; } - base.tコンボ表示_ベース( nCombo値, x, y, nジャンプインデックス ); + base.tコンボ表示_ベース(nCombo値, x, y, nジャンプインデックス); } } } diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drumsスコア.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drumsスコア.cs index b72ef217..5e88ea2b 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drumsスコア.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drumsスコア.cs @@ -10,78 +10,78 @@ namespace DTXMania // CActivity 実装(共通クラスからの差分のみ) public override unsafe int On進行描画() - { - if (!base.b活性化してない) - { - if (base.b初めての進行描画) - { - base.n進行用タイマ = FDK.CSound管理.rc演奏用タイマ.n現在時刻; - base.b初めての進行描画 = false; - } - long num = FDK.CSound管理.rc演奏用タイマ.n現在時刻; - if (num < base.n進行用タイマ) - { - base.n進行用タイマ = num; - } - while ((num - base.n進行用タイマ) >= 10) - { - for (int j = 0; j < 3; j++) - { - this.n現在表示中のスコア[j] += this.nスコアの増分[j]; - - if (this.n現在表示中のスコア[j] > (long) this.n現在の本当のスコア[j]) - this.n現在表示中のスコア[j] = (long) this.n現在の本当のスコア[j]; - } - base.n進行用タイマ += 10; - } - string str = this.n現在表示中のスコア.Drums.ToString("0000000000"); - for (int i = 0; i < 10; i++) - { - Rectangle rectangle; - char ch = str[i]; - if ( ch.Equals( ' ' ) ) + { + if (!base.b活性化してない) + { + if (base.b初めての進行描画) + { + base.n進行用タイマ = FDK.CSound管理.rc演奏用タイマ.n現在時刻; + base.b初めての進行描画 = false; + } + long num = FDK.CSound管理.rc演奏用タイマ.n現在時刻; + if (num < base.n進行用タイマ) { - rectangle = new Rectangle( - 0, - 0, - (int) ( 12 * Scale.X ), - (int) ( 0x18 * Scale.Y ) - ); + base.n進行用タイマ = num; + } + while ((num - base.n進行用タイマ) >= 10) + { + for (int j = 0; j < 3; j++) + { + this.n現在表示中のスコア[j] += this.nスコアの増分[j]; + + if (this.n現在表示中のスコア[j] > (long)this.n現在の本当のスコア[j]) + this.n現在表示中のスコア[j] = (long)this.n現在の本当のスコア[j]; + } + base.n進行用タイマ += 10; } - else + string str = this.n現在表示中のスコア.Drums.ToString("0000000000"); + for (int i = 0; i < 10; i++) { - int num4 = int.Parse( str.Substring( i, 1 ) ); - if ( num4 < 5 ) + Rectangle rectangle; + char ch = str[i]; + if (ch.Equals(' ')) { rectangle = new Rectangle( - (int) ( num4 * 12 * Scale.X ), 0, - (int) ( 12 * Scale.X ), - (int) ( 0x18 * Scale.Y ) + 0, + (int)(12 * Scale.X), + (int)(0x18 * Scale.Y) ); } else { - rectangle = new Rectangle( - (int) ( ( num4 - 5 ) * 12 * Scale.X ), - (int) ( 0x18 * Scale.Y ), - (int) ( 12 * Scale.X ), - (int) ( 0x18 * Scale.Y ) + int num4 = int.Parse(str.Substring(i, 1)); + if (num4 < 5) + { + rectangle = new Rectangle( + (int)(num4 * 12 * Scale.X), + 0, + (int)(12 * Scale.X), + (int)(0x18 * Scale.Y) + ); + } + else + { + rectangle = new Rectangle( + (int)((num4 - 5) * 12 * Scale.X), + (int)(0x18 * Scale.Y), + (int)(12 * Scale.X), + (int)(0x18 * Scale.Y) + ); + } + } + if (base.txScore != null) + { + base.txScore.t2D描画( + CDTXMania.app.Device, + (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left) ? 1068 + (i * 36) : 1490 + i * 36, + 30, + rectangle ); } } - if ( base.txScore != null ) - { - base.txScore.t2D描画( - CDTXMania.app.Device, - (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left)? 1068 + ( i * 36 ) : 1490 + i * 36, - 30, - rectangle - ); - } - } - } - return 0; - } + } + return 0; + } } } diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drumsステータスパネル.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drumsステータスパネル.cs index 66317ba7..1a763fa2 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drumsステータスパネル.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drumsステータスパネル.cs @@ -11,9 +11,9 @@ namespace DTXMania { // コンストラクタ -// public CAct演奏Drumsステータスパネル() -// { -// } + // public CAct演奏Drumsステータスパネル() + // { + // } // メソッド @@ -48,52 +48,52 @@ namespace DTXMania //} public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - this.txStatusPanels = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlay status panels right.png" ) ); + this.txStatusPanels = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenPlay status panels right.png")); base.OnManagedリソースの作成(); } } public override void OnManagedリソースの解放() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.txStatusPanels ); + TextureFactory.tテクスチャの解放(ref this.txStatusPanels); base.OnManagedリソースの解放(); } } public override int On進行描画() { - if ( !base.b活性化してない && ( this.txStatusPanels != null ) ) + if (!base.b活性化してない && (this.txStatusPanels != null)) { this.txStatusPanels.t2D描画( CDTXMania.app.Device, 0x26f * Scale.X, 0x14f * Scale.Y, new Rectangle( - (int) ( this.nStatus * 15 * Scale.X ), - (int) ( 0xb7 * Scale.Y ), - (int) ( 15 * Scale.X ), - (int) ( 0x49 * Scale.Y ) + (int)(this.nStatus * 15 * Scale.X), + (int)(0xb7 * Scale.Y), + (int)(15 * Scale.X), + (int)(0x49 * Scale.Y) ) ); int drums = CDTXMania.app.ConfigIni.n譜面スクロール速度.Drums; - if ( drums < 0 ) + if (drums < 0) { drums = 0; } - if ( drums > 15 ) + if (drums > 15) { drums = 15; } - this.txStatusPanels.t2D描画( CDTXMania.app.Device, + this.txStatusPanels.t2D描画(CDTXMania.app.Device, 0x26f * Scale.X, 0x3b * Scale.Y, new Rectangle( - (int) ( drums * 15 * Scale.X ), + (int)(drums * 15 * Scale.X), 0, - (int) ( 15 * Scale.X ), - (int) ( 0xac * Scale.Y ) + (int)(15 * Scale.X), + (int)(0xac * Scale.Y) ) ); } diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏DrumsチップファイアD.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏DrumsチップファイアD.cs index 1416c57c..ec3f2c0e 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏DrumsチップファイアD.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏DrumsチップファイアD.cs @@ -15,127 +15,127 @@ namespace DTXMania { base.b活性化してない = true; } - - + + // メソッド - public void Start( Eレーン lane ) + public void Start(Eレーン lane) { - this.Start( lane, false, false, false, 0 ); + this.Start(lane, false, false, false, 0); } - public void Start( Eレーン lane, bool bフィルイン ) + public void Start(Eレーン lane, bool bフィルイン) { - this.Start( lane, bフィルイン, false, false, 0 ); + this.Start(lane, bフィルイン, false, false, 0); } - public void Start( Eレーン lane, bool bフィルイン, bool b大波 ) + public void Start(Eレーン lane, bool bフィルイン, bool b大波) { - this.Start( lane, bフィルイン, b大波, false, 0 ); + this.Start(lane, bフィルイン, b大波, false, 0); } - public void Start( Eレーン lane, bool bフィルイン, bool b大波, bool bç´°æ³¢ ) + public void Start(Eレーン lane, bool bフィルイン, bool b大波, bool bç´°æ³¢) { - this.Start( lane, bフィルイン, b大波, bç´°æ³¢, 0 ); + this.Start(lane, bフィルイン, b大波, bç´°æ³¢, 0); } - public void Start( Eレーン lane, bool bフィルイン, bool b大波, bool bç´°æ³¢, int _nJudgeLinePosY_delta_Drums ) + public void Start(Eレーン lane, bool bフィルイン, bool b大波, bool bç´°æ³¢, int _nJudgeLinePosY_delta_Drums) { nJudgeLinePosY_delta_Drums = _nJudgeLinePosY_delta_Drums; - if( this.tx火花 != null ) + if (this.tx火花 != null) { - for ( int j = 0; j < FIRE_MAX; j++ ) + for (int j = 0; j < FIRE_MAX; j++) { - if ( this.st火花[ j ].b使用中 && this.st火花[ j ].nLane == (int) lane ) // yyagi 負荷軽減のつもり・・・だが、あまり効果なさげ + if (this.st火花[j].b使用中 && this.st火花[j].nLane == (int)lane) // yyagi 負荷軽減のつもり・・・だが、あまり効果なさげ { - this.st火花[ j ].ct進行.t停止(); - this.st火花[ j ].b使用中 = false; + this.st火花[j].ct進行.t停止(); + this.st火花[j].b使用中 = false; } } - float n回転初期値 = CDTXMania.app.Random.Next( 360 ); - for ( int i = 0; i < 8; i++ ) + float n回転初期値 = CDTXMania.app.Random.Next(360); + for (int i = 0; i < 8; i++) { - for( int j = 0; j < FIRE_MAX; j++ ) + for (int j = 0; j < FIRE_MAX; j++) { - if( !this.st火花[ j ].b使用中 ) + if (!this.st火花[j].b使用中) { - this.st火花[ j ].b使用中 = true; - this.st火花[ j ].nLane = (int) lane; -// this.st火花[ j ].ct進行 = new CCounter( 0, 35, 6, CDTXMania.app.Timer ); - this.st火花[ j ].ct進行 = new CCounter( 0, 70, 3, CDTXMania.app.Timer ); - this.st火花[ j ].f回転単位 = C変換.DegreeToRadian( (float) ( n回転初期値 + ( i * 90f ) ) ); - this.st火花[ j ].f回転方向 = ( i < 4 ) ? 1f : -2f; - this.st火花[ j ].fサイズ = ( i < 4 ) ? 1f : 0.5f; + this.st火花[j].b使用中 = true; + this.st火花[j].nLane = (int)lane; + // this.st火花[ j ].ct進行 = new CCounter( 0, 35, 6, CDTXMania.app.Timer ); + this.st火花[j].ct進行 = new CCounter(0, 70, 3, CDTXMania.app.Timer); + this.st火花[j].f回転単位 = C変換.DegreeToRadian((float)(n回転初期値 + (i * 90f))); + this.st火花[j].f回転方向 = (i < 4) ? 1f : -2f; + this.st火花[j].fサイズ = (i < 4) ? 1f : 0.5f; break; } } } } - if ( bフィルイン && ( this.tx青い星 != null ) ) + if (bフィルイン && (this.tx青い星 != null)) { - for ( int i = 0; i < 0x10; i++ ) + for (int i = 0; i < 0x10; i++) { - for ( int j = 0; j < STAR_MAX; j++ ) + for (int j = 0; j < STAR_MAX; j++) { - if ( !this.st青い星[ j ].b使用中 ) + if (!this.st青い星[j].b使用中) { - this.st青い星[ j ].b使用中 = true; - int n回転初期値 = CDTXMania.app.Random.Next( 360 ); - double num7 = 0.9 + ( ( (double) CDTXMania.app.Random.Next( 40 ) ) / 100.0 ); - this.st青い星[ j ].nLane = (int) lane; - this.st青い星[ j ].ct進行 = new CCounter( 0, 100, 7, CDTXMania.app.Timer ); - this.st青い星[ j ].fX = - (int) ( this.nレーンの中央X座標[ (int) lane ] * ( CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ? 1.0 : 0.75 ) ) + - ( ( CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ) ? (float) ( 54 * 3 ) : (float) ( 619 + 12 + 40 ) ); - this.st青い星[ j ].fY = CDTXMania.app.ConfigIni.bReverse.Drums ? - (float) (119 + 4) - nJudgeLinePosY_delta_Drums : (float) (942 + 14) + nJudgeLinePosY_delta_Drums; - this.st青い星[ j ].f加速度X = (float) ( num7 * Math.Cos( ( Math.PI * 2 * n回転初期値 ) / 360.0 ) ); - this.st青い星[ j ].f加速度Y = (float) ( num7 * ( Math.Sin( ( Math.PI * 2 * n回転初期値 ) / 360.0 ) - 0.2 ) ); - this.st青い星[ j ].f加速度の加速度X = 0.995f; - this.st青い星[ j ].f加速度の加速度Y = 0.995f; - this.st青い星[ j ].f重力加速度 = 0.00355f; - this.st青い星[ j ].f半径 = (float) ( 0.5 + ( ( (double) CDTXMania.app.Random.Next( 30 ) ) / 100.0 ) ); + this.st青い星[j].b使用中 = true; + int n回転初期値 = CDTXMania.app.Random.Next(360); + double num7 = 0.9 + (((double)CDTXMania.app.Random.Next(40)) / 100.0); + this.st青い星[j].nLane = (int)lane; + this.st青い星[j].ct進行 = new CCounter(0, 100, 7, CDTXMania.app.Timer); + this.st青い星[j].fX = + (int)(this.nレーンの中央X座標[(int)lane] * (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ? 1.0 : 0.75)) + + ((CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left) ? (float)(54 * 3) : (float)(619 + 12 + 40)); + this.st青い星[j].fY = CDTXMania.app.ConfigIni.bReverse.Drums ? + (float)(119 + 4) - nJudgeLinePosY_delta_Drums : (float)(942 + 14) + nJudgeLinePosY_delta_Drums; + this.st青い星[j].f加速度X = (float)(num7 * Math.Cos((Math.PI * 2 * n回転初期値) / 360.0)); + this.st青い星[j].f加速度Y = (float)(num7 * (Math.Sin((Math.PI * 2 * n回転初期値) / 360.0) - 0.2)); + this.st青い星[j].f加速度の加速度X = 0.995f; + this.st青い星[j].f加速度の加速度Y = 0.995f; + this.st青い星[j].f重力加速度 = 0.00355f; + this.st青い星[j].f半径 = (float)(0.5 + (((double)CDTXMania.app.Random.Next(30)) / 100.0)); break; } } } } - if( b大波 && ( this.tx大波 != null ) ) + if (b大波 && (this.tx大波 != null)) { - for( int i = 0; i < 4; i++ ) + for (int i = 0; i < 4; i++) { - for( int j = 0; j < BIGWAVE_MAX; j++ ) + for (int j = 0; j < BIGWAVE_MAX; j++) { - if( !this.st大波[ j ].b使用中 ) + if (!this.st大波[j].b使用中) { - this.st大波[ j ].b使用中 = true; - this.st大波[ j ].nLane = (int) lane; - this.st大波[ j ].f半径 = ( (float) ( ( 20 - CDTXMania.app.Random.Next( 40 ) ) + 100 ) ) / 100f; - this.st大波[ j ].n進行速度ms = 10; - this.st大波[ j ].ct進行 = new CCounter( 0, 100, this.st大波[ j ].n進行速度ms, CDTXMania.app.Timer ); - this.st大波[ j ].ct進行.n現在の値 = i * 10; - this.st大波[ j ].f角度X = C変換.DegreeToRadian( (float) ( ( ( (double) ( CDTXMania.app.Random.Next( 100 ) * 50 ) ) / 100.0 ) + 30.0 ) ); - this.st大波[ j ].f角度Y = C変換.DegreeToRadian( this.b大波Balance ? ( this.fY波の最小仰角[ (int) lane ] + CDTXMania.app.Random.Next( 30 ) ) : ( this.fY波の最大仰角[ (int) lane ] - CDTXMania.app.Random.Next( 30 ) ) ); - this.st大波[ j ].f回転単位 = C変換.DegreeToRadian( (float) 0f ); - this.st大波[ j ].f回転方向 = 1f; + this.st大波[j].b使用中 = true; + this.st大波[j].nLane = (int)lane; + this.st大波[j].f半径 = ((float)((20 - CDTXMania.app.Random.Next(40)) + 100)) / 100f; + this.st大波[j].n進行速度ms = 10; + this.st大波[j].ct進行 = new CCounter(0, 100, this.st大波[j].n進行速度ms, CDTXMania.app.Timer); + this.st大波[j].ct進行.n現在の値 = i * 10; + this.st大波[j].f角度X = C変換.DegreeToRadian((float)((((double)(CDTXMania.app.Random.Next(100) * 50)) / 100.0) + 30.0)); + this.st大波[j].f角度Y = C変換.DegreeToRadian(this.b大波Balance ? (this.fY波の最小仰角[(int)lane] + CDTXMania.app.Random.Next(30)) : (this.fY波の最大仰角[(int)lane] - CDTXMania.app.Random.Next(30))); + this.st大波[j].f回転単位 = C変換.DegreeToRadian((float)0f); + this.st大波[j].f回転方向 = 1f; this.b大波Balance = !this.b大波Balance; break; } } } } - if( bç´°æ³¢ && ( this.txç´°æ³¢ != null ) ) + if (bç´°æ³¢ && (this.txç´°æ³¢ != null)) { - for( int i = 0; i < 1; i++ ) + for (int i = 0; i < 1; i++) { - for( int j = 0; j < BIGWAVE_MAX; j++ ) + for (int j = 0; j < BIGWAVE_MAX; j++) { - if( !this.stç´°æ³¢[ j ].b使用中 ) + if (!this.stç´°æ³¢[j].b使用中) { - this.stç´°æ³¢[ j ].b使用中 = true; - this.stç´°æ³¢[ j ].nLane = (int) lane; - this.stç´°æ³¢[ j ].f半径 = ( (float) ( ( 20 - CDTXMania.app.Random.Next( 40 ) ) + 100 ) ) / 100f; - this.stç´°æ³¢[ j ].n進行速度ms = 8; - this.stç´°æ³¢[ j ].ct進行 = new CCounter( 0, 100, this.stç´°æ³¢[ j ].n進行速度ms, CDTXMania.app.Timer ); - this.stç´°æ³¢[ j ].ct進行.n現在の値 = 0; - this.stç´°æ³¢[ j ].f角度X = C変換.DegreeToRadian( (float) ( ( ( (double) ( CDTXMania.app.Random.Next( 100 ) * 50 ) ) / 100.0 ) + 30.0 ) ); - this.stç´°æ³¢[ j ].f角度Y = C変換.DegreeToRadian( this.bç´°æ³¢Balance ? ( this.fY波の最小仰角[ (int) lane ] + CDTXMania.app.Random.Next( 30 ) ) : ( this.fY波の最大仰角[ (int) lane ] - CDTXMania.app.Random.Next( 30 ) ) ); + this.stç´°æ³¢[j].b使用中 = true; + this.stç´°æ³¢[j].nLane = (int)lane; + this.stç´°æ³¢[j].f半径 = ((float)((20 - CDTXMania.app.Random.Next(40)) + 100)) / 100f; + this.stç´°æ³¢[j].n進行速度ms = 8; + this.stç´°æ³¢[j].ct進行 = new CCounter(0, 100, this.stç´°æ³¢[j].n進行速度ms, CDTXMania.app.Timer); + this.stç´°æ³¢[j].ct進行.n現在の値 = 0; + this.stç´°æ³¢[j].f角度X = C変換.DegreeToRadian((float)((((double)(CDTXMania.app.Random.Next(100) * 50)) / 100.0) + 30.0)); + this.stç´°æ³¢[j].f角度Y = C変換.DegreeToRadian(this.bç´°æ³¢Balance ? (this.fY波の最小仰角[(int)lane] + CDTXMania.app.Random.Next(30)) : (this.fY波の最大仰角[(int)lane] - CDTXMania.app.Random.Next(30))); this.bç´°æ³¢Balance = !this.bç´°æ³¢Balance; break; } @@ -149,67 +149,67 @@ namespace DTXMania public override void On活性化() { - for( int i = 0; i < FIRE_MAX; i++ ) + for (int i = 0; i < FIRE_MAX; i++) { - this.st火花[ i ] = new ST火花(); - this.st火花[ i ].b使用中 = false; - this.st火花[ i ].ct進行 = new CCounter(); + this.st火花[i] = new ST火花(); + this.st火花[i].b使用中 = false; + this.st火花[i].ct進行 = new CCounter(); } - for( int i = 0; i < STAR_MAX; i++ ) + for (int i = 0; i < STAR_MAX; i++) { - this.st青い星[ i ] = new ST青い星(); - this.st青い星[ i ].b使用中 = false; - this.st青い星[ i ].ct進行 = new CCounter(); + this.st青い星[i] = new ST青い星(); + this.st青い星[i].b使用中 = false; + this.st青い星[i].ct進行 = new CCounter(); } - for( int i = 0; i < BIGWAVE_MAX; i++ ) + for (int i = 0; i < BIGWAVE_MAX; i++) { - this.st大波[ i ] = new ST大波(); - this.st大波[ i ].b使用中 = false; - this.st大波[ i ].ct進行 = new CCounter(); - this.stç´°æ³¢[ i ] = new STç´°æ³¢(); - this.stç´°æ³¢[ i ].b使用中 = false; - this.stç´°æ³¢[ i ].ct進行 = new CCounter(); + this.st大波[i] = new ST大波(); + this.st大波[i].b使用中 = false; + this.st大波[i].ct進行 = new CCounter(); + this.stç´°æ³¢[i] = new STç´°æ³¢(); + this.stç´°æ³¢[i].b使用中 = false; + this.stç´°æ³¢[i].ct進行 = new CCounter(); } base.On活性化(); } public override void On非活性化() { - for( int i = 0; i = 0 ) + if (this.st大波[i].ct進行.n現在の値 >= 0) { Matrix matrix3 = Matrix.Identity; - float num10 = ( (float) this.st大波[ i ].ct進行.n現在の値 ) / 100f; - float angle = this.st大波[ i ].f回転単位 + ( this.st大波[ i ].f回転方向 * C変換.DegreeToRadian( (float) ( 60f * num10 ) ) ); + float num10 = ((float)this.st大波[i].ct進行.n現在の値) / 100f; + float angle = this.st大波[i].f回転単位 + (this.st大波[i].f回転方向 * C変換.DegreeToRadian((float)(60f * num10))); float num12 = 1f; - if( num10 < 0.4f ) + if (num10 < 0.4f) { num12 = 2.5f * num10; } - else if( num10 < 0.8f ) + else if (num10 < 0.8f) { - num12 = (float) ( 1.0 + ( 10.1 * ( 1.0 - Math.Cos( ( Math.PI / 2 * ( num10 - 0.4 ) ) * 2.5 ) ) ) ); + num12 = (float)(1.0 + (10.1 * (1.0 - Math.Cos((Math.PI / 2 * (num10 - 0.4)) * 2.5)))); } else { - num12 = 11.1f + ( 12.5f * ( num10 - 0.8f ) ); + num12 = 11.1f + (12.5f * (num10 - 0.8f)); } int num13 = 0xff; - if( num10 < 0.75f ) + if (num10 < 0.75f) { num13 = 0x37; } else { - num13 = (int) ( ( 55f * ( 1f - num10 ) ) / 0.25f ); + num13 = (int)((55f * (1f - num10)) / 0.25f); } - matrix3 *= Matrix.Scaling( num12 * this.st大波[ i ].f半径, num12 * this.st大波[ i ].f半径, 1f ); - matrix3 *= Matrix.RotationZ( angle ); - matrix3 *= Matrix.RotationX( this.st大波[ i ].f角度X ); - matrix3 *= Matrix.RotationY( this.st大波[ i ].f角度Y ); + matrix3 *= Matrix.Scaling(num12 * this.st大波[i].f半径, num12 * this.st大波[i].f半径, 1f); + matrix3 *= Matrix.RotationZ(angle); + matrix3 *= Matrix.RotationX(this.st大波[i].f角度X); + matrix3 *= Matrix.RotationY(this.st大波[i].f角度Y); matrix3 *= Matrix.Translation( - (int)(this.nレーンの中央X座標[ this.st大波[ i ].nLane ] * ( CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left? 1.0 : 0.75)) + - ( ( CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ) ? (float) ( 54 * 3 ) : (float) ( 619 + 12 + 40 ) ) + (int)(this.nレーンの中央X座標[this.st大波[i].nLane] * (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ? 1.0 : 0.75)) + + ((CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left) ? (float)(54 * 3) : (float)(619 + 12 + 40)) - SampleFramework.GameWindowSize.Width / 2, - -( ( CDTXMania.app.ConfigIni.bReverse.Drums ? - (119 + 4) - nJudgeLinePosY_delta_Drums : (942 + 14) + nJudgeLinePosY_delta_Drums ) - - SampleFramework.GameWindowSize.Height / 2 ), - 0f ); - if( this.tx大波 != null ) + -((CDTXMania.app.ConfigIni.bReverse.Drums ? + (119 + 4) - nJudgeLinePosY_delta_Drums : (942 + 14) + nJudgeLinePosY_delta_Drums) + - SampleFramework.GameWindowSize.Height / 2), + 0f); + if (this.tx大波 != null) { this.tx大波.n透明度 = num13; - this.tx大波.t3D描画( CDTXMania.app.Device, matrix3 ); + this.tx大波.t3D描画(CDTXMania.app.Device, matrix3); } } } } - for( int i = 0; i < BIGWAVE_MAX; i++ ) + for (int i = 0; i < BIGWAVE_MAX; i++) { - if( this.stç´°æ³¢[ i ].b使用中 ) + if (this.stç´°æ³¢[i].b使用中) { - this.stç´°æ³¢[ i ].ct進行.t進行(); - if( this.stç´°æ³¢[ i ].ct進行.b終了値に達した ) + this.stç´°æ³¢[i].ct進行.t進行(); + if (this.stç´°æ³¢[i].ct進行.b終了値に達した) { - this.stç´°æ³¢[ i ].ct進行.t停止(); - this.stç´°æ³¢[ i ].b使用中 = false; + this.stç´°æ³¢[i].ct進行.t停止(); + this.stç´°æ³¢[i].b使用中 = false; } - if( this.stç´°æ³¢[ i ].ct進行.n現在の値 >= 0 ) + if (this.stç´°æ³¢[i].ct進行.n現在の値 >= 0) { Matrix matrix4 = Matrix.Identity; - float num15 = ( (float) this.stç´°æ³¢[ i ].ct進行.n現在の値 ) / 100f; + float num15 = ((float)this.stç´°æ³¢[i].ct進行.n現在の値) / 100f; float num16 = 14f * num15; - int num17 = ( num15 < 0.5f ) ? 155 : ( (int) ( ( 155f * ( 1f - num15 ) ) / 1f ) ); + int num17 = (num15 < 0.5f) ? 155 : ((int)((155f * (1f - num15)) / 1f)); matrix4 *= Matrix.Scaling( - num16 * this.stç´°æ³¢[ i ].f半径, - num16 * this.stç´°æ³¢[ i ].f半径, + num16 * this.stç´°æ³¢[i].f半径, + num16 * this.stç´°æ³¢[i].f半径, 1f ); - matrix4 *= Matrix.RotationX( this.stç´°æ³¢[ i ].f角度X ); - matrix4 *= Matrix.RotationY( this.stç´°æ³¢[ i ].f角度Y ); + matrix4 *= Matrix.RotationX(this.stç´°æ³¢[i].f角度X); + matrix4 *= Matrix.RotationY(this.stç´°æ³¢[i].f角度Y); matrix4 *= Matrix.Translation( - (int)( this.nレーンの中央X座標[ this.stç´°æ³¢[ i ].nLane ] * (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left? 1.0 : 0.75 ) ) + - ( ( CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ) ? (float) ( 54 * 3 ) : (float) ( 619 + 12 + 40 ) ) - -SampleFramework.GameWindowSize.Width / 2, - -( ( CDTXMania.app.ConfigIni.bReverse.Drums ? - (119 + 4) - nJudgeLinePosY_delta_Drums : (942 + 14) + nJudgeLinePosY_delta_Drums ) - - SampleFramework.GameWindowSize.Height / 2 ), + (int)(this.nレーンの中央X座標[this.stç´°æ³¢[i].nLane] * (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ? 1.0 : 0.75)) + + ((CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left) ? (float)(54 * 3) : (float)(619 + 12 + 40)) + - SampleFramework.GameWindowSize.Width / 2, + -((CDTXMania.app.ConfigIni.bReverse.Drums ? + (119 + 4) - nJudgeLinePosY_delta_Drums : (942 + 14) + nJudgeLinePosY_delta_Drums) + - SampleFramework.GameWindowSize.Height / 2), 0f ); if (this.txç´°æ³¢ != null) { this.txç´°æ³¢.n透明度 = num17; - this.txç´°æ³¢.t3D描画( CDTXMania.app.Device, matrix4 ); + this.txç´°æ³¢.t3D描画(CDTXMania.app.Device, matrix4); } } } @@ -399,13 +399,13 @@ namespace DTXMania } return 0; } - + // その他 #region [ private ] //----------------- - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] private struct ST火花 { public int nLane; @@ -415,7 +415,7 @@ namespace DTXMania public float f回転方向; public float fサイズ; } - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] private struct STç´°æ³¢ { public int nLane; @@ -426,7 +426,7 @@ namespace DTXMania public float f半径; public int n進行速度ms; } - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] private struct ST青い星 { public int nLane; @@ -442,7 +442,7 @@ namespace DTXMania public float f重力加速度; public float f半径; } - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] private struct ST大波 { public int nLane; @@ -465,10 +465,10 @@ namespace DTXMania private readonly int[] nレーンの中央X座標 = new int[] { 54 * 3 - 54 * 3, 92 * 3 - 54 * 3, 126 * 3 - 54 * 3, 167 * 3 - 54 * 3, 208 * 3 - 54 * 3, 242 * 3 - 54 * 3, 276 * 3 - 54 * 3, 313 * 3 - 54 * 3 }; private const int STAR_MAX = 0x100; - private ST火花[] st火花 = new ST火花[ FIRE_MAX ]; - private ST大波[] st大波 = new ST大波[ BIGWAVE_MAX ]; - private STç´°æ³¢[] stç´°æ³¢ = new STç´°æ³¢[ BIGWAVE_MAX ]; - private ST青い星[] st青い星 = new ST青い星[ STAR_MAX ]; + private ST火花[] st火花 = new ST火花[FIRE_MAX]; + private ST大波[] st大波 = new ST大波[BIGWAVE_MAX]; + private STç´°æ³¢[] stç´°æ³¢ = new STç´°æ³¢[BIGWAVE_MAX]; + private ST青い星[] st青い星 = new ST青い星[STAR_MAX]; private CTexture tx火花; private CTexture txç´°æ³¢; private CTexture tx青い星; diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏DrumsチップファイアGB.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏DrumsチップファイアGB.cs index a1a010d8..635185b0 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏DrumsチップファイアGB.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏DrumsチップファイアGB.cs @@ -10,27 +10,27 @@ namespace DTXMania { // メソッド - public override void Start( int nLane, C演奏判定ライン座標共通 演奏判定ライン座標 ) + public override void Start(int nLane, C演奏判定ライン座標共通 演奏判定ライン座標) { - if( ( nLane < 0 ) && ( nLane > 5 ) ) + if ((nLane < 0) && (nLane > 5)) { throw new IndexOutOfRangeException(); } - E楽器パート e楽器パート = ( nLane < 3 ) ? E楽器パート.GUITAR : E楽器パート.BASS; + E楽器パート e楽器パート = (nLane < 3) ? E楽器パート.GUITAR : E楽器パート.BASS; int index = nLane; - if( CDTXMania.app.ConfigIni.bLeft[ (int) e楽器パート ] ) + if (CDTXMania.app.ConfigIni.bLeft[(int)e楽器パート]) { - index = ( ( index / 3 ) * 3 ) + ( 2 - ( index % 3 ) ); + index = ((index / 3) * 3) + (2 - (index % 3)); } - int x = this.pt中央[ index ].X; + int x = this.pt中央[index].X; if (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Center) { - x -= ( e楽器パート == E楽器パート.GUITAR ) ? 71 : 994; + x -= (e楽器パート == E楽器パート.GUITAR) ? 71 : 994; } //int y = this.pt中央[ index ].Y; - int y = 演奏判定ライン座標.n判定ラインY座標( e楽器パート, false, CDTXMania.app.ConfigIni.bReverse[ (int) e楽器パート ] ); + int y = 演奏判定ライン座標.n判定ラインY座標(e楽器パート, false, CDTXMania.app.ConfigIni.bReverse[(int)e楽器パート]); - base.Start( nLane, x, y, 演奏判定ライン座標 ); + base.Start(nLane, x, y, 演奏判定ライン座標); } diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drumsパッド.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drumsパッド.cs index 1f18d283..819ffdc7 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drumsパッド.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drumsパッド.cs @@ -13,7 +13,7 @@ namespace DTXMania public CAct演奏Drumsパッド() { - this.st基本位置 = new ST基本位置[ 9 ] { + this.st基本位置 = new ST基本位置[9] { new ST基本位置( 22 * 3 - 66, 0, new Rectangle( 0, 0, 170, 130 ) ), new ST基本位置( 61 * 3 - 66, 11, new Rectangle( 170, 0, 170, 130 ) ), new ST基本位置( 96 * 3 - 66, 8, new Rectangle( 340, 0, 170, 130 ) ), @@ -30,10 +30,10 @@ namespace DTXMania // メソッド - public void Hit( int nLane ) + public void Hit(int nLane) { - this.stパッド状態[ nLane ].n明るさ = 6; - this.stパッド状態[ nLane ].nY座標加速度dot = 2; + this.stパッド状態[nLane].n明るさ = 6; + this.stパッド状態[nLane].nY座標加速度dot = 2; } @@ -43,107 +43,107 @@ namespace DTXMania { this.nフラッシュ制御タイマ = -1; this.nY座標制御タイマ = -1; - for ( int i = 0; i < 9; i++ ) + for (int i = 0; i < 9; i++) { - this.stパッド状態[ i ] = new STパッド状態( 0, 0, 0 ); + this.stパッド状態[i] = new STパッド状態(0, 0, 0); } base.On活性化(); } public override void OnManagedリソースの作成() { - if ( !base.b活性化してない ) + if (!base.b活性化してない) { - this.txパッド = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlayDrums pads.png" ) ); - this.tx光るパッド = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenPlayDrums pads flush.png" ) ); + this.txパッド = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenPlayDrums pads.png")); + this.tx光るパッド = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenPlayDrums pads flush.png")); base.OnManagedリソースの作成(); } } public override void OnManagedリソースの解放() { - if ( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.txパッド ); - TextureFactory.tテクスチャの解放( ref this.tx光るパッド ); + TextureFactory.tテクスチャの解放(ref this.txパッド); + TextureFactory.tテクスチャの解放(ref this.tx光るパッド); base.OnManagedリソースの解放(); } } public override int On進行描画() { - if ( !base.b活性化してない ) + if (!base.b活性化してない) { - if ( base.b初めての進行描画 ) + if (base.b初めての進行描画) { this.nフラッシュ制御タイマ = FDK.CSound管理.rc演奏用タイマ.n現在時刻; this.nY座標制御タイマ = FDK.CSound管理.rc演奏用タイマ.n現在時刻; base.b初めての進行描画 = false; } long n現在時刻 = FDK.CSound管理.rc演奏用タイマ.n現在時刻; - if ( n現在時刻 < this.nフラッシュ制御タイマ ) + if (n現在時刻 < this.nフラッシュ制御タイマ) { this.nフラッシュ制御タイマ = n現在時刻; } - while ( ( n現在時刻 - this.nフラッシュ制御タイマ ) >= 15 ) + while ((n現在時刻 - this.nフラッシュ制御タイマ) >= 15) { - for ( int i = 0; i < 9; i++ ) + for (int i = 0; i < 9; i++) { - if ( this.stパッド状態[ i ].n明るさ > 0 ) + if (this.stパッド状態[i].n明るさ > 0) { - this.stパッド状態[ i ].n明るさ--; + this.stパッド状態[i].n明るさ--; } } this.nフラッシュ制御タイマ += 15; } n現在時刻 = FDK.CSound管理.rc演奏用タイマ.n現在時刻; - if ( n現在時刻 < this.nY座標制御タイマ ) + if (n現在時刻 < this.nY座標制御タイマ) { this.nY座標制御タイマ = n現在時刻; } - while ( ( n現在時刻 - this.nY座標制御タイマ ) >= 5 ) + while ((n現在時刻 - this.nY座標制御タイマ) >= 5) { - for ( int i = 0; i < 9; i++ ) + for (int i = 0; i < 9; i++) { - this.stパッド状態[ i ].nY座標オフセットdot += this.stパッド状態[ i ].nY座標加速度dot; - if ( this.stパッド状態[ i ].nY座標オフセットdot > 15 ) + this.stパッド状態[i].nY座標オフセットdot += this.stパッド状態[i].nY座標加速度dot; + if (this.stパッド状態[i].nY座標オフセットdot > 15) { - this.stパッド状態[ i ].nY座標オフセットdot = 15; - this.stパッド状態[ i ].nY座標加速度dot = -1; + this.stパッド状態[i].nY座標オフセットdot = 15; + this.stパッド状態[i].nY座標加速度dot = -1; } - else if ( this.stパッド状態[ i ].nY座標オフセットdot < 0 ) + else if (this.stパッド状態[i].nY座標オフセットdot < 0) { - this.stパッド状態[ i ].nY座標オフセットdot = 0; - this.stパッド状態[ i ].nY座標加速度dot = 0; + this.stパッド状態[i].nY座標オフセットdot = 0; + this.stパッド状態[i].nY座標加速度dot = 0; } } this.nY座標制御タイマ += 5; } #region [ 表示 ] - for ( int i = 0; i < 9; i++ ) + for (int i = 0; i < 9; i++) { - int index = this.n描画順[ i ]; - int x = this.st基本位置[ index ].x; - int xDist = (int) (x * ( CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ? 1.0 : 0.75 )); - x = ( CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left )? 66 : 619-24; + int index = this.n描画順[i]; + int x = this.st基本位置[index].x; + int xDist = (int)(x * (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ? 1.0 : 0.75)); + x = (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left) ? 66 : 619 - 24; x += xDist; - int y = ( this.st基本位置[ index ].y + ( CDTXMania.app.ConfigIni.bReverse.Drums ? -10 : 0x19e ) ) + this.stパッド状態[ index ].nY座標オフセットdot; - if ( this.txパッド != null ) + int y = (this.st基本位置[index].y + (CDTXMania.app.ConfigIni.bReverse.Drums ? -10 : 0x19e)) + this.stパッド状態[index].nY座標オフセットdot; + if (this.txパッド != null) { // this.txパッド.vc拡大縮小倍率.X = ( CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ) ? 1.0f : 0.75f; this.txパッド.t2D描画( CDTXMania.app.Device, x, y * Scale.Y, - this.st基本位置[ index ].rc + this.st基本位置[index].rc ); } - if ( this.tx光るパッド != null ) + if (this.tx光るパッド != null) { // this.tx光るパッド.vc拡大縮小倍率.X = ( CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ) ? 1.0f : 0.75f; - this.tx光るパッド.n透明度 = ( this.stパッド状態[ index ].n明るさ * 40 ) + 15; + this.tx光るパッド.n透明度 = (this.stパッド状態[index].n明るさ * 40) + 15; this.tx光るパッド.t2D描画( CDTXMania.app.Device, x, y * Scale.Y, - this.st基本位置[ index ].rc ); + this.st基本位置[index].rc); } } #endregion @@ -156,7 +156,7 @@ namespace DTXMania #region [ private ] //----------------- - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] private struct STパッド状態 { public int n明るさ; @@ -169,7 +169,7 @@ namespace DTXMania nY座標加速度dot = nY座標加速度dot_; } } - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] private struct ST基本位置 { public int x; @@ -187,7 +187,7 @@ namespace DTXMania private long nY座標制御タイマ; private long nフラッシュ制御タイマ; private readonly int[] n描画順 = new int[] { 3, 6, 5, 4, 2, 1, 8, 7, 0 }; - private STパッド状態[] stパッド状態 = new STパッド状態[ 9 ]; + private STパッド状態[] stパッド状態 = new STパッド状態[9]; private readonly ST基本位置[] st基本位置; private CTexture txパッド; private CTexture tx光るパッド; diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏DrumsレーンフラッシュD.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏DrumsレーンフラッシュD.cs index 6bb93f38..21bb4048 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏DrumsレーンフラッシュD.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏DrumsレーンフラッシュD.cs @@ -13,7 +13,7 @@ namespace DTXMania public CAct演奏DrumsレーンフラッシュD() { - this.stレーンサイズ = new STレーンサイズ[ 8 ] + this.stレーンサイズ = new STレーンサイズ[8] { new STレーンサイズ( 36 * 3 - 36 * 3, 36 ), new STレーンサイズ( 77 * 3 - 36 * 3, 30 ), @@ -48,10 +48,10 @@ namespace DTXMania // メソッド - public void Start( Eレーン lane, float f強弱度合い ) + public void Start(Eレーン lane, float f強弱度合い) { - int num = (int) ( ( 1f - f強弱度合い ) * 55f ); - this.ct進行[ (int) lane ] = new CCounter( num, 100, 4, CDTXMania.app.Timer ); + int num = (int)((1f - f強弱度合い) * 55f); + this.ct進行[(int)lane] = new CCounter(num, 100, 4, CDTXMania.app.Timer); } @@ -59,87 +59,87 @@ namespace DTXMania public override void On活性化() { - for ( int i = 0; i < 8; i++ ) + for (int i = 0; i < 8; i++) { - this.ct進行[ i ] = new CCounter(); + this.ct進行[i] = new CCounter(); } base.On活性化(); } public override void On非活性化() { - for ( int i = 0; i < 8; i++ ) + for (int i = 0; i < 8; i++) { - this.ct進行[ i ] = null; + this.ct進行[i] = null; } base.On非活性化(); } public override void OnManagedリソースの作成() { - if ( !base.b活性化してない ) + if (!base.b活性化してない) { - for ( int i = 0; i < 0x10; i++ ) + for (int i = 0; i < 0x10; i++) { - this.txFlush[ i ] = TextureFactory.tテクスチャの生成Af( CSkin.Path( this.strファイル名[ i ] ) ); + this.txFlush[i] = TextureFactory.tテクスチャの生成Af(CSkin.Path(this.strファイル名[i])); } base.OnManagedリソースの作成(); } } public override void OnManagedリソースの解放() { - if ( !base.b活性化してない ) + if (!base.b活性化してない) { - for ( int i = 0; i < 0x10; i++ ) + for (int i = 0; i < 0x10; i++) { - TextureFactory.tテクスチャの解放( ref this.txFlush[ i ] ); + TextureFactory.tテクスチャの解放(ref this.txFlush[i]); } base.OnManagedリソースの解放(); } } public override int On進行描画() { - if ( !base.b活性化してない ) + if (!base.b活性化してない) { - for ( int i = 0; i < 8; i++ ) + for (int i = 0; i < 8; i++) { - if ( !this.ct進行[ i ].b停止中 ) + if (!this.ct進行[i].b停止中) { - this.ct進行[ i ].t進行(); - if ( this.ct進行[ i ].b終了値に達した ) + this.ct進行[i].t進行(); + if (this.ct進行[i].b終了値に達した) { - this.ct進行[ i ].t停止(); + this.ct進行[i].t停止(); } } } - for ( int j = 0; j < 8; j++ ) + for (int j = 0; j < 8; j++) { - if ( !this.ct進行[ j ].b停止中 ) + if (!this.ct進行[j].b停止中) { - int x = this.stレーンサイズ[ j ].x; - int w = this.stレーンサイズ[ j ].w; + int x = this.stレーンサイズ[j].x; + int w = this.stレーンサイズ[j].w; - x = (int) ( x * ( CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ? 1.0 : 0.75 ) ); - x += ( CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ) ? 36 * 3 : 619 - 24 + 36; - w = (int) ( w * ( CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ? 1.0 : 0.75 ) ); + x = (int)(x * (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ? 1.0 : 0.75)); + x += (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left) ? 36 * 3 : 619 - 24 + 36; + w = (int)(w * (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ? 1.0 : 0.75)); //for ( int k = 0; k < 3; k++ ) int k = 0; { - if ( CDTXMania.app.ConfigIni.bReverse.Drums ) + if (CDTXMania.app.ConfigIni.bReverse.Drums) { - int y = ( k * 0x80 ) - ( ( this.ct進行[ j ].n現在の値 * 0x180 ) / 100 ); - for ( int m = 0; m < w; m += 42 ) + int y = (k * 0x80) - ((this.ct進行[j].n現在の値 * 0x180) / 100); + for (int m = 0; m < w; m += 42) { - if ( this.txFlush[ j + 8 ] != null ) + if (this.txFlush[j + 8] != null) { - this.txFlush[ j + 8 ].t2D描画( + this.txFlush[j + 8].t2D描画( CDTXMania.app.Device, - ( x + m ), + (x + m), y * Scale.Y, new Rectangle( - (int) ( ( k * 0x2a ) * Scale.X ), + (int)((k * 0x2a) * Scale.X), 0, - ( ( w - m ) < 0x2a ) ? (int) ( ( w - m ) * Scale.X ) : (int) ( 0x2a * Scale.X ), - (int) ( 0x80 * 3 * Scale.Y ) + ((w - m) < 0x2a) ? (int)((w - m) * Scale.X) : (int)(0x2a * Scale.X), + (int)(0x80 * 3 * Scale.Y) ) ); } @@ -147,22 +147,22 @@ namespace DTXMania } else { - int y = ( 0x60 + ( k * 0x80 ) ) + ( ( this.ct進行[ j ].n現在の値 * 0x180 ) / 100 ); - if ( y < 480 ) + int y = (0x60 + (k * 0x80)) + ((this.ct進行[j].n現在の値 * 0x180) / 100); + if (y < 480) { - for ( int n = 0; n < w; n += 42 ) + for (int n = 0; n < w; n += 42) { - if ( this.txFlush[ j ] != null ) + if (this.txFlush[j] != null) { - this.txFlush[ j ].t2D描画( + this.txFlush[j].t2D描画( CDTXMania.app.Device, - ( x + n ), - (int) ( y * Scale.Y ), + (x + n), + (int)(y * Scale.Y), new Rectangle( - (int) ( k * 0x2a * Scale.X ), + (int)(k * 0x2a * Scale.X), 0, - ( ( w - n ) < 0x2a ) ? (int) ( ( w - n ) * Scale.X ) : (int) ( 0x2a * Scale.X ), - (int) ( 0x80 * 3 * Scale.Y ) + ((w - n) < 0x2a) ? (int)((w - n) * Scale.X) : (int)(0x2a * Scale.X), + (int)(0x80 * 3 * Scale.Y) ) ); } @@ -181,22 +181,22 @@ namespace DTXMania #region [ private ] //----------------- - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] private struct STレーンサイズ { public int x; public int w; - public STレーンサイズ( int x_, int w_ ) + public STレーンサイズ(int x_, int w_) { x = x_; w = w_; } } - private CCounter[] ct進行 = new CCounter[ 8 ]; + private CCounter[] ct進行 = new CCounter[8]; private readonly string[] strファイル名; private readonly STレーンサイズ[] stレーンサイズ; - private CTextureAf[] txFlush = new CTextureAf[ 0x10 ]; + private CTextureAf[] txFlush = new CTextureAf[0x10]; //----------------- #endregion } diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏DrumsレーンフラッシュGB.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏DrumsレーンフラッシュGB.cs index d9feedbd..793adaff 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏DrumsレーンフラッシュGB.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏DrumsレーンフラッシュGB.cs @@ -12,22 +12,22 @@ namespace DTXMania public override int On進行描画() { - if ( !base.b活性化してない ) + if (!base.b活性化してない) { - for ( int i = 0; i < 6; i++ ) + for (int i = 0; i < 6; i++) { - if ( !base.ct進行[ i ].b停止中 ) + if (!base.ct進行[i].b停止中) { - E楽器パート e楽器パート = ( i < 3 ) ? E楽器パート.GUITAR : E楽器パート.BASS; - CTextureAf texture = CDTXMania.app.ConfigIni.bReverse[ (int) e楽器パート ] ? base.txFlush[ ( i % 3 ) + 3 ] : base.txFlush[ i % 3 ]; - int bLeft = CDTXMania.app.ConfigIni.bLeft[ (int) e楽器パート ] ? 1 : 0; - int x = ( ( ( i < 3 ) ? 1521 : 1194 ) + this.nRGBのX座標[ bLeft, i ] * 3 ) + ( ( 16 * base.ct進行[ i ].n現在の値 ) / 100 ) * 3; + E楽器パート e楽器パート = (i < 3) ? E楽器パート.GUITAR : E楽器パート.BASS; + CTextureAf texture = CDTXMania.app.ConfigIni.bReverse[(int)e楽器パート] ? base.txFlush[(i % 3) + 3] : base.txFlush[i % 3]; + int bLeft = CDTXMania.app.ConfigIni.bLeft[(int)e楽器パート] ? 1 : 0; + int x = (((i < 3) ? 1521 : 1194) + this.nRGBのX座標[bLeft, i] * 3) + ((16 * base.ct進行[i].n現在の値) / 100) * 3; if (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Center) { - x -= ( e楽器パート == E楽器パート.GUITAR ) ? 71 : 994; + x -= (e楽器パート == E楽器パート.GUITAR) ? 71 : 994; } - int y = ( ( i < 3 ) ? 0x39 : 0x39 ); - if ( texture != null ) + int y = ((i < 3) ? 0x39 : 0x39); + if (texture != null) { texture.t2D描画( CDTXMania.app.Device, @@ -36,15 +36,15 @@ namespace DTXMania new Rectangle( 0, //(int) ( ( j * 0x20 ) * Scale.X ), 0, - (int) ( ( 0x18 * ( 100 - base.ct進行[ i ].n現在の値 ) ) / 100 * Scale.X ), - (int) ( 0x76 * 3 * Scale.Y ) + (int)((0x18 * (100 - base.ct進行[i].n現在の値)) / 100 * Scale.X), + (int)(0x76 * 3 * Scale.Y) ) ); } - base.ct進行[ i ].t進行(); - if ( base.ct進行[ i ].b終了値に達した ) + base.ct進行[i].t進行(); + if (base.ct進行[i].b終了値に達した) { - base.ct進行[ i ].t停止(); + base.ct進行[i].t停止(); } } } @@ -57,7 +57,7 @@ namespace DTXMania #region [ private ] //----------------- - private readonly int[ , ] nRGBのX座標 = new int[ , ] { { 2, 0x1c, 0x36, 2, 0x1c, 0x36 }, { 0x36, 0x1c, 2, 0x36, 0x1c, 2 } }; + private readonly int[,] nRGBのX座標 = new int[,] { { 2, 0x1c, 0x36, 2, 0x1c, 0x36 }, { 0x36, 0x1c, 2, 0x36, 0x1c, 2 } }; //----------------- #endregion } diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drums判定文字列.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drums判定文字列.cs index 3de4af8c..00ba9418 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drums判定文字列.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drums判定文字列.cs @@ -13,7 +13,7 @@ namespace DTXMania public CAct演奏Drums判定文字列() { - this.stレーンサイズ = new STレーンサイズ[ 12 ] + this.stレーンサイズ = new STレーンサイズ[12] { new STレーンサイズ( 36 - 36, 36 ), new STレーンサイズ( 77 - 36, 30 ), @@ -36,265 +36,265 @@ namespace DTXMania //} base.b活性化してない = true; } - - + + // CActivity 実装(共通クラスからの差分のみ) public override int On進行描画() { - throw new InvalidOperationException( "t進行描画(C演奏判定ライン座標共通 演奏判定ライン共通 ) のほうを使用してください。" ); + throw new InvalidOperationException("t進行描画(C演奏判定ライン座標共通 演å¥åˆ¤å®šãƒ©ã‚¤ãƒ³å…±é€š ) のほうを使用してください。"); } - public override int t進行描画( C演奏判定ライン座標共通 演奏判定ライン座標 ) + public override int t進行描画(C演奏判定ライン座標共通 演奏判定ライン座標) { - if( !base.b活性化してない ) + if (!base.b活性化してない) { #region [ 表示拡大率の設定 ] - for ( int i = 0; i < 12; i++ ) + for (int i = 0; i < 12; i++) { - if( !base.st状態[ i ].ct進行.b停止中 ) + if (!base.st状態[i].ct進行.b停止中) { - base.st状態[ i ].ct進行.t進行(); - if( base.st状態[ i ].ct進行.b終了値に達した ) + base.st状態[i].ct進行.t進行(); + if (base.st状態[i].ct進行.b終了値に達した) { - base.st状態[ i ].ct進行.t停止(); + base.st状態[i].ct進行.t停止(); } - int num2 = base.st状態[ i ].ct進行.n現在の値; - if( ( base.st状態[ i ].judge != E判定.Miss ) && ( base.st状態[ i ].judge != E判定.Bad ) ) + int num2 = base.st状態[i].ct進行.n現在の値; + if ((base.st状態[i].judge != E判定.Miss) && (base.st状態[i].judge != E判定.Bad)) { - if( num2 < 50 ) + if (num2 < 50) { - base.st状態[ i ].fX方向拡大率 = 1f + ( 1f * ( 1f - ( ( (float) num2 ) / 50f ) ) ); - base.st状態[ i ].fY方向拡大率 = ( (float) num2 ) / 50f; - base.st状態[ i ].n相対X座標 = 0; - base.st状態[ i ].n相対Y座標 = 0; - base.st状態[ i ].n透明度 = 0xff; + base.st状態[i].fX方向拡大率 = 1f + (1f * (1f - (((float)num2) / 50f))); + base.st状態[i].fY方向拡大率 = ((float)num2) / 50f; + base.st状態[i].n相対X座標 = 0; + base.st状態[i].n相対Y座標 = 0; + base.st状態[i].n透明度 = 0xff; } - else if( num2 < 130 ) + else if (num2 < 130) { - base.st状態[ i ].fX方向拡大率 = 1f; - base.st状態[ i ].fY方向拡大率 = 1f; - base.st状態[ i ].n相対X座標 = 0; - base.st状態[ i ].n相対Y座標 = ( ( num2 % 6 ) == 0 ) ? ( CDTXMania.app.Random.Next( 6 ) - 3 ) : base.st状態[ i ].n相対Y座標; - base.st状態[ i ].n透明度 = 0xff; + base.st状態[i].fX方向拡大率 = 1f; + base.st状態[i].fY方向拡大率 = 1f; + base.st状態[i].n相対X座標 = 0; + base.st状態[i].n相対Y座標 = ((num2 % 6) == 0) ? (CDTXMania.app.Random.Next(6) - 3) : base.st状態[i].n相対Y座標; + base.st状態[i].n透明度 = 0xff; } - else if( num2 >= 240 ) + else if (num2 >= 240) { - base.st状態[ i ].fX方向拡大率 = 1f; - base.st状態[ i ].fY方向拡大率 = 1f - ( ( 1f * ( num2 - 240 ) ) / 60f ); - base.st状態[ i ].n相対X座標 = 0; - base.st状態[ i ].n相対Y座標 = 0; - base.st状態[ i ].n透明度 = 0xff; + base.st状態[i].fX方向拡大率 = 1f; + base.st状態[i].fY方向拡大率 = 1f - ((1f * (num2 - 240)) / 60f); + base.st状態[i].n相対X座標 = 0; + base.st状態[i].n相対Y座標 = 0; + base.st状態[i].n透明度 = 0xff; } else { - base.st状態[ i ].fX方向拡大率 = 1f; - base.st状態[ i ].fY方向拡大率 = 1f; - base.st状態[ i ].n相対X座標 = 0; - base.st状態[ i ].n相対Y座標 = 0; - base.st状態[ i ].n透明度 = 0xff; + base.st状態[i].fX方向拡大率 = 1f; + base.st状態[i].fY方向拡大率 = 1f; + base.st状態[i].n相対X座標 = 0; + base.st状態[i].n相対Y座標 = 0; + base.st状態[i].n透明度 = 0xff; } } - else if( num2 < 50 ) + else if (num2 < 50) { - base.st状態[ i ].fX方向拡大率 = 1f; - base.st状態[ i ].fY方向拡大率 = ( (float) num2 ) / 50f; - base.st状態[ i ].n相対X座標 = 0; - base.st状態[ i ].n相対Y座標 = 0; - base.st状態[ i ].n透明度 = 0xff; + base.st状態[i].fX方向拡大率 = 1f; + base.st状態[i].fY方向拡大率 = ((float)num2) / 50f; + base.st状態[i].n相対X座標 = 0; + base.st状態[i].n相対Y座標 = 0; + base.st状態[i].n透明度 = 0xff; } - else if( num2 >= 200 ) + else if (num2 >= 200) { - base.st状態[ i ].fX方向拡大率 = 1f - ( ( (float) ( num2 - 200 ) ) / 100f ); - base.st状態[ i ].fY方向拡大率 = 1f - ( ( (float) ( num2 - 200 ) ) / 100f ); - base.st状態[ i ].n相対X座標 = 0; - base.st状態[ i ].n相対Y座標 = 0; - base.st状態[ i ].n透明度 = 0xff; + base.st状態[i].fX方向拡大率 = 1f - (((float)(num2 - 200)) / 100f); + base.st状態[i].fY方向拡大率 = 1f - (((float)(num2 - 200)) / 100f); + base.st状態[i].n相対X座標 = 0; + base.st状態[i].n相対Y座標 = 0; + base.st状態[i].n透明度 = 0xff; } else { - base.st状態[ i ].fX方向拡大率 = 1f; - base.st状態[ i ].fY方向拡大率 = 1f; - base.st状態[ i ].n相対X座標 = 0; - base.st状態[ i ].n相対Y座標 = 0; - base.st状態[ i ].n透明度 = 0xff; + base.st状態[i].fX方向拡大率 = 1f; + base.st状態[i].fY方向拡大率 = 1f; + base.st状態[i].n相対X座標 = 0; + base.st状態[i].n相対Y座標 = 0; + base.st状態[i].n透明度 = 0xff; } } } #endregion - for( int j = 0; j < 12; j++ ) + for (int j = 0; j < 12; j++) { - if( !base.st状態[ j ].ct進行.b停止中 ) + if (!base.st状態[j].ct進行.b停止中) { - int index = base.st判定文字列[ (int) base.st状態[ j ].judge ].n画像番号; + int index = base.st判定文字列[(int)base.st状態[j].judge].n画像番号; int baseX = 0; int baseY = 0; #region [ Drums 判定文字列 baseX/Y生成 ] - if ( j < 8 ) // Drums + if (j < 8) // Drums { - if ( CDTXMania.app.ConfigIni.判定文字表示位置.Drums == E判定文字表示位置.表示OFF ) + if (CDTXMania.app.ConfigIni.判定文字表示位置.Drums == E判定文字表示位置.表示OFF) { continue; } - baseX = this.stレーンサイズ[ j ].x; - baseX = (int) ( baseX * ( CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ? 1.0 : 0.75 ) ); - baseX += ( CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left? 36 : 205 ); + baseX = this.stレーンサイズ[j].x; + baseX = (int)(baseX * (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ? 1.0 : 0.75)); + baseX += (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ? 36 : 205); baseY = CDTXMania.app.ConfigIni.bReverse.Drums ? - ( ( ( (E判定文字表示位置) CDTXMania.app.ConfigIni.判定文字表示位置.Drums ) == E判定文字表示位置.レーン上 ) ? ( 240 + ( this.n文字の縦表示位置[ j ] * 0x20 ) ) : 50 ) : - ( ( ( (E判定文字表示位置) CDTXMania.app.ConfigIni.判定文字表示位置.Drums ) == E判定文字表示位置.レーン上 ) ? ( 180 + ( this.n文字の縦表示位置[ j ] * 0x20 ) ) : 450 ); - baseY = (int) ( baseY * Scale.Y ); + ((((E判定文字表示位置)CDTXMania.app.ConfigIni.判定文字表示位置.Drums) == E判定文字表示位置.レーン上) ? (240 + (this.n文字の縦表示位置[j] * 0x20)) : 50) : + ((((E判定文字表示位置)CDTXMania.app.ConfigIni.判定文字表示位置.Drums) == E判定文字表示位置.レーン上) ? (180 + (this.n文字の縦表示位置[j] * 0x20)) : 450); + baseY = (int)(baseY * Scale.Y); } #endregion #region [ Bass 判定文字列描画 baseX/Y生成 ] - else if( j == 11 ) // Bass + else if (j == 11) // Bass { - if( ( (E判定文字表示位置) CDTXMania.app.ConfigIni.判定文字表示位置.Bass ) == E判定文字表示位置.表示OFF ) + if (((E判定文字表示位置)CDTXMania.app.ConfigIni.判定文字表示位置.Bass) == E判定文字表示位置.表示OFF) { continue; } int yB; - switch ( CDTXMania.app.ConfigIni.判定文字表示位置.Bass ) + switch (CDTXMania.app.ConfigIni.判定文字表示位置.Bass) { case E判定文字表示位置.コンボ下: - baseX = this.stレーンサイズ[ j ].x + 36; - if ( CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Center) + baseX = this.stレーンサイズ[j].x + 36; + if (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Center) { - baseX -= 331+1; + baseX -= 331 + 1; } - yB = 演奏判定ライン座標.n判定ラインY座標( E楽器パート.BASS, false, CDTXMania.app.ConfigIni.bReverse.Bass ); + yB = 演奏判定ライン座標.n判定ラインY座標(E楽器パート.BASS, false, CDTXMania.app.ConfigIni.bReverse.Bass); baseY = ( CDTXMania.app.ConfigIni.bReverse.Bass ? - yB + (int) ( ( -124 + 0 ) * Scale.Y ) : - yB + (int) ( ( +184 + 0 ) * Scale.Y ) + yB + (int)((-124 + 0) * Scale.Y) : + yB + (int)((+184 + 0) * Scale.Y) ) - + (int) ( this.n文字の縦表示位置[ j ] * 0x20 * Scale.Y ); + + (int)(this.n文字の縦表示位置[j] * 0x20 * Scale.Y); break; case E判定文字表示位置.レーン上: - baseX = this.stレーンサイズ[ j ].x + 36; - if ( CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Center) + baseX = this.stレーンサイズ[j].x + 36; + if (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Center) { - baseX -= 331+1; + baseX -= 331 + 1; } //baseY = ( CDTXMania.app.ConfigIni.bReverse.Bass ? 240 : 180 ) + ( this.n文字の縦表示位置[ j ] * 0x20 ); - yB = 演奏判定ライン座標.n判定ラインY座標( E楽器パート.BASS, false, CDTXMania.app.ConfigIni.bReverse.Bass ); + yB = 演奏判定ライン座標.n判定ラインY座標(E楽器パート.BASS, false, CDTXMania.app.ConfigIni.bReverse.Bass); baseY = ( CDTXMania.app.ConfigIni.bReverse.Bass ? - yB - (int) ( 134 * Scale.Y ) : - yB + (int) ( 75 * Scale.Y ) + yB - (int)(134 * Scale.Y) : + yB + (int)(75 * Scale.Y) ) - + (int) ( this.n文字の縦表示位置[ j ] * 0x20 * Scale.Y ); + + (int)(this.n文字の縦表示位置[j] * 0x20 * Scale.Y); break; case E判定文字表示位置.判定ライン上: - baseX = this.stレーンサイズ[ j ].x + 36; - if ( CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Center) + baseX = this.stレーンサイズ[j].x + 36; + if (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Center) { - baseX -= 331+1; + baseX -= 331 + 1; } - yB = 演奏判定ライン座標.n判定ラインY座標( E楽器パート.BASS, false, CDTXMania.app.ConfigIni.bReverse.Bass ); + yB = 演奏判定ライン座標.n判定ラインY座標(E楽器パート.BASS, false, CDTXMania.app.ConfigIni.bReverse.Bass); baseY = CDTXMania.app.ConfigIni.bReverse.Bass ? - yB + (int) ( 20 * Scale.Y ) : - yB - (int) ( 24 * Scale.Y ); + yB + (int)(20 * Scale.Y) : + yB - (int)(24 * Scale.Y); break; } } #endregion #region [ Guitar 判定文字列描画 baseX/Y生成 ] - else if( j == 10 ) // Guitar + else if (j == 10) // Guitar { - if( ( (E判定文字表示位置) CDTXMania.app.ConfigIni.判定文字表示位置.Guitar ) == E判定文字表示位置.表示OFF ) + if (((E判定文字表示位置)CDTXMania.app.ConfigIni.判定文字表示位置.Guitar) == E判定文字表示位置.表示OFF) { continue; } int yG; - switch ( CDTXMania.app.ConfigIni.判定文字表示位置.Guitar ) + switch (CDTXMania.app.ConfigIni.判定文字表示位置.Guitar) { - case E判定文字表示位置.コンボ下: - baseX = ( CDTXMania.app.DTX.bチップがある.Bass ) ? this.stレーンサイズ[ j ].x + 36 : 0x198; - if ( CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Center) + case E判定文字表示位置.コンボ下: + baseX = (CDTXMania.app.DTX.bチップがある.Bass) ? this.stレーンサイズ[j].x + 36 : 0x198; + if (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Center) { - baseX = this.stレーンサイズ[ j ].x + 36; // 判定表示がドラムレーンにかぶらないよう、ベース有りの時と同じ表示方法にする + baseX = this.stレーンサイズ[j].x + 36; // 判定表示がドラムレーンにかぶらないよう、ベース有りの時と同じ表示方法にする baseX -= 24 + 1; } - yG = 演奏判定ライン座標.n判定ラインY座標( E楽器パート.GUITAR, false, CDTXMania.app.ConfigIni.bReverse.Guitar ); + yG = 演奏判定ライン座標.n判定ラインY座標(E楽器パート.GUITAR, false, CDTXMania.app.ConfigIni.bReverse.Guitar); baseY = ( CDTXMania.app.ConfigIni.bReverse.Guitar ? - yG + (int) ( ( -124 + 0 ) * Scale.Y ) : - yG + (int) ( ( +184 + 0 ) * Scale.Y ) + yG + (int)((-124 + 0) * Scale.Y) : + yG + (int)((+184 + 0) * Scale.Y) ) - + (int) ( this.n文字の縦表示位置[ j ] * 0x20 * Scale.Y ); + + (int)(this.n文字の縦表示位置[j] * 0x20 * Scale.Y); break; - case E判定文字表示位置.レーン上: - baseX = ( CDTXMania.app.DTX.bチップがある.Bass ) ? this.stレーンサイズ[ j ].x + 36 : 0x198; - if ( CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Center) + case E判定文字表示位置.レーン上: + baseX = (CDTXMania.app.DTX.bチップがある.Bass) ? this.stレーンサイズ[j].x + 36 : 0x198; + if (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Center) { - baseX = this.stレーンサイズ[ j ].x + 36; // 判定表示がドラムレーンにかぶらないよう、ベース有りの時と同じ表示方法にする - baseX -= 24+1; + baseX = this.stレーンサイズ[j].x + 36; // 判定表示がドラムレーンにかぶらないよう、ベース有りの時と同じ表示方法にする + baseX -= 24 + 1; } //baseY = ( CDTXMania.app.ConfigIni.bReverse.Guitar ? 240 : 180 ) + ( this.n文字の縦表示位置[ j ] * 0x20 ); - yG = 演奏判定ライン座標.n判定ラインY座標( E楽器パート.GUITAR, false, CDTXMania.app.ConfigIni.bReverse.Guitar ); + yG = 演奏判定ライン座標.n判定ラインY座標(E楽器パート.GUITAR, false, CDTXMania.app.ConfigIni.bReverse.Guitar); baseY = ( CDTXMania.app.ConfigIni.bReverse.Guitar ? - yG - (int) ( 134 * Scale.Y ): - yG + (int) ( 75 * Scale.Y ) + yG - (int)(134 * Scale.Y) : + yG + (int)(75 * Scale.Y) ) - + (int) ( this.n文字の縦表示位置[ j ] * 0x20 * Scale.Y ); + + (int)(this.n文字の縦表示位置[j] * 0x20 * Scale.Y); break; - case E判定文字表示位置.判定ライン上: - baseX = ( CDTXMania.app.DTX.bチップがある.Bass ) ? this.stレーンサイズ[ j ].x + 36 : 0x198; - if ( CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Center) + case E判定文字表示位置.判定ライン上: + baseX = (CDTXMania.app.DTX.bチップがある.Bass) ? this.stレーンサイズ[j].x + 36 : 0x198; + if (CDTXMania.app.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Center) { - baseX = this.stレーンサイズ[ j ].x + 36; // 判定表示がドラムレーンにかぶらないよう、ベース有りの時と同じ表示方法にする + baseX = this.stレーンサイズ[j].x + 36; // 判定表示がドラムレーンにかぶらないよう、ベース有りの時と同じ表示方法にする baseX -= 24 + 1; } - yG = 演奏判定ライン座標.n判定ラインY座標( E楽器パート.GUITAR, false, CDTXMania.app.ConfigIni.bReverse.Guitar ); - baseY = CDTXMania.app.ConfigIni.bReverse.Guitar ? - yG + (int) ( 20 * Scale.Y ) : - yG - (int) ( 24 * Scale.Y ); + yG = 演奏判定ライン座標.n判定ラインY座標(E楽器パート.GUITAR, false, CDTXMania.app.ConfigIni.bReverse.Guitar); + baseY = CDTXMania.app.ConfigIni.bReverse.Guitar ? + yG + (int)(20 * Scale.Y) : + yG - (int)(24 * Scale.Y); break; } } #endregion - int xc = (int) ( ( ( ( baseX + base.st状態[ j ].n相対X座標 ) + ( this.stレーンサイズ[ j ].w / 2 ) ) ) * Scale.X ); // Xcenter座標 - int x = xc - ( (int) ( ( ( 256f / 2 ) * base.st状態[ j ].fX方向拡大率 ) * ( ( j < 10 ) ? 1.0 : 0.7 ) ) ); - int y = (int) ( baseY + ( base.st状態[ j ].n相対Y座標 ) * Scale.Y ) - ( (int) ( ( ( ( 256f / 3 ) * base.st状態[ j ].fY方向拡大率 ) * ( ( j < 10 ) ? 1.0 : 0.7 ) ) / 2.0 ) ); + int xc = (int)((((baseX + base.st状態[j].n相対X座標) + (this.stレーンサイズ[j].w / 2))) * Scale.X); // Xcenter座標 + int x = xc - ((int)(((256f / 2) * base.st状態[j].fX方向拡大率) * ((j < 10) ? 1.0 : 0.7))); + int y = (int)(baseY + (base.st状態[j].n相対Y座標) * Scale.Y) - ((int)((((256f / 3) * base.st状態[j].fY方向拡大率) * ((j < 10) ? 1.0 : 0.7)) / 2.0)); //int xc = ( ( baseX + base.st状態[ j ].n相対X座標 ) + ( this.stレーンサイズ[ j ].w / 2 ) ); // Xcenter座標 //int x = xc - ( (int) ( ( 64f * base.st状態[ j ].fX方向拡大率 ) * ( ( j < 10 ) ? 1.0 : 0.7 ) ) ); //int y = ( baseY + base.st状態[ j ].n相対Y座標 ) - ( (int) ( ( ( 43f * base.st状態[ j ].fY方向拡大率 ) * ( ( j < 10 ) ? 1.0 : 0.7 ) ) / 2.0 ) ); - if( base.tx判定文字列[ index ] != null ) + if (base.tx判定文字列[index] != null) { - base.tx判定文字列[ index ].n透明度 = base.st状態[ j ].n透明度; - base.tx判定文字列[ index ].vc拡大縮小倍率 = new Vector3( (float) ( base.st状態[ j ].fX方向拡大率 * ( ( j < 10 ) ? 1.0 : 0.7 ) ), (float) ( base.st状態[ j ].fY方向拡大率 * ( ( j < 10 ) ? 1.0 : 0.7 ) ), 1f ); - base.tx判定文字列[ index ].t2D描画( + base.tx判定文字列[index].n透明度 = base.st状態[j].n透明度; + base.tx判定文字列[index].vc拡大縮小倍率 = new Vector3((float)(base.st状態[j].fX方向拡大率 * ((j < 10) ? 1.0 : 0.7)), (float)(base.st状態[j].fY方向拡大率 * ((j < 10) ? 1.0 : 0.7)), 1f); + base.tx判定文字列[index].t2D描画( CDTXMania.app.Device, x, y, - base.st判定文字列[ (int) base.st状態[ j ].judge ].rc + base.st判定文字列[(int)base.st状態[j].judge].rc ); #region [ #25370 2011.6.3 yyagi ShowLag support ] - if ( base.nShowLagType == (int) EShowLagType.ON || - ( ( base.nShowLagType == (int) EShowLagType.GREAT_POOR ) && ( base.st状態[ j ].judge != E判定.Perfect ) ) ) + if (base.nShowLagType == (int)EShowLagType.ON || + ((base.nShowLagType == (int)EShowLagType.GREAT_POOR) && (base.st状態[j].judge != E判定.Perfect))) { - if ( base.st状態[ j ].judge != E判定.Auto && base.txlag数値 != null ) // #25370 2011.2.1 yyagi + if (base.st状態[j].judge != E判定.Auto && base.txlag数値 != null) // #25370 2011.2.1 yyagi { bool minus = false; int offsetX = 0; - string strDispLag = base.st状態[ j ].nLag.ToString(); - if ( st状態[ j ].nLag < 0 ) + string strDispLag = base.st状態[j].nLag.ToString(); + if (st状態[j].nLag < 0) { minus = true; } //x = xc - strDispLag.Length * 15 / 2; - x = xc - (int) ( ( strDispLag.Length * 15 / 2 ) * Scale.X ); - for ( int i = 0; i < strDispLag.Length; i++ ) + x = xc - (int)((strDispLag.Length * 15 / 2) * Scale.X); + for (int i = 0; i < strDispLag.Length; i++) { - int p = ( strDispLag[ i ] == '-' ) ? 11 : (int) ( strDispLag[ i ] - '0' ); //int.Parse(strDispLag[i]); + int p = (strDispLag[i] == '-') ? 11 : (int)(strDispLag[i] - '0'); //int.Parse(strDispLag[i]); p += minus ? 0 : 12; // change color if it is minus value //base.txlag数値.t2D描画( CDTXMania.app.Device, x + offsetX, y + 34, base.stLag数値[ p ].rc ); base.txlag数値.t2D描画( CDTXMania.app.Device, x + offsetX * Scale.X, y + 38 * Scale.Y, - base.stLag数値[ p ].rc + base.stLag数値[p].rc ); offsetX += 12; // 15 -> 12 } @@ -302,24 +302,24 @@ namespace DTXMania } #endregion } - // Label_07FC: ; + // Label_07FC: ; } } } return 0; } - + // その他 #region [ private ] //----------------- - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] private struct STレーンサイズ { public int x; public int w; - public STレーンサイズ( int x_, int w_ ) + public STレーンサイズ(int x_, int w_) { x = x_; w = w_; diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CStage演奏ドラム画面.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CStage演奏ドラム画面.cs index a040dfdf..70e10069 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CStage演奏ドラム画面.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CStage演奏ドラム画面.cs @@ -45,7 +45,7 @@ namespace DTXMania base.list子Activities.Add(this.actFO = new CActFIFOBlack()); base.list子Activities.Add(this.actFOClear = new CActFIFOWhite()); } - + // メソッド public void t演奏結果を格納する(out CScoreIni.C演奏記録 Drums, out CScoreIni.C演奏記録 Guitar, out CScoreIni.C演奏記録 Bass, out CChip[] r空打ちドラムチップ) { diff --git a/DTXManiaプロジェクト/コード/ステージ/08.結果/CActResultImage.cs b/DTXManiaプロジェクト/コード/ステージ/08.結果/CActResultImage.cs index e3db6ee5..b942f0fd 100644 --- a/DTXManiaプロジェクト/コード/ステージ/08.結果/CActResultImage.cs +++ b/DTXManiaプロジェクト/コード/ステージ/08.結果/CActResultImage.cs @@ -43,11 +43,11 @@ namespace DTXMania } public override void On非活性化() { - if( this.ct登場用 != null ) + if (this.ct登場用 != null) { this.ct登場用 = null; } - if( this.rAVI != null ) + if (this.rAVI != null) { this.rAVI.Dispose(); this.rAVI = null; @@ -58,10 +58,10 @@ namespace DTXMania } public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - this.txパネル本体 = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenResult resultimage panel.png" ) ); - this.txリザルト画像がないときの画像 = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenSelect preimage default.png" ) ); + this.txパネル本体 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenResult resultimage panel.png")); + this.txリザルト画像がないときの画像 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenSelect preimage default.png")); //this.sfリザルトAVI画像 = Surface.CreateOffscreenPlain( CDTXMania.app.Device, 0xcc, 0x10d, CDTXMania.app.GraphicsDeviceManager.CurrentSettings.BackBufferFormat, Pool.Default ); //this.sfリザルトAVI画像 = Surface.CreateOffscreenPlain( CDTXMania.app.Device, 192, 269, CDTXMania.app.GraphicsDeviceManager.CurrentSettings.BackBufferFormat, Pool.Default ); //this.nAVI再生開始時刻 = -1; @@ -74,11 +74,11 @@ namespace DTXMania } public override void OnManagedリソースの解放() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.txパネル本体 ); - TextureFactory.tテクスチャの解放( ref this.txリザルト画像 ); - TextureFactory.tテクスチャの解放( ref this.txリザルト画像がないときの画像 ); + TextureFactory.tテクスチャの解放(ref this.txパネル本体); + TextureFactory.tテクスチャの解放(ref this.txリザルト画像); + TextureFactory.tテクスチャの解放(ref this.txリザルト画像がないときの画像); //if( this.sfリザルトAVI画像 != null ) //{ // this.sfリザルトAVI画像.Dispose(); @@ -90,22 +90,22 @@ namespace DTXMania } public override unsafe int On進行描画() { - if( base.b活性化してない ) + if (base.b活性化してない) { return 0; } - if( base.b初めての進行描画 ) + if (base.b初めての進行描画) { - if ( CDTXMania.app.ConfigIni.bストイックモード ) + if (CDTXMania.app.ConfigIni.bストイックモード) { this.r表示するリザルト画像 = this.txリザルト画像がないときの画像; } - else if ( ( ( !this.tリザルト動画の指定があれば構築する() && !this.tリザルト画像の指定があれば構築する() ) && ( !this.tプレビュー動画の指定があれば構築する() && !this.tプレビュー画像の指定があれば構築する() ) ) && !this.t背景画像があればその一部からリザルト画像を構築する() ) + else if (((!this.tリザルト動画の指定があれば構築する() && !this.tリザルト画像の指定があれば構築する()) && (!this.tプレビュー動画の指定があれば構築する() && !this.tプレビュー画像の指定があれば構築する())) && !this.t背景画像があればその一部からリザルト画像を構築する()) { this.r表示するリザルト画像 = this.txリザルト画像がないときの画像; } - this.ct登場用 = new CCounter( 0, 100, 5, CDTXMania.app.Timer ); + this.ct登場用 = new CCounter(0, 100, 5, CDTXMania.app.Timer); base.b初めての進行描画 = false; } this.ct登場用.t進行(); @@ -125,19 +125,19 @@ namespace DTXMania // //this.pAVIBmp = this.avi.GetFramePtr( frameNoFromTime ); // } //} - if( this.ct登場用.b終了値に達した ) + if (this.ct登場用.b終了値に達した) { this.n本体X = 4; this.n本体Y = 0x3f; } else { - double num3 = ( (double) this.ct登場用.n現在の値 ) / 100.0; - double num4 = Math.Cos( ( 1.5 + ( 0.5 * num3 ) ) * Math.PI ); + double num3 = ((double)this.ct登場用.n現在の値) / 100.0; + double num4 = Math.Cos((1.5 + (0.5 * num3)) * Math.PI); this.n本体X = 4; - this.n本体Y = 0x3f - ( (int) ( ( ( this.txパネル本体 != null ) ? ( (double) this.txパネル本体.sz画像サイズ.Height ) : ( (double) 0 ) ) * ( 1.0 - ( num4 * num4 ) ) ) ); + this.n本体Y = 0x3f - ((int)(((this.txパネル本体 != null) ? ((double)this.txパネル本体.sz画像サイズ.Height) : ((double)0)) * (1.0 - (num4 * num4)))); } - if( this.txパネル本体 != null ) + if (this.txパネル本体 != null) { this.txパネル本体.t2D描画( CDTXMania.app.Device, @@ -148,25 +148,25 @@ namespace DTXMania int x = this.n本体X + 0x11; int y = this.n本体Y + 0x10; //if ( ( ( this.nAVI再生開始時刻 != -1 ) && ( this.avi != null ) ) && ( this.sfリザルトAVI画像 != null ) ) - if ( this.rAVI != null ) + if (this.rAVI != null) { - this.actAVI.t進行描画( (int) ( x * Scale.X ), (int) ( y * Scale.Y ), 612, 605 ); + this.actAVI.t進行描画((int)(x * Scale.X), (int)(y * Scale.Y), 612, 605); } #region [ プレビュー画像表示 ] - else if( this.r表示するリザルト画像 != null ) + else if (this.r表示するリザルト画像 != null) { CPreviewMagnifier cmg = new CPreviewMagnifier(); - cmg.GetMagnifier( this.r表示するリザルト画像.sz画像サイズ.Width, this.r表示するリザルト画像.sz画像サイズ.Height, 1.0f, 1.0f, true ); + cmg.GetMagnifier(this.r表示するリザルト画像.sz画像サイズ.Width, this.r表示するリザルト画像.sz画像サイズ.Height, 1.0f, 1.0f, true); - if ( cmg.width < 0xcc) x += ( 204 - cmg.width ) / 2; - if ( cmg.height < 269 ) y += ( 269 - cmg.height ) / 2; + if (cmg.width < 0xcc) x += (204 - cmg.width) / 2; + if (cmg.height < 269) y += (269 - cmg.height) / 2; this.r表示するリザルト画像.vc拡大縮小倍率.X = cmg.magX; this.r表示するリザルト画像.vc拡大縮小倍率.Y = cmg.magY; this.r表示するリザルト画像.vc拡大縮小倍率.Z = 1f; - this.r表示するリザルト画像.t2D描画( CDTXMania.app.Device, x * Scale.X, y * Scale.Y ); + this.r表示するリザルト画像.t2D描画(CDTXMania.app.Device, x * Scale.X, y * Scale.Y); } #endregion - if( ( CDTXMania.app.DTX.GENRE != null ) && ( CDTXMania.app.DTX.GENRE.Length > 0 ) ) + if ((CDTXMania.app.DTX.GENRE != null) && (CDTXMania.app.DTX.GENRE.Length > 0)) { CDTXMania.app.act文字コンソール.tPrint( (int)((this.n本体X + 0x12) * Scale.X), @@ -175,7 +175,7 @@ namespace DTXMania CDTXMania.app.DTX.GENRE ); } - if( !this.ct登場用.b終了値に達した ) + if (!this.ct登場用.b終了値に達した) { return 0; } @@ -206,7 +206,7 @@ namespace DTXMania private bool t背景画像があればその一部からリザルト画像を構築する() { string bACKGROUND; - if( ( CDTXMania.app.ConfigIni.bギタレボモード && ( CDTXMania.app.DTX.BACKGROUND_GR != null ) ) && ( CDTXMania.app.DTX.BACKGROUND_GR.Length > 0 ) ) + if ((CDTXMania.app.ConfigIni.bギタレボモード && (CDTXMania.app.DTX.BACKGROUND_GR != null)) && (CDTXMania.app.DTX.BACKGROUND_GR.Length > 0)) { bACKGROUND = CDTXMania.app.DTX.BACKGROUND_GR; } @@ -214,11 +214,11 @@ namespace DTXMania { bACKGROUND = CDTXMania.app.DTX.BACKGROUND; } - if( string.IsNullOrEmpty( bACKGROUND ) ) + if (string.IsNullOrEmpty(bACKGROUND)) { return false; } - TextureFactory.tテクスチャの解放( ref this.txリザルト画像 ); + TextureFactory.tテクスチャの解放(ref this.txリザルト画像); this.r表示するリザルト画像 = null; bACKGROUND = CDTXMania.app.DTX.strフォルダ名 + bACKGROUND; Bitmap image = null; @@ -226,42 +226,42 @@ namespace DTXMania Bitmap bitmap3 = null; try { - image = new Bitmap( bACKGROUND ); + image = new Bitmap(bACKGROUND); bitmap2 = new Bitmap(SampleFramework.GameWindowSize.Width, SampleFramework.GameWindowSize.Height); - Graphics graphics = Graphics.FromImage( bitmap2 ); + Graphics graphics = Graphics.FromImage(bitmap2); int x = 0; for (int i = 0; i < SampleFramework.GameWindowSize.Height; i += image.Height) { for (x = 0; x < SampleFramework.GameWindowSize.Width; x += image.Width) { - graphics.DrawImage( image, x, i, image.Width, image.Height ); + graphics.DrawImage(image, x, i, image.Width, image.Height); } } graphics.Dispose(); - bitmap3 = new Bitmap( 0xcc, 0x10d ); - graphics = Graphics.FromImage( bitmap3 ); - graphics.DrawImage( bitmap2, 5, 5, new Rectangle( 0x157, 0x6d, 0xcc, 0x10d ), GraphicsUnit.Pixel ); + bitmap3 = new Bitmap(0xcc, 0x10d); + graphics = Graphics.FromImage(bitmap3); + graphics.DrawImage(bitmap2, 5, 5, new Rectangle(0x157, 0x6d, 0xcc, 0x10d), GraphicsUnit.Pixel); graphics.Dispose(); - this.txリザルト画像 = new CTexture( CDTXMania.app.Device, bitmap3, CDTXMania.app.TextureFormat ); + this.txリザルト画像 = new CTexture(CDTXMania.app.Device, bitmap3, CDTXMania.app.TextureFormat); this.r表示するリザルト画像 = this.txリザルト画像; } catch { - Trace.TraceError( "背景画像の読み込みに失敗しました。({0})", new object[] { bACKGROUND } ); + Trace.TraceError("背景画像の読み込みに失敗しました。({0})", new object[] { bACKGROUND }); this.txリザルト画像 = null; return false; } finally { - if( image != null ) + if (image != null) { image.Dispose(); } - if( bitmap2 != null ) + if (bitmap2 != null) { bitmap2.Dispose(); } - if( bitmap3 != null ) + if (bitmap3 != null) { bitmap3.Dispose(); } @@ -303,40 +303,40 @@ namespace DTXMania //} private bool tプレビュー画像の指定があれば構築する() { - if( string.IsNullOrEmpty( CDTXMania.app.DTX.PREIMAGE ) ) + if (string.IsNullOrEmpty(CDTXMania.app.DTX.PREIMAGE)) { return false; } - TextureFactory.tテクスチャの解放( ref this.txリザルト画像 ); + TextureFactory.tテクスチャの解放(ref this.txリザルト画像); this.r表示するリザルト画像 = null; string path = CDTXMania.app.DTX.strフォルダ名 + CDTXMania.app.DTX.PREIMAGE; - if( !File.Exists( path ) ) + if (!File.Exists(path)) { - Trace.TraceWarning( "ファイルが存在しません。({0})", new object[] { path } ); + Trace.TraceWarning("ファイルが存在しません。({0})", new object[] { path }); return false; } - this.txリザルト画像 = TextureFactory.tテクスチャの生成( path ); + this.txリザルト画像 = TextureFactory.tテクスチャの生成(path); this.r表示するリザルト画像 = this.txリザルト画像; - return ( this.r表示するリザルト画像 != null ); + return (this.r表示するリザルト画像 != null); } private bool tプレビュー動画の指定があれば構築する() { - if( !CDTXMania.app.ConfigIni.bAVI有効 ) + if (!CDTXMania.app.ConfigIni.bAVI有効) { return false; } this.actAVI.Stop(); - if( string.IsNullOrEmpty( CDTXMania.app.DTX.PREMOVIE ) ) + if (string.IsNullOrEmpty(CDTXMania.app.DTX.PREMOVIE)) { return false; } this.strAVIファイル名 = CDTXMania.app.DTX.strフォルダ名 + CDTXMania.app.DTX.PREMOVIE; - if( !File.Exists( this.strAVIファイル名 ) ) + if (!File.Exists(this.strAVIファイル名)) { - Trace.TraceWarning( "プレビュー動画のファイルが存在しません。({0})", this.strAVIファイル名 ); + Trace.TraceWarning("プレビュー動画のファイルが存在しません。({0})", this.strAVIファイル名); return false; } - if ( this.rAVI != null ) + if (this.rAVI != null) { this.rAVI.Dispose(); this.rAVI = null; @@ -345,7 +345,7 @@ namespace DTXMania { this.rAVI = new CDTX.CAVI(00, this.strAVIファイル名, "", CDTXMania.app.ConfigIni.n演奏速度); this.rAVI.OnDeviceCreated(); - this.actAVI.Start( Ech定義.Movie, rAVI, 204, 269, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1 ); + this.actAVI.Start(Ech定義.Movie, rAVI, 204, 269, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1); //this.avi = new CAvi( this.strAVIファイル名 ); //this.nAVI再生開始時刻 = CDTXMania.app.Timer.n現在時刻; @@ -356,9 +356,9 @@ namespace DTXMania } catch { - Trace.TraceError( "プレビュー動画の生成に失敗しました。({0})", this.strAVIファイル名 ); - this.rAVI = null; - //this.nAVI再生開始時刻 = -1; + Trace.TraceError("プレビュー動画の生成に失敗しました。({0})", this.strAVIファイル名); + this.rAVI = null; + //this.nAVI再生開始時刻 = -1; } return true; } @@ -373,21 +373,21 @@ namespace DTXMania { return false; } - TextureFactory.tテクスチャの解放( ref this.txリザルト画像 ); + TextureFactory.tテクスチャの解放(ref this.txリザルト画像); this.r表示するリザルト画像 = null; - string path = CDTXMania.app.DTX.strフォルダ名 + CDTXMania.app.DTX.RESULTIMAGE[ rank ]; - if( !File.Exists( path ) ) + string path = CDTXMania.app.DTX.strフォルダ名 + CDTXMania.app.DTX.RESULTIMAGE[rank]; + if (!File.Exists(path)) { - Trace.TraceWarning( "ファイルが存在しません。({0})", new object[] { path } ); + Trace.TraceWarning("ファイルが存在しません。({0})", new object[] { path }); return false; } - this.txリザルト画像 = TextureFactory.tテクスチャの生成( path ); + this.txリザルト画像 = TextureFactory.tテクスチャの生成(path); this.r表示するリザルト画像 = this.txリザルト画像; - return ( this.r表示するリザルト画像 != null ); + return (this.r表示するリザルト画像 != null); } private bool tリザルト動画の指定があれば構築する() { - if( !CDTXMania.app.ConfigIni.bAVI有効 ) + if (!CDTXMania.app.ConfigIni.bAVI有効) { return false; } @@ -397,17 +397,17 @@ namespace DTXMania rank = 6; } - if( string.IsNullOrEmpty( CDTXMania.app.DTX.RESULTMOVIE[ rank ] ) ) + if (string.IsNullOrEmpty(CDTXMania.app.DTX.RESULTMOVIE[rank])) { return false; } - this.strAVIファイル名 = CDTXMania.app.DTX.strフォルダ名 + CDTXMania.app.DTX.RESULTMOVIE[ rank ]; - if( !File.Exists( this.strAVIファイル名 ) ) + this.strAVIファイル名 = CDTXMania.app.DTX.strフォルダ名 + CDTXMania.app.DTX.RESULTMOVIE[rank]; + if (!File.Exists(this.strAVIファイル名)) { - Trace.TraceWarning( "リザルト動画のファイルが存在しません。({0})", this.strAVIファイル名 ); + Trace.TraceWarning("リザルト動画のファイルが存在しません。({0})", this.strAVIファイル名); return false; } - if( this.rAVI!= null ) + if (this.rAVI != null) { this.rAVI.Dispose(); this.rAVI = null; @@ -416,7 +416,7 @@ namespace DTXMania { this.rAVI = new CDTX.CAVI(00, this.strAVIファイル名, "", CDTXMania.app.ConfigIni.n演奏速度); this.rAVI.OnDeviceCreated(); - this.actAVI.Start( Ech定義.Movie, rAVI, 204, 269, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1 ); + this.actAVI.Start(Ech定義.Movie, rAVI, 204, 269, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1); //this.avi = new CAvi( this.strAVIファイル名 ); //this.nAVI再生開始時刻 = CDTXMania.app.Timer.n現在時刻; @@ -427,7 +427,7 @@ namespace DTXMania } catch { - Trace.TraceError( "リザルト動画の生成に失敗しました。({0})", this.strAVIファイル名 ); + Trace.TraceError("リザルト動画の生成に失敗しました。({0})", this.strAVIファイル名); this.rAVI = null; //this.nAVI再生開始時刻 = -1; } diff --git a/DTXManiaプロジェクト/コード/ステージ/08.結果/CActResultParameterPanel.cs b/DTXManiaプロジェクト/コード/ステージ/08.結果/CActResultParameterPanel.cs index c2efc6b7..5c638557 100644 --- a/DTXManiaプロジェクト/コード/ステージ/08.結果/CActResultParameterPanel.cs +++ b/DTXManiaプロジェクト/コード/ステージ/08.結果/CActResultParameterPanel.cs @@ -14,99 +14,99 @@ namespace DTXMania // コンストラクタ public CActResultParameterPanel() { - ST文字位置[] st文字位置Array = new ST文字位置[ 11 ]; + ST文字位置[] st文字位置Array = new ST文字位置[11]; ST文字位置 st文字位置 = new ST文字位置(); st文字位置.ch = '0'; - st文字位置.pt = new Point( (int)(0 * Scale.X), (int)(0 * Scale.Y) ); - st文字位置Array[ 0 ] = st文字位置; + st文字位置.pt = new Point((int)(0 * Scale.X), (int)(0 * Scale.Y)); + st文字位置Array[0] = st文字位置; ST文字位置 st文字位置2 = new ST文字位置(); st文字位置2.ch = '1'; - st文字位置2.pt = new Point( (int)(11 * Scale.X), (int)(0 * Scale.Y) ); - st文字位置Array[ 1 ] = st文字位置2; + st文字位置2.pt = new Point((int)(11 * Scale.X), (int)(0 * Scale.Y)); + st文字位置Array[1] = st文字位置2; ST文字位置 st文字位置3 = new ST文字位置(); st文字位置3.ch = '2'; - st文字位置3.pt = new Point( (int)(0x16 * Scale.X), (int)(0 * Scale.Y) ); - st文字位置Array[ 2 ] = st文字位置3; + st文字位置3.pt = new Point((int)(0x16 * Scale.X), (int)(0 * Scale.Y)); + st文字位置Array[2] = st文字位置3; ST文字位置 st文字位置4 = new ST文字位置(); st文字位置4.ch = '3'; - st文字位置4.pt = new Point( (int)(0x21 * Scale.X), (int)(0 * Scale.Y) ); - st文字位置Array[ 3 ] = st文字位置4; + st文字位置4.pt = new Point((int)(0x21 * Scale.X), (int)(0 * Scale.Y)); + st文字位置Array[3] = st文字位置4; ST文字位置 st文字位置5 = new ST文字位置(); st文字位置5.ch = '4'; - st文字位置5.pt = new Point( (int)(0x2c * Scale.X), (int)(0 * Scale.Y) ); - st文字位置Array[ 4 ] = st文字位置5; + st文字位置5.pt = new Point((int)(0x2c * Scale.X), (int)(0 * Scale.Y)); + st文字位置Array[4] = st文字位置5; ST文字位置 st文字位置6 = new ST文字位置(); st文字位置6.ch = '5'; - st文字位置6.pt = new Point( (int)(0 * Scale.X), (int)(0x10 * Scale.Y) ); - st文字位置Array[ 5 ] = st文字位置6; + st文字位置6.pt = new Point((int)(0 * Scale.X), (int)(0x10 * Scale.Y)); + st文字位置Array[5] = st文字位置6; ST文字位置 st文字位置7 = new ST文字位置(); st文字位置7.ch = '6'; - st文字位置7.pt = new Point( (int)(11 * Scale.X), (int)(0x10 * Scale.Y) ); - st文字位置Array[ 6 ] = st文字位置7; + st文字位置7.pt = new Point((int)(11 * Scale.X), (int)(0x10 * Scale.Y)); + st文字位置Array[6] = st文字位置7; ST文字位置 st文字位置8 = new ST文字位置(); st文字位置8.ch = '7'; - st文字位置8.pt = new Point( (int)(0x16 * Scale.X), (int)(0x10 * Scale.Y) ); - st文字位置Array[ 7 ] = st文字位置8; + st文字位置8.pt = new Point((int)(0x16 * Scale.X), (int)(0x10 * Scale.Y)); + st文字位置Array[7] = st文字位置8; ST文字位置 st文字位置9 = new ST文字位置(); st文字位置9.ch = '8'; - st文字位置9.pt = new Point( (int)(0x21 * Scale.X), (int)(0x10 * Scale.Y) ); - st文字位置Array[ 8 ] = st文字位置9; + st文字位置9.pt = new Point((int)(0x21 * Scale.X), (int)(0x10 * Scale.Y)); + st文字位置Array[8] = st文字位置9; ST文字位置 st文字位置10 = new ST文字位置(); st文字位置10.ch = '9'; - st文字位置10.pt = new Point( (int)(0x2c * Scale.X), (int)(0x10 * Scale.Y) ); - st文字位置Array[ 9 ] = st文字位置10; + st文字位置10.pt = new Point((int)(0x2c * Scale.X), (int)(0x10 * Scale.Y)); + st文字位置Array[9] = st文字位置10; ST文字位置 st文字位置11 = new ST文字位置(); st文字位置11.ch = '.'; - st文字位置11.pt = new Point( (int)(0x37 * Scale.X), (int)(0x10 * Scale.Y) ); - st文字位置Array[ 10 ] = st文字位置11; + st文字位置11.pt = new Point((int)(0x37 * Scale.X), (int)(0x10 * Scale.Y)); + st文字位置Array[10] = st文字位置11; this.st大文字位置 = st文字位置Array; - ST文字位置[] st文字位置Array2 = new ST文字位置[ 11 ]; + ST文字位置[] st文字位置Array2 = new ST文字位置[11]; ST文字位置 st文字位置12 = new ST文字位置(); st文字位置12.ch = '0'; - st文字位置12.pt = new Point( (int)(0 * Scale.X), (int)(0x20 * Scale.Y) ); - st文字位置Array2[ 0 ] = st文字位置12; + st文字位置12.pt = new Point((int)(0 * Scale.X), (int)(0x20 * Scale.Y)); + st文字位置Array2[0] = st文字位置12; ST文字位置 st文字位置13 = new ST文字位置(); st文字位置13.ch = '1'; - st文字位置13.pt = new Point( (int)(11 * Scale.X), (int)(0x20 * Scale.Y) ); - st文字位置Array2[ 1 ] = st文字位置13; + st文字位置13.pt = new Point((int)(11 * Scale.X), (int)(0x20 * Scale.Y)); + st文字位置Array2[1] = st文字位置13; ST文字位置 st文字位置14 = new ST文字位置(); st文字位置14.ch = '2'; - st文字位置14.pt = new Point( (int)(0x16 * Scale.X), (int)(0x20 * Scale.Y) ); - st文字位置Array2[ 2 ] = st文字位置14; + st文字位置14.pt = new Point((int)(0x16 * Scale.X), (int)(0x20 * Scale.Y)); + st文字位置Array2[2] = st文字位置14; ST文字位置 st文字位置15 = new ST文字位置(); st文字位置15.ch = '3'; - st文字位置15.pt = new Point( (int)(0x21 * Scale.X), (int)(0x20 * Scale.Y) ); - st文字位置Array2[ 3 ] = st文字位置15; + st文字位置15.pt = new Point((int)(0x21 * Scale.X), (int)(0x20 * Scale.Y)); + st文字位置Array2[3] = st文字位置15; ST文字位置 st文字位置16 = new ST文字位置(); st文字位置16.ch = '4'; - st文字位置16.pt = new Point( (int)(0x2c * Scale.X), (int)(0x20 * Scale.Y) ); - st文字位置Array2[ 4 ] = st文字位置16; + st文字位置16.pt = new Point((int)(0x2c * Scale.X), (int)(0x20 * Scale.Y)); + st文字位置Array2[4] = st文字位置16; ST文字位置 st文字位置17 = new ST文字位置(); st文字位置17.ch = '5'; - st文字位置17.pt = new Point( (int)(0 * Scale.X), (int)(0x30 * Scale.Y) ); - st文字位置Array2[ 5 ] = st文字位置17; + st文字位置17.pt = new Point((int)(0 * Scale.X), (int)(0x30 * Scale.Y)); + st文字位置Array2[5] = st文字位置17; ST文字位置 st文字位置18 = new ST文字位置(); st文字位置18.ch = '6'; - st文字位置18.pt = new Point( (int)(11 * Scale.X), (int)(0x30 * Scale.Y) ); - st文字位置Array2[ 6 ] = st文字位置18; + st文字位置18.pt = new Point((int)(11 * Scale.X), (int)(0x30 * Scale.Y)); + st文字位置Array2[6] = st文字位置18; ST文字位置 st文字位置19 = new ST文字位置(); st文字位置19.ch = '7'; - st文字位置19.pt = new Point( (int)(0x16 * Scale.X), (int)(0x30 * Scale.Y) ); - st文字位置Array2[ 7 ] = st文字位置19; + st文字位置19.pt = new Point((int)(0x16 * Scale.X), (int)(0x30 * Scale.Y)); + st文字位置Array2[7] = st文字位置19; ST文字位置 st文字位置20 = new ST文字位置(); st文字位置20.ch = '8'; - st文字位置20.pt = new Point( (int)(0x21 * Scale.X), (int)(0x30 * Scale.Y) ); - st文字位置Array2[ 8 ] = st文字位置20; + st文字位置20.pt = new Point((int)(0x21 * Scale.X), (int)(0x30 * Scale.Y)); + st文字位置Array2[8] = st文字位置20; ST文字位置 st文字位置21 = new ST文字位置(); st文字位置21.ch = '9'; - st文字位置21.pt = new Point( (int)(0x2c * Scale.X), (int)(0x30 * Scale.Y) ); - st文字位置Array2[ 9 ] = st文字位置21; + st文字位置21.pt = new Point((int)(0x2c * Scale.X), (int)(0x30 * Scale.Y)); + st文字位置Array2[9] = st文字位置21; ST文字位置 st文字位置22 = new ST文字位置(); st文字位置22.ch = '%'; - st文字位置22.pt = new Point( (int)(0x37 * Scale.X), (int)(0x30 * Scale.Y) ); - st文字位置Array2[ 10 ] = st文字位置22; + st文字位置22.pt = new Point((int)(0x37 * Scale.X), (int)(0x30 * Scale.Y)); + st文字位置Array2[10] = st文字位置22; this.st小文字位置 = st文字位置Array2; - this.ptFullCombo位置 = new Point[] { new Point( (int) ( 0x80 * Scale.X ), (int) ( 0xed * Scale.Y ) ), new Point( (int) ( 0xdf * Scale.X ), (int) ( 0xed * Scale.Y ) ), new Point( (int) ( 0x141 * Scale.X ), (int) ( 0xed * Scale.Y ) ) }; + this.ptFullCombo位置 = new Point[] { new Point((int)(0x80 * Scale.X), (int)(0xed * Scale.Y)), new Point((int)(0xdf * Scale.X), (int)(0xed * Scale.Y)), new Point((int)(0x141 * Scale.X), (int)(0xed * Scale.Y)) }; base.b活性化してない = true; } @@ -131,54 +131,54 @@ namespace DTXMania } public override void On非活性化() { - if( this.ct表示用 != null ) + if (this.ct表示用 != null) { this.ct表示用 = null; } - if( this.sdDTXで指定されたフルコンボ音 != null ) + if (this.sdDTXで指定されたフルコンボ音 != null) { - CDTXMania.app.Sound管理.tサウンドを破棄する( this.sdDTXで指定されたフルコンボ音 ); + CDTXMania.app.Sound管理.tサウンドを破棄する(this.sdDTXで指定されたフルコンボ音); this.sdDTXで指定されたフルコンボ音 = null; } base.On非活性化(); } public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - this.txパネル本体 = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenResult parameter panel.png" ), true ); - this.tx文字[ 0 ] = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenResult parameter numbers.png" ) ); - this.tx文字[ 1 ] = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenResult parameter numbers em.png" ) ); - this.txFullCombo = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenResult fullcombo.png" ) ); - this.txWhite = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\Tile white 64x64.png" ) ); + this.txパネル本体 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenResult parameter panel.png"), true); + this.tx文字[0] = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenResult parameter numbers.png")); + this.tx文字[1] = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenResult parameter numbers em.png")); + this.txFullCombo = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenResult fullcombo.png")); + this.txWhite = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\Tile white 64x64.png")); base.OnManagedリソースの作成(); } } public override void OnManagedリソースの解放() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.txパネル本体 ); - TextureFactory.tテクスチャの解放( ref this.tx文字[ 0 ] ); - TextureFactory.tテクスチャの解放( ref this.tx文字[ 1 ] ); - TextureFactory.tテクスチャの解放( ref this.txFullCombo ); - TextureFactory.tテクスチャの解放( ref this.txWhite ); + TextureFactory.tテクスチャの解放(ref this.txパネル本体); + TextureFactory.tテクスチャの解放(ref this.tx文字[0]); + TextureFactory.tテクスチャの解放(ref this.tx文字[1]); + TextureFactory.tテクスチャの解放(ref this.txFullCombo); + TextureFactory.tテクスチャの解放(ref this.txWhite); base.OnManagedリソースの解放(); } } public override int On進行描画() { - if( base.b活性化してない ) + if (base.b活性化してない) { return 0; } - if( base.b初めての進行描画 ) + if (base.b初めての進行描画) { - this.ct表示用 = new CCounter( 0, 0x3e7, 2, CDTXMania.app.Timer ); + this.ct表示用 = new CCounter(0, 0x3e7, 2, CDTXMania.app.Timer); base.b初めての進行描画 = false; } this.ct表示用.t進行(); - if( this.txパネル本体 != null ) + if (this.txパネル本体 != null) { this.txパネル本体.t2D描画( CDTXMania.app.Device, @@ -187,96 +187,96 @@ namespace DTXMania ); } int num = this.ct表示用.n現在の値; - Point[] pointArray = new Point[] { new Point( (int) ( 0x68 * Scale.X ), (int) ( 0x29 * Scale.Y ) ), new Point( (int) ( 0xc7 * Scale.X ), (int) ( 0x29 * Scale.Y ) ), new Point( (int) ( 0x129 * Scale.X ), (int) ( 0x29 * Scale.Y ) ) }; - for( int i = 0; i < 3; i++ ) + Point[] pointArray = new Point[] { new Point((int)(0x68 * Scale.X), (int)(0x29 * Scale.Y)), new Point((int)(0xc7 * Scale.X), (int)(0x29 * Scale.Y)), new Point((int)(0x129 * Scale.X), (int)(0x29 * Scale.Y)) }; + for (int i = 0; i < 3; i++) { - int x = this.n本体X + pointArray[ i ].X; - int y = this.n本体Y + pointArray[ i ].Y; - if( num >= 0 ) + int x = this.n本体X + pointArray[i].X; + int y = this.n本体Y + pointArray[i].Y; + if (num >= 0) { - this.t大文字表示( x, y, CDTXMania.app.stage結果.st演奏記録[ i ].nPerfect数.ToString( "00000" ) ); + this.t大文字表示(x, y, CDTXMania.app.stage結果.st演奏記録[i].nPerfect数.ToString("00000")); } - if( num >= 100 ) + if (num >= 100) { this.t大文字表示(x, y + (int)(0x16 * Scale.Y), CDTXMania.app.stage結果.st演奏記録[i].nGreat数.ToString("00000")); } - if( num >= 200 ) + if (num >= 200) { this.t大文字表示(x, y + (int)(0x2c * Scale.Y), CDTXMania.app.stage結果.st演奏記録[i].nGood数.ToString("00000")); } - if( num >= 300 ) + if (num >= 300) { this.t大文字表示(x, y + (int)(0x42 * Scale.Y), CDTXMania.app.stage結果.st演奏記録[i].nPoor数.ToString("00000")); } - if( num >= 400 ) + if (num >= 400) { this.t大文字表示(x, y + (int)(0x58 * Scale.Y), CDTXMania.app.stage結果.st演奏記録[i].nMiss数.ToString("00000")); } - if( num >= 0 ) + if (num >= 0) { this.t小文字表示(x + (int)(0x30 * Scale.X), y, string.Format("{0,3:##0}%", CDTXMania.app.stage結果.fPerfect率[i])); } - if( num >= 100 ) + if (num >= 100) { this.t小文字表示(x + (int)(0x30 * Scale.X), y + (int)(0x16 * Scale.Y), string.Format("{0,3:##0}%", CDTXMania.app.stage結果.fGreat率[i])); } - if( num >= 200 ) + if (num >= 200) { this.t小文字表示(x + (int)(0x30 * Scale.X), y + (int)(0x2c * Scale.Y), string.Format("{0,3:##0}%", CDTXMania.app.stage結果.fGood率[i])); } - if( num >= 300 ) + if (num >= 300) { this.t小文字表示(x + (int)(0x30 * Scale.X), y + (int)(0x42 * Scale.Y), string.Format("{0,3:##0}%", CDTXMania.app.stage結果.fPoor率[i])); } - if( num >= 400 ) + if (num >= 400) { this.t小文字表示(x + (int)(0x30 * Scale.X), y + (int)(0x58 * Scale.Y), string.Format("{0,3:##0}%", CDTXMania.app.stage結果.fMiss率[i])); } - if( num >= 500 ) + if (num >= 500) { this.t大文字表示(x, y + (int)(110 * Scale.Y), string.Format("{0,9:########0}", CDTXMania.app.stage結果.st演奏記録[i].n最大コンボ数)); } - if( num >= 600 ) + if (num >= 600) { this.t大文字表示(x, y + (int)(0x84 * Scale.Y), CDTXMania.app.stage結果.st演奏記録[i].nスコア.ToString("000000000"), CDTXMania.app.stage結果.b新記録スコア[i]); } - if( num >= 700 ) + if (num >= 700) { this.t大文字表示(x - (int)(11 * Scale.X), y + (int)(0x9a * Scale.Y), string.Format("{0,9:#####0.00}", CDTXMania.app.stage結果.st演奏記録[i].db演奏型スキル値), CDTXMania.app.stage結果.b新記録スキル[i]); } - if( num >= 700 ) + if (num >= 700) { - this.t小文字表示( x + (int)(0x48 * Scale.X), y + (int)(0x9a * Scale.Y), "%" ); + this.t小文字表示(x + (int)(0x48 * Scale.X), y + (int)(0x9a * Scale.Y), "%"); } - if( num >= 800 ) + if (num >= 800) { this.t大文字表示(x, y + (int)(0xb0 * Scale.Y), string.Format("{0,9:########0}", CDTXMania.app.stage結果.n演奏回数[i])); } } - if( this.ct表示用.n現在の値 < 900 ) + if (this.ct表示用.n現在の値 < 900) { int num5 = this.ct表示用.n現在の値 / 100; - double num6 = 1.0 - ( ( (double) ( this.ct表示用.n現在の値 % 100 ) ) / 100.0 ); + double num6 = 1.0 - (((double)(this.ct表示用.n現在の値 % 100)) / 100.0); int num7 = 0x157; - int num8 = 0x6d + ( num5 * 0x16 ); + int num8 = 0x6d + (num5 * 0x16); int num9 = 0x11c; int num10 = 0x10; - if( this.txWhite != null ) + if (this.txWhite != null) { - this.txWhite.n透明度 = (int) ( 255.0 * num6 ); - Rectangle rectangle = new Rectangle( 0, 0, 0x40, 0 ); - while( num9 > 0 ) + this.txWhite.n透明度 = (int)(255.0 * num6); + Rectangle rectangle = new Rectangle(0, 0, 0x40, 0); + while (num9 > 0) { rectangle.Height = num10; - if( num9 < 0x40 ) + if (num9 < 0x40) { rectangle.Width = num9; } Rectangle rect = rectangle; - rect.X = (int) ( rect.X * Scale.X ); - rect.Y = (int) ( rect.Y * Scale.Y ); - rect.Width = (int) ( rect.Width * Scale.X ); - rect.Height = (int) ( rect.Height * Scale.Y ); + rect.X = (int)(rect.X * Scale.X); + rect.Y = (int)(rect.Y * Scale.Y); + rect.Width = (int)(rect.Width * Scale.X); + rect.Height = (int)(rect.Height * Scale.Y); this.txWhite.t2D描画( CDTXMania.app.Device, num7 * Scale.X, @@ -288,35 +288,35 @@ namespace DTXMania } } } - if( this.ct表示用.n現在の値 >= 900 ) + if (this.ct表示用.n現在の値 >= 900) { - for( int j = 0; j < 3; j++ ) + for (int j = 0; j < 3; j++) { if (CDTXMania.app.stage結果.st演奏記録[j].bフルコンボである) { - if( this.ct表示用.b終了値に達した ) + if (this.ct表示用.b終了値に達した) { - if( this.txFullCombo != null ) + if (this.txFullCombo != null) { this.txFullCombo.t2D描画( CDTXMania.app.Device, - this.n本体X + this.ptFullCombo位置[ j ].X, - this.n本体Y + this.ptFullCombo位置[ j ].Y + this.n本体X + this.ptFullCombo位置[j].X, + this.n本体Y + this.ptFullCombo位置[j].Y ); } - if( !this.bフルコンボ音再生済み ) + if (!this.bフルコンボ音再生済み) { - if( ( ( CDTXMania.app.DTX.SOUND_FULLCOMBO != null ) && ( CDTXMania.app.DTX.SOUND_FULLCOMBO.Length > 0 ) ) && File.Exists( CDTXMania.app.DTX.strフォルダ名 + CDTXMania.app.DTX.SOUND_FULLCOMBO ) ) + if (((CDTXMania.app.DTX.SOUND_FULLCOMBO != null) && (CDTXMania.app.DTX.SOUND_FULLCOMBO.Length > 0)) && File.Exists(CDTXMania.app.DTX.strフォルダ名 + CDTXMania.app.DTX.SOUND_FULLCOMBO)) { try { - if( this.sdDTXで指定されたフルコンボ音 != null ) + if (this.sdDTXで指定されたフルコンボ音 != null) { - CDTXMania.app.Sound管理.tサウンドを破棄する( this.sdDTXで指定されたフルコンボ音 ); + CDTXMania.app.Sound管理.tサウンドを破棄する(this.sdDTXで指定されたフルコンボ音); this.sdDTXで指定されたフルコンボ音 = null; } - this.sdDTXで指定されたフルコンボ音 = CDTXMania.app.Sound管理.tサウンドを生成する( CDTXMania.app.DTX.strフォルダ名 + CDTXMania.app.DTX.SOUND_FULLCOMBO ); - if( this.sdDTXで指定されたフルコンボ音 != null ) + this.sdDTXで指定されたフルコンボ音 = CDTXMania.app.Sound管理.tサウンドを生成する(CDTXMania.app.DTX.strフォルダ名 + CDTXMania.app.DTX.SOUND_FULLCOMBO); + if (this.sdDTXで指定されたフルコンボ音 != null) { this.sdDTXで指定されたフルコンボ音.t再生を開始する(); } @@ -334,33 +334,33 @@ namespace DTXMania } else { - double num12 = ( (double) ( this.ct表示用.n現在の値 - 900 ) ) / 100.0; - float num13 = (float) ( 2.0 - num12 ); - if( this.txFullCombo != null ) + double num12 = ((double)(this.ct表示用.n現在の値 - 900)) / 100.0; + float num13 = (float)(2.0 - num12); + if (this.txFullCombo != null) { - this.txFullCombo.vc拡大縮小倍率 = new Vector3( num13, num13, 1f ); - this.txFullCombo.n透明度 = (int) ( 255.0 * num12 ); - int num14 = ( this.n本体X + this.ptFullCombo位置[ j ].X ) + ( (int) ( ( this.txFullCombo.sz画像サイズ.Width * ( 1f - num13 ) ) / 2f ) ); - int num15 = ( this.n本体Y + this.ptFullCombo位置[ j ].Y ) + ( (int) ( ( this.txFullCombo.sz画像サイズ.Height * ( 1f - num13 ) ) / 2f ) ); - this.txFullCombo.t2D描画( CDTXMania.app.Device, num14, num15 ); + this.txFullCombo.vc拡大縮小倍率 = new Vector3(num13, num13, 1f); + this.txFullCombo.n透明度 = (int)(255.0 * num12); + int num14 = (this.n本体X + this.ptFullCombo位置[j].X) + ((int)((this.txFullCombo.sz画像サイズ.Width * (1f - num13)) / 2f)); + int num15 = (this.n本体Y + this.ptFullCombo位置[j].Y) + ((int)((this.txFullCombo.sz画像サイズ.Height * (1f - num13)) / 2f)); + this.txFullCombo.t2D描画(CDTXMania.app.Device, num14, num15); } } } } } - if( !this.ct表示用.b終了値に達した ) + if (!this.ct表示用.b終了値に達した) { return 0; } return 1; } - + // その他 #region [ private ] //----------------- - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] private struct ST文字位置 { public char ch; @@ -378,68 +378,68 @@ namespace DTXMania private CTexture txFullCombo; private CTexture txWhite; private CTexture txパネル本体; - private CTexture[] tx文字 = new CTexture[ 2 ]; + private CTexture[] tx文字 = new CTexture[2]; - private void t小文字表示( int x, int y, string str ) + private void t小文字表示(int x, int y, string str) { - this.t小文字表示( x, y, str, false ); + this.t小文字表示(x, y, str, false); } - private void t小文字表示( int x, int y, string str, bool b強調 ) + private void t小文字表示(int x, int y, string str, bool b強調) { - foreach( char ch in str ) + foreach (char ch in str) { - for( int i = 0; i < this.st小文字位置.Length; i++ ) + for (int i = 0; i < this.st小文字位置.Length; i++) { - if( this.st小文字位置[ i ].ch == ch ) + if (this.st小文字位置[i].ch == ch) { Rectangle rectangle = new Rectangle( - this.st小文字位置[ i ].pt.X, - this.st小文字位置[ i ].pt.Y, + this.st小文字位置[i].pt.X, + this.st小文字位置[i].pt.Y, (int)(11 * Scale.X), (int)(0x10 * Scale.Y) ); - if( ch == '%' ) + if (ch == '%') { rectangle.Width -= (int)(2 * Scale.X); rectangle.Height -= (int)(2 * Scale.Y); } - if( this.tx文字[ b強調 ? 1 : 0 ] != null ) + if (this.tx文字[b強調 ? 1 : 0] != null) { - this.tx文字[ b強調 ? 1 : 0 ].t2D描画( CDTXMania.app.Device, x, y, rectangle ); + this.tx文字[b強調 ? 1 : 0].t2D描画(CDTXMania.app.Device, x, y, rectangle); } break; } } //x += (int) ( 8 * Scale.X ); - x += (int) ( 9 * Scale.X ); + x += (int)(9 * Scale.X); } } - private void t大文字表示( int x, int y, string str ) + private void t大文字表示(int x, int y, string str) { - this.t大文字表示( x, y, str, false ); + this.t大文字表示(x, y, str, false); } - private void t大文字表示( int x, int y, string str, bool b強調 ) + private void t大文字表示(int x, int y, string str, bool b強調) { - foreach( char ch in str ) + foreach (char ch in str) { - for( int i = 0; i < this.st大文字位置.Length; i++ ) + for (int i = 0; i < this.st大文字位置.Length; i++) { - if( this.st大文字位置[ i ].ch == ch ) + if (this.st大文字位置[i].ch == ch) { Rectangle rectangle = new Rectangle( - this.st大文字位置[ i ].pt.X, - this.st大文字位置[ i ].pt.Y, + this.st大文字位置[i].pt.X, + this.st大文字位置[i].pt.Y, (int)(11 * Scale.X), (int)(0x10 * Scale.Y) ); - if( ch == '.' ) + if (ch == '.') { rectangle.Width -= (int)(2 * Scale.X); rectangle.Height -= (int)(2 * Scale.Y); } - if( this.tx文字[ b強調 ? 1 : 0 ] != null ) + if (this.tx文字[b強調 ? 1 : 0] != null) { - this.tx文字[ b強調 ? 1 : 0 ].t2D描画( CDTXMania.app.Device, x, y, rectangle ); + this.tx文字[b強調 ? 1 : 0].t2D描画(CDTXMania.app.Device, x, y, rectangle); } break; } diff --git a/DTXManiaプロジェクト/コード/ステージ/08.結果/CActResultRank.cs b/DTXManiaプロジェクト/コード/ステージ/08.結果/CActResultRank.cs index 2bd5e40e..204118a0 100644 --- a/DTXManiaプロジェクト/コード/ステージ/08.結果/CActResultRank.cs +++ b/DTXManiaプロジェクト/コード/ステージ/08.結果/CActResultRank.cs @@ -34,11 +34,11 @@ namespace DTXMania } public override void On非活性化() { - if( this.ct白波移動 != null ) + if (this.ct白波移動 != null) { this.ct白波移動 = null; } - if( this.ctランク表示 != null ) + if (this.ctランク表示 != null) { this.ctランク表示 = null; } @@ -46,34 +46,34 @@ namespace DTXMania } public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - this.txランクパネル = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenResult rank panel.png" ) ); - this.tx白波 = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenResult rank wave.png" ) ); + this.txランクパネル = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenResult rank panel.png")); + this.tx白波 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenResult rank wave.png")); switch (CDTXMania.app.stage結果.n総合ランク値) { case 0: - this.txランク文字 = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenResult rankSS.png" ) ); + this.txランク文字 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenResult rankSS.png")); break; case 1: - this.txランク文字 = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenResult rankS.png" ) ); + this.txランク文字 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenResult rankS.png")); break; case 2: - this.txランク文字 = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenResult rankA.png" ) ); + this.txランク文字 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenResult rankA.png")); break; case 3: - this.txランク文字 = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenResult rankB.png" ) ); + this.txランク文字 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenResult rankB.png")); break; case 4: - this.txランク文字 = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenResult rankC.png" ) ); + this.txランク文字 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenResult rankC.png")); break; case 5: - this.txランク文字 = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenResult rankD.png" ) ); + this.txランク文字 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenResult rankD.png")); break; case 6: @@ -90,46 +90,46 @@ namespace DTXMania } public override void OnManagedリソースの解放() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.txランクパネル ); - TextureFactory.tテクスチャの解放( ref this.tx白波 ); - TextureFactory.tテクスチャの解放( ref this.txランク文字 ); + TextureFactory.tテクスチャの解放(ref this.txランクパネル); + TextureFactory.tテクスチャの解放(ref this.tx白波); + TextureFactory.tテクスチャの解放(ref this.txランク文字); base.OnManagedリソースの解放(); } } public override int On進行描画() { - if( base.b活性化してない ) + if (base.b活性化してない) { return 0; } - if( base.b初めての進行描画 ) + if (base.b初めての進行描画) { - this.ct白波移動 = new CCounter( -132, 0x170, 10, CDTXMania.app.Timer ); - this.ctランク表示 = new CCounter( 0, 0x514, 2, CDTXMania.app.Timer ); + this.ct白波移動 = new CCounter(-132, 0x170, 10, CDTXMania.app.Timer); + this.ctランク表示 = new CCounter(0, 0x514, 2, CDTXMania.app.Timer); base.b初めての進行描画 = false; } this.ct白波移動.t進行Loop(); this.ctランク表示.t進行(); - if( this.ctランク表示.n現在の値 >= 700 ) + if (this.ctランク表示.n現在の値 >= 700) { - float y = ( this.ctランク表示.n現在の値 > 0x3e8 ) ? 1f : ( ( (float) ( this.ctランク表示.n現在の値 - 700 ) ) / 300f ); - if( this.txランクパネル != null ) + float y = (this.ctランク表示.n現在の値 > 0x3e8) ? 1f : (((float)(this.ctランク表示.n現在の値 - 700)) / 300f); + if (this.txランクパネル != null) { - this.txランクパネル.n透明度 = (int) ( 255f * y ); - this.txランクパネル.vc拡大縮小倍率 = new Vector3( 1f, y, 1f ); + this.txランクパネル.n透明度 = (int)(255f * y); + this.txランクパネル.vc拡大縮小倍率 = new Vector3(1f, y, 1f); this.txランクパネル.t2D描画( CDTXMania.app.Device, this.n本体X * Scale.X, - (this.n本体Y + ( (int) ( ( 1f - y ) * 64f ) )) * Scale.Y + (this.n本体Y + ((int)((1f - y) * 64f))) * Scale.Y ); } } - if( this.ctランク表示.n現在の値 >= 0x3e8 ) + if (this.ctランク表示.n現在の値 >= 0x3e8) { - double num2 = ( (double) ( this.ctランク表示.n現在の値 - 0x3e8 ) ) / 300.0; - if( this.txランク文字 != null ) + double num2 = ((double)(this.ctランク表示.n現在の値 - 0x3e8)) / 300.0; + if (this.txランク文字 != null) { this.txランク文字.t2D描画( CDTXMania.app.Device, @@ -138,20 +138,20 @@ namespace DTXMania new Rectangle( 0, 0, - (int) ( 128.0 * num2 * Scale.X), + (int)(128.0 * num2 * Scale.X), (int)(0x80 * Scale.Y) ) ); } } this.t描画_白波(); - if( !this.ctランク表示.b終了値に達した ) + if (!this.ctランク表示.b終了値に達した) { return 0; } return 1; } - + // その他 @@ -164,41 +164,41 @@ namespace DTXMania private CTexture txランクパネル; private CTexture txランク文字; private CTexture tx白波; - + private void t描画_白波() { - if( !this.ctランク表示.b終了値に達してない ) + if (!this.ctランク表示.b終了値に達してない) { int num = this.ct白波移動.n現在の値; int num2 = this.n本体X; int y = this.n本体Y + num; - if( ( y < ( this.n本体Y + 0x80 ) ) && ( ( y + 0x20 ) > this.n本体Y ) ) + if ((y < (this.n本体Y + 0x80)) && ((y + 0x20) > this.n本体Y)) { - Rectangle rectangle = new Rectangle( 0, 0, 0x20, 0x20 ); - if( y < this.n本体Y ) + Rectangle rectangle = new Rectangle(0, 0, 0x20, 0x20); + if (y < this.n本体Y) { rectangle.Y += this.n本体Y - y; rectangle.Height -= this.n本体Y - y; y = this.n本体Y; } - if( ( y + 0x20 ) > ( this.n本体Y + 0x80 ) ) + if ((y + 0x20) > (this.n本体Y + 0x80)) { - rectangle.Height -= ( y + 0x20 ) - ( this.n本体Y + 0x80 ); + rectangle.Height -= (y + 0x20) - (this.n本体Y + 0x80); } - if( rectangle.Bottom > rectangle.Top ) + if (rectangle.Bottom > rectangle.Top) { - for( int i = 0; i < 4; i++ ) + for (int i = 0; i < 4; i++) { - if( this.tx白波 != null ) + if (this.tx白波 != null) { Rectangle rectangle1 = rectangle; - rectangle1.X = (int) ( rectangle1.X * Scale.X ); - rectangle1.Y = (int) ( rectangle1.Y * Scale.Y ); - rectangle1.Width = (int) ( rectangle1.Width * Scale.X ); - rectangle1.Height = (int) ( rectangle1.Height * Scale.Y ); + rectangle1.X = (int)(rectangle1.X * Scale.X); + rectangle1.Y = (int)(rectangle1.Y * Scale.Y); + rectangle1.Width = (int)(rectangle1.Width * Scale.X); + rectangle1.Height = (int)(rectangle1.Height * Scale.Y); this.tx白波.t2D描画( CDTXMania.app.Device, - (num2 + ( i * 0x20 )) * Scale.X, + (num2 + (i * 0x20)) * Scale.X, y * Scale.Y, rectangle1 ); diff --git a/DTXManiaプロジェクト/コード/ステージ/08.結果/CActResultSongBar.cs b/DTXManiaプロジェクト/コード/ステージ/08.結果/CActResultSongBar.cs index 633b37b3..caa27dee 100644 --- a/DTXManiaプロジェクト/コード/ステージ/08.結果/CActResultSongBar.cs +++ b/DTXManiaプロジェクト/コード/ステージ/08.結果/CActResultSongBar.cs @@ -32,17 +32,17 @@ namespace DTXMania { this.n本体X = 0; this.n本体Y = 0x18b; - this.ft曲名用フォント = new Font( "MS PGothic", 44f * Scale.Y, FontStyle.Bold, GraphicsUnit.Pixel ); + this.ft曲名用フォント = new Font("MS PGothic", 44f * Scale.Y, FontStyle.Bold, GraphicsUnit.Pixel); base.On活性化(); } public override void On非活性化() { - if( this.ft曲名用フォント != null ) + if (this.ft曲名用フォント != null) { this.ft曲名用フォント.Dispose(); this.ft曲名用フォント = null; } - if( this.ct登場用 != null ) + if (this.ct登場用 != null) { this.ct登場用 = null; } @@ -50,23 +50,23 @@ namespace DTXMania } public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - this.txバー = TextureFactory.tテクスチャの生成Af( CSkin.Path( @"Graphics\ScreenResult song bar.png" ), false ); + this.txバー = TextureFactory.tテクスチャの生成Af(CSkin.Path(@"Graphics\ScreenResult song bar.png"), false); try { - Bitmap image = new Bitmap( (int)(0x3a8 * Scale.X), (int)(0x36 * Scale.Y) ); - Graphics graphics = Graphics.FromImage( image ); + Bitmap image = new Bitmap((int)(0x3a8 * Scale.X), (int)(0x36 * Scale.Y)); + Graphics graphics = Graphics.FromImage(image); graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias; - graphics.DrawString( CDTXMania.app.DTX.TITLE, this.ft曲名用フォント, Brushes.White, ( float ) 8f * Scale.X, ( float ) 0f ); - this.tx曲名 = new CTexture( CDTXMania.app.Device, image, CDTXMania.app.TextureFormat ); - this.tx曲名.vc拡大縮小倍率 = new Vector3( 0.5f, 0.5f, 1f ); + graphics.DrawString(CDTXMania.app.DTX.TITLE, this.ft曲名用フォント, Brushes.White, (float)8f * Scale.X, (float)0f); + this.tx曲名 = new CTexture(CDTXMania.app.Device, image, CDTXMania.app.TextureFormat); + this.tx曲名.vc拡大縮小倍率 = new Vector3(0.5f, 0.5f, 1f); graphics.Dispose(); image.Dispose(); } - catch( CTextureCreateFailedException ) + catch (CTextureCreateFailedException) { - Trace.TraceError( "曲名テクスチャの生成に失敗しました。" ); + Trace.TraceError("曲名テクスチャの生成に失敗しました。"); this.tx曲名 = null; } base.OnManagedリソースの作成(); @@ -74,45 +74,45 @@ namespace DTXMania } public override void OnManagedリソースの解放() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.txバー ); - TextureFactory.tテクスチャの解放( ref this.tx曲名 ); + TextureFactory.tテクスチャの解放(ref this.txバー); + TextureFactory.tテクスチャの解放(ref this.tx曲名); base.OnManagedリソースの解放(); } } public override int On進行描画() { - if( base.b活性化してない ) + if (base.b活性化してない) { return 0; } - if( base.b初めての進行描画 ) + if (base.b初めての進行描画) { - this.ct登場用 = new CCounter( 0, 270, 4, CDTXMania.app.Timer ); + this.ct登場用 = new CCounter(0, 270, 4, CDTXMania.app.Timer); base.b初めての進行描画 = false; } this.ct登場用.t進行(); int num = 0x1d4; int num2 = num - 0x40; - if( this.ct登場用.b進行中 ) + if (this.ct登場用.b進行中) { - if( this.ct登場用.n現在の値 <= 100 ) + if (this.ct登場用.n現在の値 <= 100) { - double num3 = 1.0 - ( ( (double) this.ct登場用.n現在の値 ) / 100.0 ); - this.n本体X = -( (int) ( num * Math.Sin( Math.PI / 2 * num3 ) ) ); + double num3 = 1.0 - (((double)this.ct登場用.n現在の値) / 100.0); + this.n本体X = -((int)(num * Math.Sin(Math.PI / 2 * num3))); this.n本体Y = 0x18b; } - else if( this.ct登場用.n現在の値 <= 200 ) + else if (this.ct登場用.n現在の値 <= 200) { - double num4 = ( (double) ( this.ct登場用.n現在の値 - 100 ) ) / 100.0; - this.n本体X = -( (int) ( ( ( (double) num ) / 6.0 ) * Math.Sin( Math.PI * num4 ) ) ); + double num4 = ((double)(this.ct登場用.n現在の値 - 100)) / 100.0; + this.n本体X = -((int)((((double)num) / 6.0) * Math.Sin(Math.PI * num4))); this.n本体Y = 0x18b; } - else if( this.ct登場用.n現在の値 <= 270 ) + else if (this.ct登場用.n現在の値 <= 270) { - double num5 = ( (double) ( this.ct登場用.n現在の値 - 200 ) ) / 70.0; - this.n本体X = -( (int) ( ( ( (double) num ) / 18.0 ) * Math.Sin( Math.PI * num5 ) ) ); + double num5 = ((double)(this.ct登場用.n現在の値 - 200)) / 70.0; + this.n本体X = -((int)((((double)num) / 18.0) * Math.Sin(Math.PI * num5))); this.n本体Y = 0x18b; } } @@ -124,20 +124,20 @@ namespace DTXMania int num6 = this.n本体X; int y = this.n本体Y; int num8 = 0; - while( num8 < num2 ) + while (num8 < num2) { - Rectangle rectangle = new Rectangle( 0, 0, 0x40, 0x40 ); - if( ( num8 + rectangle.Width ) >= num2 ) + Rectangle rectangle = new Rectangle(0, 0, 0x40, 0x40); + if ((num8 + rectangle.Width) >= num2) { - rectangle.Width -= ( num8 + rectangle.Width ) - num2; + rectangle.Width -= (num8 + rectangle.Width) - num2; } - if( this.txバー != null ) + if (this.txバー != null) { Rectangle rectangle1 = rectangle; - rectangle1.X = (int) ( rectangle1.X * Scale.X ); - rectangle1.Y = (int) ( rectangle1.Y * Scale.Y ); - rectangle1.Width = (int) ( rectangle1.Width * Scale.X ); - rectangle1.Height = (int) ( rectangle1.Height * Scale.Y ); + rectangle1.X = (int)(rectangle1.X * Scale.X); + rectangle1.Y = (int)(rectangle1.Y * Scale.Y); + rectangle1.Width = (int)(rectangle1.Width * Scale.X); + rectangle1.Height = (int)(rectangle1.Height * Scale.Y); this.txバー.t2D描画( CDTXMania.app.Device, (num6 + num8) * Scale.X, @@ -147,7 +147,7 @@ namespace DTXMania } num8 += rectangle.Width; } - if( this.txバー != null ) + if (this.txバー != null) { this.txバー.t2D描画( CDTXMania.app.Device, @@ -161,7 +161,7 @@ namespace DTXMania ) ); } - if( this.tx曲名 != null ) + if (this.tx曲名 != null) { this.tx曲名.t2D描画( CDTXMania.app.Device, @@ -169,7 +169,7 @@ namespace DTXMania (this.n本体Y + 20) * Scale.Y ); } - if( !this.ct登場用.b終了値に達した ) + if (!this.ct登場用.b終了値に達した) { return 0; } diff --git a/DTXManiaプロジェクト/コード/ステージ/08.結果/CStage結果.cs b/DTXManiaプロジェクト/コード/ステージ/08.結果/CStage結果.cs index 59e8e68d..3d0d7d60 100644 --- a/DTXManiaプロジェクト/コード/ステージ/08.結果/CStage結果.cs +++ b/DTXManiaプロジェクト/コード/ステージ/08.結果/CStage結果.cs @@ -14,14 +14,14 @@ namespace DTXMania public STDGBVALUE b新記録スキル; public STDGBVALUE b新記録スコア; - public STDGBVALUE b新記録ランク; + public STDGBVALUE b新記録ランク; public STDGBVALUE fPerfect率; public STDGBVALUE fGreat率; public STDGBVALUE fGood率; public STDGBVALUE fPoor率; - public STDGBVALUE fMiss率; - public STDGBVALUE bオート; // #23596 10.11.16 add ikanick - // 10.11.17 change (int to bool) ikanick + public STDGBVALUE fMiss率; + public STDGBVALUE bオート; // #23596 10.11.16 add ikanick + // 10.11.17 change (int to bool) ikanick public STDGBVALUE nランク値; public STDGBVALUE n演奏回数; public int n総合ランク値; @@ -36,30 +36,30 @@ namespace DTXMania this.st演奏記録.Drums = new CScoreIni.C演奏記録(); this.st演奏記録.Guitar = new CScoreIni.C演奏記録(); this.st演奏記録.Bass = new CScoreIni.C演奏記録(); - this.r空うちドラムチップ = new CChip[ 10 ]; + this.r空うちドラムチップ = new CChip[10]; this.n総合ランク値 = -1; this.nチャンネル0Atoレーン07 = new int[] { 1, 2, 3, 4, 5, 7, 6, 1, 7, 0 }; base.eステージID = CStage.Eステージ.結果; base.eフェーズID = CStage.Eフェーズ.共通_通常状態; base.b活性化してない = true; - base.list子Activities.Add( this.actResultImage = new CActResultImage() ); - base.list子Activities.Add( this.actParameterPanel = new CActResultParameterPanel() ); - base.list子Activities.Add( this.actRank = new CActResultRank() ); - base.list子Activities.Add( this.actSongBar = new CActResultSongBar() ); - base.list子Activities.Add( this.actOption = new CActオプションパネル() ); - base.list子Activities.Add( this.actFI = new CActFIFOWhite() ); - base.list子Activities.Add( this.actFO = new CActFIFOBlack() ); - base.list子Activities.Add( this.actAVI = new CAct演奏AVI() ); + base.list子Activities.Add(this.actResultImage = new CActResultImage()); + base.list子Activities.Add(this.actParameterPanel = new CActResultParameterPanel()); + base.list子Activities.Add(this.actRank = new CActResultRank()); + base.list子Activities.Add(this.actSongBar = new CActResultSongBar()); + base.list子Activities.Add(this.actOption = new CActオプションパネル()); + base.list子Activities.Add(this.actFI = new CActFIFOWhite()); + base.list子Activities.Add(this.actFO = new CActFIFOBlack()); + base.list子Activities.Add(this.actAVI = new CAct演奏AVI()); this.actResultImage.actAVI = this.actAVI; } - + // CStage 実装 public override void On活性化() { - Trace.TraceInformation( "結果ステージを活性化します。" ); + Trace.TraceInformation("結果ステージを活性化します。"); Trace.Indent(); try { @@ -70,31 +70,31 @@ namespace DTXMania this.bIsCheckedWhetherResultScreenShouldSaveOrNot = false; // #24609 2011.3.14 yyagi this.n最後に再生したHHのWAV番号 = -1; this.e最後に再生したHHのチャンネル番号 = Ech定義.Invalid; - for( int i = 0; i < 3; i++ ) + for (int i = 0; i < 3; i++) { - this.b新記録スキル[ i ] = false; - this.b新記録スコア[ i ] = false; - this.b新記録ランク[ i ] = false; + this.b新記録スキル[i] = false; + this.b新記録スコア[i] = false; + this.b新記録ランク[i] = false; } //--------------------- #endregion #region [ 結果の計算 ] //--------------------- - for( int i = 0; i < 3; i++ ) + for (int i = 0; i < 3; i++) { - this.nランク値[ i ] = -1; - this.fPerfect率[ i ] = this.fGreat率[ i ] = this.fGood率[ i ] = this.fPoor率[ i ] = this.fMiss率[ i ] = 0.0f; // #28500 2011.5.24 yyagi - if ( ( ( ( i != 0 ) || ( CDTXMania.app.DTX.bチップがある.Drums && !CDTXMania.app.ConfigIni.bギタレボモード ) ) && - ( ( i != 1 ) || CDTXMania.app.DTX.bチップがある.Guitar ) ) && - ( ( i != 2 ) || CDTXMania.app.DTX.bチップがある.Bass ) ) + this.nランク値[i] = -1; + this.fPerfect率[i] = this.fGreat率[i] = this.fGood率[i] = this.fPoor率[i] = this.fMiss率[i] = 0.0f; // #28500 2011.5.24 yyagi + if ((((i != 0) || (CDTXMania.app.DTX.bチップがある.Drums && !CDTXMania.app.ConfigIni.bギタレボモード)) && + ((i != 1) || CDTXMania.app.DTX.bチップがある.Guitar)) && + ((i != 2) || CDTXMania.app.DTX.bチップがある.Bass)) { - CScoreIni.C演奏記録 part = this.st演奏記録[ i ]; + CScoreIni.C演奏記録 part = this.st演奏記録[i]; bool bIsAutoPlay = true; - switch( i ) + switch (i) { case 0: - bIsAutoPlay = CDTXMania.app.ConfigIni.bドラムが全部オートプレイである || !CDTXMania.app.ConfigIni.bDrums有効; // #35411 chnmr0 add Drums が有効でない場合 AUTO 扱いとして LastPlay 更新しない + bIsAutoPlay = CDTXMania.app.ConfigIni.bドラムが全部オートプレイである || !CDTXMania.app.ConfigIni.bDrums有効; // #35411 chnmr0 add Drums が有効でない場合 AUTO 扱いとして LastPlay 更新しない break; case 1: @@ -105,130 +105,131 @@ namespace DTXMania bIsAutoPlay = CDTXMania.app.ConfigIni.bベースが全部オートプレイである || !CDTXMania.app.ConfigIni.bGuitar有効; break; } - this.fPerfect率[ i ] = bIsAutoPlay ? 0f : ( ( 100f * part.nPerfect数 ) / ( (float) part.n全チップ数 ) ); - this.fGreat率[ i ] = bIsAutoPlay ? 0f : ( ( 100f * part.nGreat数 ) / ( (float) part.n全チップ数 ) ); - this.fGood率[ i ] = bIsAutoPlay ? 0f : ( ( 100f * part.nGood数 ) / ( (float) part.n全チップ数 ) ); - this.fPoor率[ i ] = bIsAutoPlay ? 0f : ( ( 100f * part.nPoor数 ) / ( (float) part.n全チップ数 ) ); - this.fMiss率[ i ] = bIsAutoPlay ? 0f : ( ( 100f * part.nMiss数 ) / ( (float) part.n全チップ数 ) ); - this.bオート[ i ] = bIsAutoPlay; // #23596 10.11.16 add ikanick そのパートがオートなら1 - // 10.11.17 change (int to bool) ikanick - this.nランク値[ i ] = CScoreIni.tランク値を計算して返す( part ); + this.fPerfect率[i] = bIsAutoPlay ? 0f : ((100f * part.nPerfect数) / ((float)part.n全チップ数)); + this.fGreat率[i] = bIsAutoPlay ? 0f : ((100f * part.nGreat数) / ((float)part.n全チップ数)); + this.fGood率[i] = bIsAutoPlay ? 0f : ((100f * part.nGood数) / ((float)part.n全チップ数)); + this.fPoor率[i] = bIsAutoPlay ? 0f : ((100f * part.nPoor数) / ((float)part.n全チップ数)); + this.fMiss率[i] = bIsAutoPlay ? 0f : ((100f * part.nMiss数) / ((float)part.n全チップ数)); + this.bオート[i] = bIsAutoPlay; // #23596 10.11.16 add ikanick そのパートがオートなら1 + // 10.11.17 change (int to bool) ikanick + this.nランク値[i] = CScoreIni.tランク値を計算して返す(part); } } - this.n総合ランク値 = CScoreIni.t総合ランク値を計算して返す( this.st演奏記録.Drums, this.st演奏記録.Guitar, this.st演奏記録.Bass ); + this.n総合ランク値 = CScoreIni.t総合ランク値を計算して返す(this.st演奏記録.Drums, this.st演奏記録.Guitar, this.st演奏記録.Bass); //--------------------- #endregion - #region [ .score.ini の作成と出力 ] + #region [ .score.ini の作成と出力 ] //--------------------- string str = CDTXMania.app.DTX.strファイル名の絶対パス + ".score.ini"; - CScoreIni ini = new CScoreIni( str ); + CScoreIni ini = new CScoreIni(str); bool[] b今までにフルコンボしたことがある = new bool[] { false, false, false }; - for( int i = 0; i < 3; i++ ) + for (int i = 0; i < 3; i++) { // フルコンボチェックならびに新記録ランクチェックは、ini.Record[] が、スコアチェックや演奏型スキルチェックの IF 内で書き直されてしまうよりも前に行う。(2010.9.10) - - b今までにフルコンボしたことがある[ i ] = ini.stセクション[ i * 2 ].bフルコンボである | ini.stセクション[ i * 2 + 1 ].bフルコンボである; + + b今までにフルコンボしたことがある[i] = ini.stセクション[i * 2].bフルコンボである | ini.stセクション[i * 2 + 1].bフルコンボである; #region [deleted by #24459] - // if( this.nランク値[ i ] <= CScoreIni.tランク値を計算して返す( ini.stセクション[ ( i * 2 ) + 1 ] ) ) - // { - // this.b新記録ランク[ i ] = true; + // if( this.nランク値[ i ] <= CScoreIni.tランク値を計算して返す( ini.stセクション[ ( i * 2 ) + 1 ] ) ) + // { + // this.b新記録ランク[ i ] = true; // } #endregion // #24459 上記の条件だと[HiSkill.***]でのランクしかチェックしていないので、BestRankと比較するよう変更。 - if ( this.nランク値[ i ] >= 0 && ini.stファイル.BestRank[ i ] > this.nランク値[ i ] ) // #24459 2011.3.1 yyagi update BestRank + if (this.nランク値[i] >= 0 && ini.stファイル.BestRank[i] > this.nランク値[i]) // #24459 2011.3.1 yyagi update BestRank { - this.b新記録ランク[ i ] = true; - ini.stファイル.BestRank[ i ] = this.nランク値[ i ]; + this.b新記録ランク[i] = true; + ini.stファイル.BestRank[i] = this.nランク値[i]; } // 新記録スコアチェック - if( this.st演奏記録[ i ].nスコア > ini.stセクション[ i * 2 ].nスコア ) + if (this.st演奏記録[i].nスコア > ini.stセクション[i * 2].nスコア) { - this.b新記録スコア[ i ] = true; - ini.stセクション[ i * 2 ] = this.st演奏記録[ i ]; - this.SaveGhost( i * 2 ); // #35411 chnmr0 add + this.b新記録スコア[i] = true; + ini.stセクション[i * 2] = this.st演奏記録[i]; + this.SaveGhost(i * 2); // #35411 chnmr0 add } - // 新記録スキルチェック - if (this.st演奏記録[i].db演奏型スキル値 > ini.stセクション[(i * 2) + 1].db演奏型スキル値) - { - this.b新記録スキル[ i ] = true; - ini.stセクション[(i * 2) + 1] = this.st演奏記録[ i ]; - this.SaveGhost((i * 2) + 1); // #35411 chnmr0 add - } + // 新記録スキルチェック + if (this.st演奏記録[i].db演奏型スキル値 > ini.stセクション[(i * 2) + 1].db演奏型スキル値) + { + this.b新記録スキル[i] = true; + ini.stセクション[(i * 2) + 1] = this.st演奏記録[i]; + this.SaveGhost((i * 2) + 1); // #35411 chnmr0 add + } // ラストプレイ #23595 2011.1.9 ikanick - // オートじゃなければプレイ結果を書き込む - if (this.bオート[ i ] == false) { - ini.stセクション[i + 6] = this.st演奏記録[ i ]; - this.SaveGhost(i + 6); // #35411 chnmr0 add - } - - // #23596 10.11.16 add ikanick オートじゃないならクリア回数を1増やす - // 11.02.05 bオート to t更新条件を取得する use ikanick - bool[] b更新が必要か否か = new bool[ 3 ]; - CScoreIni.t更新条件を取得する( out b更新が必要か否か[ 0 ], out b更新が必要か否か[ 1 ], out b更新が必要か否か[ 2 ] ); - - if (b更新が必要か否か[ i ]) - { - switch ( i ) - { - case 0: - ini.stファイル.ClearCountDrums++; - break; - case 1: - ini.stファイル.ClearCountGuitar++; - break; - case 2: - ini.stファイル.ClearCountBass++; - break; - default: - throw new Exception("クリア回数増加のk(0-2)が範囲外です。"); - } - } - //---------------------------------------------------------------------/ + // オートじゃなければプレイ結果を書き込む + if (this.bオート[i] == false) + { + ini.stセクション[i + 6] = this.st演奏記録[i]; + this.SaveGhost(i + 6); // #35411 chnmr0 add + } + + // #23596 10.11.16 add ikanick オートじゃないならクリア回数を1増やす + // 11.02.05 bオート to t更新条件を取得する use ikanick + bool[] b更新が必要か否か = new bool[3]; + CScoreIni.t更新条件を取得する(out b更新が必要か否か[0], out b更新が必要か否か[1], out b更新が必要か否か[2]); + + if (b更新が必要か否か[i]) + { + switch (i) + { + case 0: + ini.stファイル.ClearCountDrums++; + break; + case 1: + ini.stファイル.ClearCountGuitar++; + break; + case 2: + ini.stファイル.ClearCountBass++; + break; + default: + throw new Exception("クリア回数増加のk(0-2)が範囲外です。"); + } + } + //---------------------------------------------------------------------/ } - if( CDTXMania.app.ConfigIni.bScoreIniを出力する ) - ini.t書き出し( str ); + if (CDTXMania.app.ConfigIni.bScoreIniを出力する) + ini.t書き出し(str); //--------------------- #endregion #region [ リザルト画面への演奏回数の更新 #24281 2011.1.30 yyagi] - if( CDTXMania.app.ConfigIni.bScoreIniを出力する ) - { - this.n演奏回数.Drums = ini.stファイル.PlayCountDrums; - this.n演奏回数.Guitar = ini.stファイル.PlayCountGuitar; - this.n演奏回数.Bass = ini.stファイル.PlayCountBass; - } + if (CDTXMania.app.ConfigIni.bScoreIniを出力する) + { + this.n演奏回数.Drums = ini.stファイル.PlayCountDrums; + this.n演奏回数.Guitar = ini.stファイル.PlayCountGuitar; + this.n演奏回数.Bass = ini.stファイル.PlayCountBass; + } #endregion #region [ 選曲画面の譜面情報の更新 ] //--------------------- - if( !CDTXMania.app.bコンパクトモード ) + if (!CDTXMania.app.bコンパクトモード) { Cスコア cスコア = CDTXMania.app.stage選曲.r確定されたスコア; - bool[] b更新が必要か否か = new bool[ 3 ]; - CScoreIni.t更新条件を取得する( out b更新が必要か否か[ 0 ], out b更新が必要か否か[ 1 ], out b更新が必要か否か[ 2 ] ); - for( int m = 0; m < 3; m++ ) + bool[] b更新が必要か否か = new bool[3]; + CScoreIni.t更新条件を取得する(out b更新が必要か否か[0], out b更新が必要か否か[1], out b更新が必要か否か[2]); + for (int m = 0; m < 3; m++) { - if( b更新が必要か否か[ m ] ) + if (b更新が必要か否か[m]) { // FullCombo した記録を FullCombo なしで超えた場合、FullCombo マークが消えてしまう。 // → FullCombo は、最新記録と関係なく、一度達成したらずっとつくようにする。(2010.9.11) - cスコア.譜面情報.フルコンボ[ m ] = this.st演奏記録[ m ].bフルコンボである | b今までにフルコンボしたことがある[ m ]; + cスコア.譜面情報.フルコンボ[m] = this.st演奏記録[m].bフルコンボである | b今までにフルコンボしたことがある[m]; - if( this.b新記録スキル[ m ] ) + if (this.b新記録スキル[m]) { - cスコア.譜面情報.最大スキル[ m ] = this.st演奏記録[ m ].db演奏型スキル値; - } + cスコア.譜面情報.最大スキル[m] = this.st演奏記録[m].db演奏型スキル値; + } - if (this.b新記録ランク[ m ]) - { - cスコア.譜面情報.最大ランク[ m ] = this.nランク値[ m ]; - } + if (this.b新記録ランク[m]) + { + cスコア.譜面情報.最大ランク[m] = this.nランク値[m]; + } } } } @@ -237,28 +238,28 @@ namespace DTXMania #region [ #RESULTSOUND_xx の再生(あれば)] //--------------------- - int rank = CScoreIni.t総合ランク値を計算して返す( this.st演奏記録.Drums, this.st演奏記録.Guitar, this.st演奏記録.Bass ); + int rank = CScoreIni.t総合ランク値を計算して返す(this.st演奏記録.Drums, this.st演奏記録.Guitar, this.st演奏記録.Bass); if (rank == 99) // #23534 2010.10.28 yyagi: 演奏チップが0個のときは、rankEと見なす { rank = 6; } - - if( string.IsNullOrEmpty( CDTXMania.app.DTX.RESULTSOUND[ rank ] ) ) + + if (string.IsNullOrEmpty(CDTXMania.app.DTX.RESULTSOUND[rank])) { CDTXMania.app.Skin.soundステージクリア音.t再生する(); this.rResultSound = null; } else { - string str2 = CDTXMania.app.DTX.strフォルダ名 + CDTXMania.app.DTX.RESULTSOUND[ rank ]; + string str2 = CDTXMania.app.DTX.strフォルダ名 + CDTXMania.app.DTX.RESULTSOUND[rank]; try { - this.rResultSound = CDTXMania.app.Sound管理.tサウンドを生成する( str2 ); + this.rResultSound = CDTXMania.app.Sound管理.tサウンドを生成する(str2); } catch { - Trace.TraceError( "サウンドの生成に失敗しました。({0})", new object[] { str2 } ); + Trace.TraceError("サウンドの生成に失敗しました。({0})", new object[] { str2 }); this.rResultSound = null; } } @@ -269,111 +270,111 @@ namespace DTXMania } finally { - Trace.TraceInformation( "結果ステージの活性化を完了しました。" ); + Trace.TraceInformation("結果ステージの活性化を完了しました。"); Trace.Unindent(); } } - // #35411 chnmr0 add - private void SaveGhost(int sectionIndex) - { - STDGBVALUE saveCond = new STDGBVALUE(); - saveCond.Drums = true; - saveCond.Guitar = true; - saveCond.Bass = true; - - foreach( CChip chip in CDTXMania.app.DTX.listChip ) - { - if( chip.bIsAutoPlayed ) - { + // #35411 chnmr0 add + private void SaveGhost(int sectionIndex) + { + STDGBVALUE saveCond = new STDGBVALUE(); + saveCond.Drums = true; + saveCond.Guitar = true; + saveCond.Bass = true; + + foreach (CChip chip in CDTXMania.app.DTX.listChip) + { + if (chip.bIsAutoPlayed) + { if (chip.eチャンネル番号 != Ech定義.Guitar_Wailing && chip.eチャンネル番号 != Ech定義.Bass_Wailing) // Guitar/Bass Wailing は OK { saveCond[(int)(chip.e楽器パート)] = false; } - } - } - for(int instIndex = 0; instIndex < 3; ++instIndex) - { - saveCond[instIndex] &= CDTXMania.app.DTX.listAutoGhostLag.Drums == null; - } - - string directory = CDTXMania.app.DTX.strフォルダ名; - string filename = CDTXMania.app.DTX.strファイル名 + "."; - E楽器パート inst = E楽器パート.UNKNOWN; - - if ( sectionIndex == 0 ) - { - filename += "hiscore.dr.ghost"; - inst = E楽器パート.DRUMS; - } - else if (sectionIndex == 1 ) - { - filename += "hiskill.dr.ghost"; - inst = E楽器パート.DRUMS; - } - if (sectionIndex == 2 ) - { - filename += "hiscore.gt.ghost"; - inst = E楽器パート.GUITAR; - } - else if (sectionIndex == 3 ) - { - filename += "hiskill.gt.ghost"; - inst = E楽器パート.GUITAR; - } - if (sectionIndex == 4 ) - { - filename += "hiscore.bs.ghost"; - inst = E楽器パート.BASS; - } - else if (sectionIndex == 5) - { - filename += "hiskill.bs.ghost"; - inst = E楽器パート.BASS; - } - else if (sectionIndex == 6) - { - filename += "lastplay.dr.ghost"; - inst = E楽器パート.DRUMS; - } - else if (sectionIndex == 7 ) - { - filename += "lastplay.gt.ghost"; - inst = E楽器パート.GUITAR; - } - else if (sectionIndex == 8) - { - filename += "lastplay.bs.ghost"; - inst = E楽器パート.BASS; - } - - if (inst == E楽器パート.UNKNOWN) - { - return; - } - - int cnt = 0; - foreach (DTXMania.CChip chip in CDTXMania.app.DTX.listChip) - { - if (chip.e楽器パート == inst) - { - ++cnt; - } - } - - if( saveCond[(int)inst] ) - { - using (FileStream fs = new FileStream(directory + "\\" + filename, FileMode.Create, FileAccess.Write)) - { - using (BinaryWriter bw = new BinaryWriter(fs)) - { - bw.Write((Int32)cnt); - foreach (DTXMania.CChip chip in CDTXMania.app.DTX.listChip) - { - if (chip.e楽器パート == inst) - { - // -128 ms から 127 ms までのラグしか保存しない - // その範囲を超えているラグはクランプ + } + } + for (int instIndex = 0; instIndex < 3; ++instIndex) + { + saveCond[instIndex] &= CDTXMania.app.DTX.listAutoGhostLag.Drums == null; + } + + string directory = CDTXMania.app.DTX.strフォルダ名; + string filename = CDTXMania.app.DTX.strファイル名 + "."; + E楽器パート inst = E楽器パート.UNKNOWN; + + if (sectionIndex == 0) + { + filename += "hiscore.dr.ghost"; + inst = E楽器パート.DRUMS; + } + else if (sectionIndex == 1) + { + filename += "hiskill.dr.ghost"; + inst = E楽器パート.DRUMS; + } + if (sectionIndex == 2) + { + filename += "hiscore.gt.ghost"; + inst = E楽器パート.GUITAR; + } + else if (sectionIndex == 3) + { + filename += "hiskill.gt.ghost"; + inst = E楽器パート.GUITAR; + } + if (sectionIndex == 4) + { + filename += "hiscore.bs.ghost"; + inst = E楽器パート.BASS; + } + else if (sectionIndex == 5) + { + filename += "hiskill.bs.ghost"; + inst = E楽器パート.BASS; + } + else if (sectionIndex == 6) + { + filename += "lastplay.dr.ghost"; + inst = E楽器パート.DRUMS; + } + else if (sectionIndex == 7) + { + filename += "lastplay.gt.ghost"; + inst = E楽器パート.GUITAR; + } + else if (sectionIndex == 8) + { + filename += "lastplay.bs.ghost"; + inst = E楽器パート.BASS; + } + + if (inst == E楽器パート.UNKNOWN) + { + return; + } + + int cnt = 0; + foreach (DTXMania.CChip chip in CDTXMania.app.DTX.listChip) + { + if (chip.e楽器パート == inst) + { + ++cnt; + } + } + + if (saveCond[(int)inst]) + { + using (FileStream fs = new FileStream(directory + "\\" + filename, FileMode.Create, FileAccess.Write)) + { + using (BinaryWriter bw = new BinaryWriter(fs)) + { + bw.Write((Int32)cnt); + foreach (DTXMania.CChip chip in CDTXMania.app.DTX.listChip) + { + if (chip.e楽器パート == inst) + { + // -128 ms から 127 ms までのラグしか保存しない + // その範囲を超えているラグはクランプ // ラグデータの 上位8ビットでそのチップの前でギター空打ちBADがあったことを示す int lag = chip.nLag; if (lag < -128) @@ -386,70 +387,70 @@ namespace DTXMania } byte lower = (byte)(lag + 128); int upper = chip.extendInfoForGhost ? 0 : 1; - bw.Write((short)( (upper<<8) | lower)); - } - } - } - } - } - } + bw.Write((short)((upper << 8) | lower)); + } + } + } + } + } + } public override void On非活性化() { - if( this.rResultSound != null ) + if (this.rResultSound != null) { - CDTXMania.app.Sound管理.tサウンドを破棄する( this.rResultSound ); + CDTXMania.app.Sound管理.tサウンドを破棄する(this.rResultSound); this.rResultSound = null; } base.On非活性化(); } public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - this.tx背景 = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenResult background.jpg" ) ); - this.tx上部パネル = TextureFactory.tテクスチャの生成Af( CSkin.Path( @"Graphics\ScreenResult header panel.png" ), true ); - this.tx下部パネル = TextureFactory.tテクスチャの生成Af( CSkin.Path( @"Graphics\ScreenResult footer panel.png" ), true ); - this.txオプションパネル = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\Screen option panels.png" ) ); + this.tx背景 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenResult background.jpg")); + this.tx上部パネル = TextureFactory.tテクスチャの生成Af(CSkin.Path(@"Graphics\ScreenResult header panel.png"), true); + this.tx下部パネル = TextureFactory.tテクスチャの生成Af(CSkin.Path(@"Graphics\ScreenResult footer panel.png"), true); + this.txオプションパネル = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\Screen option panels.png")); base.OnManagedリソースの作成(); } } public override void OnManagedリソースの解放() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - if( this.ct登場用 != null ) + if (this.ct登場用 != null) { this.ct登場用 = null; } - TextureFactory.tテクスチャの解放( ref this.tx背景 ); - TextureFactory.tテクスチャの解放( ref this.tx上部パネル ); - TextureFactory.tテクスチャの解放( ref this.tx下部パネル ); - TextureFactory.tテクスチャの解放( ref this.txオプションパネル ); + TextureFactory.tテクスチャの解放(ref this.tx背景); + TextureFactory.tテクスチャの解放(ref this.tx上部パネル); + TextureFactory.tテクスチャの解放(ref this.tx下部パネル); + TextureFactory.tテクスチャの解放(ref this.txオプションパネル); base.OnManagedリソースの解放(); } } public override int On進行描画() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { int num; - if( base.b初めての進行描画 ) + if (base.b初めての進行描画) { - this.ct登場用 = new CCounter( 0, 100, 5, CDTXMania.app.Timer ); + this.ct登場用 = new CCounter(0, 100, 5, CDTXMania.app.Timer); this.actFI.tフェードイン開始(); base.eフェーズID = CStage.Eフェーズ.共通_フェードイン; - if( this.rResultSound != null ) + if (this.rResultSound != null) { this.rResultSound.t再生を開始する(); } base.b初めての進行描画 = false; } this.bアニメが完了 = true; - if( this.ct登場用.b進行中 ) + if (this.ct登場用.b進行中) { this.ct登場用.t進行(); - if( this.ct登場用.b終了値に達した ) + if (this.ct登場用.b終了値に達した) { this.ct登場用.t停止(); } @@ -461,58 +462,58 @@ namespace DTXMania // 描画 - if( this.tx背景 != null ) + if (this.tx背景 != null) { - this.tx背景.t2D描画( CDTXMania.app.Device, 0, 0 ); + this.tx背景.t2D描画(CDTXMania.app.Device, 0, 0); } - if( this.ct登場用.b進行中 && ( this.tx上部パネル != null ) ) + if (this.ct登場用.b進行中 && (this.tx上部パネル != null)) { - double num2 = ( (double) this.ct登場用.n現在の値 ) / 100.0; - double num3 = Math.Sin( Math.PI / 2 * num2 ); - num = ( (int) ( this.tx上部パネル.sz画像サイズ.Height * num3 ) ) - this.tx上部パネル.sz画像サイズ.Height; + double num2 = ((double)this.ct登場用.n現在の値) / 100.0; + double num3 = Math.Sin(Math.PI / 2 * num2); + num = ((int)(this.tx上部パネル.sz画像サイズ.Height * num3)) - this.tx上部パネル.sz画像サイズ.Height; } else { num = 0; } - if( this.tx上部パネル != null ) + if (this.tx上部パネル != null) { - this.tx上部パネル.t2D描画( CDTXMania.app.Device, 0, num * Scale.Y ); + this.tx上部パネル.t2D描画(CDTXMania.app.Device, 0, num * Scale.Y); } - if( this.tx下部パネル != null ) + if (this.tx下部パネル != null) { - this.tx下部パネル.t2D描画( CDTXMania.app.Device, 0, ( SampleFramework.GameWindowSize.Height - this.tx下部パネル.sz画像サイズ.Height) ); + this.tx下部パネル.t2D描画(CDTXMania.app.Device, 0, (SampleFramework.GameWindowSize.Height - this.tx下部パネル.sz画像サイズ.Height)); } this.actOption.On進行描画(); - if( this.actResultImage.On進行描画() == 0 ) + if (this.actResultImage.On進行描画() == 0) { this.bアニメが完了 = false; } - if ( this.actParameterPanel.On進行描画() == 0 ) + if (this.actParameterPanel.On進行描画() == 0) { this.bアニメが完了 = false; } - if ( this.actRank.On進行描画() == 0 ) + if (this.actRank.On進行描画() == 0) { this.bアニメが完了 = false; } - if ( this.actSongBar.On進行描画() == 0 ) + if (this.actSongBar.On進行描画() == 0) { this.bアニメが完了 = false; } - if( base.eフェーズID == CStage.Eフェーズ.共通_フェードイン ) + if (base.eフェーズID == CStage.Eフェーズ.共通_フェードイン) { - if( this.actFI.On進行描画() != 0 ) + if (this.actFI.On進行描画() != 0) { base.eフェーズID = CStage.Eフェーズ.共通_通常状態; } } - else if( ( base.eフェーズID == CStage.Eフェーズ.共通_フェードアウト ) ) //&& ( this.actFO.On進行描画() != 0 ) ) + else if ((base.eフェーズID == CStage.Eフェーズ.共通_フェードアウト)) //&& ( this.actFO.On進行描画() != 0 ) ) { - return (int) this.eフェードアウト完了時の戻り値; + return (int)this.eフェードアウト完了時の戻り値; } #region [ #24609 2011.3.14 yyagi ランク更新or演奏型スキル更新時、リザルト画像をpngで保存する ] - if ( this.bアニメが完了 == true && this.bIsCheckedWhetherResultScreenShouldSaveOrNot == false // #24609 2011.3.14 yyagi; to save result screen in case BestRank or HiSkill. + if (this.bアニメが完了 == true && this.bIsCheckedWhetherResultScreenShouldSaveOrNot == false // #24609 2011.3.14 yyagi; to save result screen in case BestRank or HiSkill. && CDTXMania.app.ConfigIni.bScoreIniを出力する && CDTXMania.app.ConfigIni.bIsAutoResultCapture) // #25399 2011.6.9 yyagi { @@ -523,83 +524,83 @@ namespace DTXMania // キー入力 - if( CDTXMania.app.act現在入力を占有中のプラグイン == null ) + if (CDTXMania.app.act現在入力を占有中のプラグイン == null) { - if( CDTXMania.app.ConfigIni.bドラム打音を発声する && CDTXMania.app.ConfigIni.bDrums有効 ) + if (CDTXMania.app.ConfigIni.bドラム打音を発声する && CDTXMania.app.ConfigIni.bDrums有効) { - for( int i = 0; i < 10; i++ ) + for (int i = 0; i < 10; i++) { - List events = CDTXMania.app.Pad.GetEvents( E楽器パート.DRUMS, (Eパッド) i ); - if( ( events != null ) && ( events.Count > 0 ) ) + List events = CDTXMania.app.Pad.GetEvents(E楽器パート.DRUMS, (Eパッド)i); + if ((events != null) && (events.Count > 0)) { - foreach( STInputEvent event2 in events ) + foreach (STInputEvent event2 in events) { - if( !event2.b押された ) + if (!event2.b押された) { continue; } - CChip rChip = this.r空うちドラムチップ[ i ]; - if( rChip == null ) + CChip rChip = this.r空うちドラムチップ[i]; + if (rChip == null) { - switch( ( (Eパッド) i ) ) + switch (((Eパッド)i)) { case Eパッド.HH: - rChip = this.r空うちドラムチップ[ 7 ]; - if( rChip == null ) + rChip = this.r空うちドラムチップ[7]; + if (rChip == null) { - rChip = this.r空うちドラムチップ[ 9 ]; + rChip = this.r空うちドラムチップ[9]; } break; case Eパッド.FT: - rChip = this.r空うちドラムチップ[ 4 ]; + rChip = this.r空うちドラムチップ[4]; break; case Eパッド.CY: - rChip = this.r空うちドラムチップ[ 8 ]; + rChip = this.r空うちドラムチップ[8]; break; case Eパッド.HHO: - rChip = this.r空うちドラムチップ[ 0 ]; - if( rChip == null ) + rChip = this.r空うちドラムチップ[0]; + if (rChip == null) { - rChip = this.r空うちドラムチップ[ 9 ]; + rChip = this.r空うちドラムチップ[9]; } break; case Eパッド.RD: - rChip = this.r空うちドラムチップ[ 6 ]; + rChip = this.r空うちドラムチップ[6]; break; case Eパッド.LC: - rChip = this.r空うちドラムチップ[ 0 ]; - if( rChip == null ) + rChip = this.r空うちドラムチップ[0]; + if (rChip == null) { - rChip = this.r空うちドラムチップ[ 7 ]; + rChip = this.r空うちドラムチップ[7]; } break; } } - if( ( - ( rChip != null ) && - ( rChip.eチャンネル番号 >= Ech定義.HiHatClose ) ) && ( rChip.eチャンネル番号 <= Ech定義.LeftCymbal ) ) + if (( + (rChip != null) && + (rChip.eチャンネル番号 >= Ech定義.HiHatClose)) && (rChip.eチャンネル番号 <= Ech定義.LeftCymbal)) { - int nLane = this.nチャンネル0Atoレーン07[ rChip.eチャンネル番号 - Ech定義.HiHatClose ]; - if( ( nLane == 1 ) && ( - ( rChip.eチャンネル番号 == Ech定義.HiHatClose ) || - ( ( rChip.eチャンネル番号 == Ech定義.HiHatOpen ) && ( this.e最後に再生したHHのチャンネル番号 != Ech定義.HiHatOpen ) ) ) ) + int nLane = this.nチャンネル0Atoレーン07[rChip.eチャンネル番号 - Ech定義.HiHatClose]; + if ((nLane == 1) && ( + (rChip.eチャンネル番号 == Ech定義.HiHatClose) || + ((rChip.eチャンネル番号 == Ech定義.HiHatOpen) && (this.e最後に再生したHHのチャンネル番号 != Ech定義.HiHatOpen)))) { - CDTXMania.app.DTX.tWavの再生停止( this.n最後に再生したHHのWAV番号 ); + CDTXMania.app.DTX.tWavの再生停止(this.n最後に再生したHHのWAV番号); this.n最後に再生したHHのWAV番号 = rChip.n整数値_内部番号; this.e最後に再生したHHのチャンネル番号 = rChip.eチャンネル番号; } - CDTXMania.app.DTX.tチップの再生( rChip, CDTXMania.app.Timer.nシステム時刻, nLane, CDTXMania.app.ConfigIni.n手動再生音量, CDTXMania.app.ConfigIni.b演奏音を強調する.Drums ); + CDTXMania.app.DTX.tチップの再生(rChip, CDTXMania.app.Timer.nシステム時刻, nLane, CDTXMania.app.ConfigIni.n手動再生音量, CDTXMania.app.ConfigIni.b演奏音を強調する.Drums); } } } } } - if( ( ( CDTXMania.app.Pad.b押されたDGB( Eパッド.CY ) || CDTXMania.app.Pad.b押された( E楽器パート.DRUMS, Eパッド.RD ) ) || ( CDTXMania.app.Pad.b押された( E楽器パート.DRUMS, Eパッド.LC ) || CDTXMania.app.Input管理.Keyboard.bキーが押された( (int)SlimDX.DirectInput.Key.Return ) ) ) && !this.bアニメが完了 ) + if (((CDTXMania.app.Pad.b押されたDGB(Eパッド.CY) || CDTXMania.app.Pad.b押された(E楽器パート.DRUMS, Eパッド.RD)) || (CDTXMania.app.Pad.b押された(E楽器パート.DRUMS, Eパッド.LC) || CDTXMania.app.Input管理.Keyboard.bキーが押された((int)SlimDX.DirectInput.Key.Return))) && !this.bアニメが完了) { this.actFI.tフェードイン完了(); // #25406 2011.6.9 yyagi this.actResultImage.tアニメを完了させる(); @@ -609,26 +610,26 @@ namespace DTXMania this.ct登場用.t停止(); } #region [ #24609 2011.4.7 yyagi リザルト画面で[F12]を押下すると、リザルト画像をpngで保存する機能は、CDTXMania.app.移管。 ] -// if ( CDTXMania.app.Input管理.Keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.F12 ) && -// CDTXMania.app.ConfigIni.bScoreIniを出力する ) -// { -// CheckAndSaveResultScreen(false); -// this.bIsCheckedWhetherResultScreenShouldSaveOrNot = true; -// } + // if ( CDTXMania.app.Input管理.Keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.F12 ) && + // CDTXMania.app.ConfigIni.bScoreIniを出力する ) + // { + // CheckAndSaveResultScreen(false); + // this.bIsCheckedWhetherResultScreenShouldSaveOrNot = true; + // } #endregion - if ( base.eフェーズID == CStage.Eフェーズ.共通_通常状態 ) + if (base.eフェーズID == CStage.Eフェーズ.共通_通常状態) { - if ( CDTXMania.app.Input管理.Keyboard.bキーが押された( (int)SlimDX.DirectInput.Key.Escape ) ) + if (CDTXMania.app.Input管理.Keyboard.bキーが押された((int)SlimDX.DirectInput.Key.Escape)) { CDTXMania.app.Skin.sound取消音.t再生する(); this.actFO.tフェードアウト開始(); base.eフェーズID = CStage.Eフェーズ.共通_フェードアウト; this.eフェードアウト完了時の戻り値 = E戻り値.完了; } - if ( ( ( CDTXMania.app.Pad.b押されたDGB( Eパッド.CY ) || CDTXMania.app.Pad.b押された( E楽器パート.DRUMS, Eパッド.RD ) ) || ( CDTXMania.app.Pad.b押された( E楽器パート.DRUMS, Eパッド.LC ) || CDTXMania.app.Input管理.Keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.Return ) ) ) && this.bアニメが完了 ) + if (((CDTXMania.app.Pad.b押されたDGB(Eパッド.CY) || CDTXMania.app.Pad.b押された(E楽器パート.DRUMS, Eパッド.RD)) || (CDTXMania.app.Pad.b押された(E楽器パート.DRUMS, Eパッド.LC) || CDTXMania.app.Input管理.Keyboard.bキーが押された((int)SlimDX.DirectInput.Key.Return))) && this.bアニメが完了) { CDTXMania.app.Skin.sound取消音.t再生する(); -// this.actFO.tフェードアウト開始(); + // this.actFO.tフェードアウト開始(); base.eフェーズID = CStage.Eフェーズ.共通_フェードアウト; this.eフェードアウト完了時の戻り値 = E戻り値.完了; } @@ -679,49 +680,49 @@ namespace DTXMania /// true=自動保存モード, false=手動保存モード private void CheckAndSaveResultScreen(bool bIsAutoSave) { - string path = Path.GetDirectoryName( CDTXMania.app.DTX.strファイル名の絶対パス ); - string datetime = DateTime.Now.ToString( "yyyyMMddHHmmss" ); - if ( bIsAutoSave ) + string path = Path.GetDirectoryName(CDTXMania.app.DTX.strファイル名の絶対パス); + string datetime = DateTime.Now.ToString("yyyyMMddHHmmss"); + if (bIsAutoSave) { // リザルト画像を自動保存するときは、dtxファイル名.yyMMddHHmmss_DRUMS_SS.png という形式で保存。 - for ( int i = 0; i < 3; i++ ) + for (int i = 0; i < 3; i++) { - if ( this.b新記録ランク[ i ] == true || this.b新記録スキル[ i ] == true ) + if (this.b新記録ランク[i] == true || this.b新記録スキル[i] == true) { - string strPart = ( (E楽器パート) ( i ) ).ToString(); - string strRank = ( (CScoreIni.ERANK) ( this.nランク値[ i ] ) ).ToString(); + string strPart = ((E楽器パート)(i)).ToString(); + string strRank = ((CScoreIni.ERANK)(this.nランク値[i])).ToString(); string strFullPath = CDTXMania.app.DTX.strファイル名の絶対パス + "." + datetime + "_" + strPart + "_" + strRank + ".png"; //Surface.ToFile( pSurface, strFullPath, ImageFileFormat.Png ); - CDTXMania.app.SaveResultScreen( strFullPath ); + CDTXMania.app.SaveResultScreen(strFullPath); } } } #region [ #24609 2011.4.11 yyagi; リザルトの手動保存ロジックは、CDTXMania.app.移管した。] -// else -// { -// // リザルト画像を手動保存するときは、dtxファイル名.yyMMddHHmmss_SS.png という形式で保存。(楽器名無し) -// string strRank = ( (CScoreIni.ERANK) ( CDTXMania.app.stage結果.n総合ランク値 ) ).ToString(); -// string strSavePath = CDTXMania.app.strEXEのあるフォルダ + "\\" + "Capture_img"; -// if ( !Directory.Exists( strSavePath ) ) -// { -// try -// { -// Directory.CreateDirectory( strSavePath ); -// } -// catch -// { -// } -// } -// string strSetDefDifficulty = CDTXMania.app.stage選曲.r確定された曲.ar難易度ラベル[ CDTXMania.app.stage選曲.n確定された曲の難易度 ]; -// if ( strSetDefDifficulty != null ) -// { -// strSetDefDifficulty = "(" + strSetDefDifficulty + ")"; -// } -// string strFullPath = strSavePath + "\\" + CDTXMania.app.DTX.TITLE + strSetDefDifficulty + -// "." + datetime + "_" + strRank + ".png"; -// // Surface.ToFile( pSurface, strFullPath, ImageFileFormat.Png ); -// CDTXMania.app.SaveResultScreen( strFullPath ); -// } + // else + // { + // // リザルト画像を手動保存するときは、dtxファイル名.yyMMddHHmmss_SS.png という形式で保存。(楽器名無し) + // string strRank = ( (CScoreIni.ERANK) ( CDTXMania.app.stage結果.n総合ランク値 ) ).ToString(); + // string strSavePath = CDTXMania.app.strEXEのあるフォルダ + "\\" + "Capture_img"; + // if ( !Directory.Exists( strSavePath ) ) + // { + // try + // { + // Directory.CreateDirectory( strSavePath ); + // } + // catch + // { + // } + // } + // string strSetDefDifficulty = CDTXMania.app.stage選曲.r確定された曲.ar難易度ラベル[ CDTXMania.app.stage選曲.n確定された曲の難易度 ]; + // if ( strSetDefDifficulty != null ) + // { + // strSetDefDifficulty = "(" + strSetDefDifficulty + ")"; + // } + // string strFullPath = strSavePath + "\\" + CDTXMania.app.DTX.TITLE + strSetDefDifficulty + + // "." + datetime + "_" + strRank + ".png"; + // // Surface.ToFile( pSurface, strFullPath, ImageFileFormat.Png ); + // CDTXMania.app.SaveResultScreen( strFullPath ); + // } #endregion } #endregion diff --git a/DTXManiaプロジェクト/コード/ステージ/09.終了/CStage終了.cs b/DTXManiaプロジェクト/コード/ステージ/09.終了/CStage終了.cs index bf57dd1d..fefdc706 100644 --- a/DTXManiaプロジェクト/コード/ステージ/09.終了/CStage終了.cs +++ b/DTXManiaプロジェクト/コード/ステージ/09.終了/CStage終了.cs @@ -22,7 +22,7 @@ namespace DTXMania public override void On活性化() { - Trace.TraceInformation( "終了ステージを活性化します。" ); + Trace.TraceInformation("終了ステージを活性化します。"); Trace.Indent(); try { @@ -31,13 +31,13 @@ namespace DTXMania } finally { - Trace.TraceInformation( "終了ステージの活性化を完了しました。" ); + Trace.TraceInformation("終了ステージの活性化を完了しました。"); Trace.Unindent(); } } public override void On非活性化() { - Trace.TraceInformation( "終了ステージを非活性化します。" ); + Trace.TraceInformation("終了ステージを非活性化します。"); Trace.Indent(); try { @@ -45,44 +45,44 @@ namespace DTXMania } finally { - Trace.TraceInformation( "終了ステージの非活性化を完了しました。" ); + Trace.TraceInformation("終了ステージの非活性化を完了しました。"); Trace.Unindent(); } } public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - this.tx背景 = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenExit background.jpg" ), false ); + this.tx背景 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenExit background.jpg"), false); base.OnManagedリソースの作成(); } } public override void OnManagedリソースの解放() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.tx背景 ); + TextureFactory.tテクスチャの解放(ref this.tx背景); base.OnManagedリソースの解放(); } } public override int On進行描画() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - if( base.b初めての進行描画 ) + if (base.b初めての進行描画) { CDTXMania.app.Skin.soundゲーム終了音.t再生する(); - this.ct時間稼ぎ.t開始( 0, 1, 0x3e8, CDTXMania.app.Timer ); + this.ct時間稼ぎ.t開始(0, 1, 0x3e8, CDTXMania.app.Timer); base.b初めての進行描画 = false; } this.ct時間稼ぎ.t進行(); - if( this.ct時間稼ぎ.b終了値に達した && !CDTXMania.app.Skin.soundゲーム終了音.b再生中 ) + if (this.ct時間稼ぎ.b終了値に達した && !CDTXMania.app.Skin.soundゲーム終了音.b再生中) { return 1; } - if( this.tx背景 != null ) + if (this.tx背景 != null) { - this.tx背景.t2D描画( CDTXMania.app.Device, 0, 0 ); + this.tx背景.t2D描画(CDTXMania.app.Device, 0, 0); } } return 0; diff --git a/DTXManiaプロジェクト/コード/ステージ/10.ChangeSkin/CStageChangeSkin.cs b/DTXManiaプロジェクト/コード/ステージ/10.ChangeSkin/CStageChangeSkin.cs index a94b1143..5b652733 100644 --- a/DTXManiaプロジェクト/コード/ステージ/10.ChangeSkin/CStageChangeSkin.cs +++ b/DTXManiaプロジェクト/コード/ステージ/10.ChangeSkin/CStageChangeSkin.cs @@ -28,12 +28,12 @@ namespace DTXMania public override void On活性化() { - Trace.TraceInformation( "スキン変更ステージを活性化します。" ); + Trace.TraceInformation("スキン変更ステージを活性化します。"); Trace.Indent(); try { base.On活性化(); - Trace.TraceInformation( "スキン変更ステージの活性化を完了しました。" ); + Trace.TraceInformation("スキン変更ステージの活性化を完了しました。"); } finally { @@ -42,12 +42,12 @@ namespace DTXMania } public override void On非活性化() { - Trace.TraceInformation( "スキン変更ステージを非活性化します。" ); + Trace.TraceInformation("スキン変更ステージを非活性化します。"); Trace.Indent(); try { base.On非活性化(); - Trace.TraceInformation( "スキン変更ステージの非活性化を完了しました。" ); + Trace.TraceInformation("スキン変更ステージの非活性化を完了しました。"); } finally { @@ -56,23 +56,23 @@ namespace DTXMania } public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { base.OnManagedリソースの作成(); } } public override void OnManagedリソースの解放() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { base.OnManagedリソースの解放(); } } public override int On進行描画() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - if ( base.b初めての進行描画 ) + if (base.b初めての進行描画) { base.b初めての進行描画 = false; return 0; @@ -86,7 +86,7 @@ namespace DTXMania } public void tChangeSkinMain() { - Trace.TraceInformation( "スキン変更:" + CDTXMania.app.Skin.GetCurrentSkinSubfolderFullName( false ) ); + Trace.TraceInformation("スキン変更:" + CDTXMania.app.Skin.GetCurrentSkinSubfolderFullName(false)); CDTXMania.app.act文字コンソール.On非活性化(); diff --git a/DTXManiaプロジェクト/コード/ステージ/CActDFPFont.cs b/DTXManiaプロジェクト/コード/ステージ/CActDFPFont.cs index feec8573..f6b12b88 100644 --- a/DTXManiaプロジェクト/コード/ステージ/CActDFPFont.cs +++ b/DTXManiaプロジェクト/コード/ステージ/CActDFPFont.cs @@ -14,534 +14,534 @@ namespace DTXMania public CActDFPFont() { - ST文字領域[] st文字領域Array = new ST文字領域[ 0x5d+2 ]; + ST文字領域[] st文字領域Array = new ST文字領域[0x5d + 2]; ST文字領域 st文字領域94 = new ST文字領域(); ST文字領域 st文字領域 = st文字領域94; st文字領域.ch = ' '; - st文字領域.rc = new Rectangle( 10, 3, 13, 0x1b ); - st文字領域Array[ 0 ] = st文字領域; + st文字領域.rc = new Rectangle(10, 3, 13, 0x1b); + st文字領域Array[0] = st文字領域; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域2 = st文字領域94; st文字領域2.ch = '!'; - st文字領域2.rc = new Rectangle( 0x19, 3, 14, 0x1b ); - st文字領域Array[ 1 ] = st文字領域2; + st文字領域2.rc = new Rectangle(0x19, 3, 14, 0x1b); + st文字領域Array[1] = st文字領域2; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域3 = st文字領域94; st文字領域3.ch = '"'; - st文字領域3.rc = new Rectangle( 0x2c, 3, 0x11, 0x1b ); - st文字領域Array[ 2 ] = st文字領域3; + st文字領域3.rc = new Rectangle(0x2c, 3, 0x11, 0x1b); + st文字領域Array[2] = st文字領域3; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域4 = st文字領域94; st文字領域4.ch = '#'; - st文字領域4.rc = new Rectangle( 0x40, 3, 0x18, 0x1b ); - st文字領域Array[ 3 ] = st文字領域4; + st文字領域4.rc = new Rectangle(0x40, 3, 0x18, 0x1b); + st文字領域Array[3] = st文字領域4; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域5 = st文字領域94; st文字領域5.ch = '$'; - st文字領域5.rc = new Rectangle( 90, 3, 0x15, 0x1b ); - st文字領域Array[ 4 ] = st文字領域5; + st文字領域5.rc = new Rectangle(90, 3, 0x15, 0x1b); + st文字領域Array[4] = st文字領域5; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域6 = st文字領域94; st文字領域6.ch = '%'; - st文字領域6.rc = new Rectangle( 0x71, 3, 0x1b, 0x1b ); - st文字領域Array[ 5 ] = st文字領域6; + st文字領域6.rc = new Rectangle(0x71, 3, 0x1b, 0x1b); + st文字領域Array[5] = st文字領域6; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域7 = st文字領域94; st文字領域7.ch = '&'; - st文字領域7.rc = new Rectangle( 0x8e, 3, 0x18, 0x1b ); - st文字領域Array[ 6 ] = st文字領域7; + st文字領域7.rc = new Rectangle(0x8e, 3, 0x18, 0x1b); + st文字領域Array[6] = st文字領域7; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域8 = st文字領域94; st文字領域8.ch = '\''; - st文字領域8.rc = new Rectangle( 0xab, 3, 11, 0x1b ); - st文字領域Array[ 7 ] = st文字領域8; + st文字領域8.rc = new Rectangle(0xab, 3, 11, 0x1b); + st文字領域Array[7] = st文字領域8; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域9 = st文字領域94; st文字領域9.ch = '('; - st文字領域9.rc = new Rectangle( 0xc0, 3, 0x10, 0x1b ); - st文字領域Array[ 8 ] = st文字領域9; + st文字領域9.rc = new Rectangle(0xc0, 3, 0x10, 0x1b); + st文字領域Array[8] = st文字領域9; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域10 = st文字領域94; st文字領域10.ch = ')'; - st文字領域10.rc = new Rectangle( 0xd0, 3, 0x10, 0x1b ); - st文字領域Array[ 9 ] = st文字領域10; + st文字領域10.rc = new Rectangle(0xd0, 3, 0x10, 0x1b); + st文字領域Array[9] = st文字領域10; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域11 = st文字領域94; st文字領域11.ch = '*'; - st文字領域11.rc = new Rectangle( 0xe2, 3, 0x15, 0x1b ); - st文字領域Array[ 10 ] = st文字領域11; + st文字領域11.rc = new Rectangle(0xe2, 3, 0x15, 0x1b); + st文字領域Array[10] = st文字領域11; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域12 = st文字領域94; st文字領域12.ch = '+'; - st文字領域12.rc = new Rectangle( 2, 0x1f, 0x18, 0x1b ); - st文字領域Array[ 11 ] = st文字領域12; + st文字領域12.rc = new Rectangle(2, 0x1f, 0x18, 0x1b); + st文字領域Array[11] = st文字領域12; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域13 = st文字領域94; st文字領域13.ch = ','; - st文字領域13.rc = new Rectangle( 0x1b, 0x1f, 11, 0x1b ); - st文字領域Array[ 12 ] = st文字領域13; + st文字領域13.rc = new Rectangle(0x1b, 0x1f, 11, 0x1b); + st文字領域Array[12] = st文字領域13; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域14 = st文字領域94; st文字領域14.ch = '-'; - st文字領域14.rc = new Rectangle( 0x29, 0x1f, 13, 0x1b ); - st文字領域Array[ 13 ] = st文字領域14; + st文字領域14.rc = new Rectangle(0x29, 0x1f, 13, 0x1b); + st文字領域Array[13] = st文字領域14; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域15 = st文字領域94; st文字領域15.ch = '.'; - st文字領域15.rc = new Rectangle( 0x37, 0x1f, 11, 0x1b ); - st文字領域Array[ 14 ] = st文字領域15; + st文字領域15.rc = new Rectangle(0x37, 0x1f, 11, 0x1b); + st文字領域Array[14] = st文字領域15; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域16 = st文字領域94; st文字領域16.ch = '/'; - st文字領域16.rc = new Rectangle( 0x44, 0x1f, 0x15, 0x1b ); - st文字領域Array[ 15 ] = st文字領域16; + st文字領域16.rc = new Rectangle(0x44, 0x1f, 0x15, 0x1b); + st文字領域Array[15] = st文字領域16; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域17 = st文字領域94; st文字領域17.ch = '0'; - st文字領域17.rc = new Rectangle( 0x5b, 0x1f, 20, 0x1b ); - st文字領域Array[ 0x10 ] = st文字領域17; + st文字領域17.rc = new Rectangle(0x5b, 0x1f, 20, 0x1b); + st文字領域Array[0x10] = st文字領域17; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域18 = st文字領域94; st文字領域18.ch = '1'; - st文字領域18.rc = new Rectangle( 0x75, 0x1f, 14, 0x1b ); - st文字領域Array[ 0x11 ] = st文字領域18; + st文字領域18.rc = new Rectangle(0x75, 0x1f, 14, 0x1b); + st文字領域Array[0x11] = st文字領域18; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域19 = st文字領域94; st文字領域19.ch = '2'; - st文字領域19.rc = new Rectangle( 0x86, 0x1f, 0x15, 0x1b ); - st文字領域Array[ 0x12 ] = st文字領域19; + st文字領域19.rc = new Rectangle(0x86, 0x1f, 0x15, 0x1b); + st文字領域Array[0x12] = st文字領域19; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域20 = st文字領域94; st文字領域20.ch = '3'; - st文字領域20.rc = new Rectangle( 0x9d, 0x1f, 20, 0x1b ); - st文字領域Array[ 0x13 ] = st文字領域20; + st文字領域20.rc = new Rectangle(0x9d, 0x1f, 20, 0x1b); + st文字領域Array[0x13] = st文字領域20; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域21 = st文字領域94; st文字領域21.ch = '4'; - st文字領域21.rc = new Rectangle( 0xb3, 0x1f, 20, 0x1b ); - st文字領域Array[ 20 ] = st文字領域21; + st文字領域21.rc = new Rectangle(0xb3, 0x1f, 20, 0x1b); + st文字領域Array[20] = st文字領域21; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域22 = st文字領域94; st文字領域22.ch = '5'; - st文字領域22.rc = new Rectangle( 0xca, 0x1f, 0x13, 0x1b ); - st文字領域Array[ 0x15 ] = st文字領域22; + st文字領域22.rc = new Rectangle(0xca, 0x1f, 0x13, 0x1b); + st文字領域Array[0x15] = st文字領域22; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域23 = st文字領域94; st文字領域23.ch = '6'; - st文字領域23.rc = new Rectangle( 0xe0, 0x1f, 20, 0x1b ); - st文字領域Array[ 0x16 ] = st文字領域23; + st文字領域23.rc = new Rectangle(0xe0, 0x1f, 20, 0x1b); + st文字領域Array[0x16] = st文字領域23; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域24 = st文字領域94; st文字領域24.ch = '7'; - st文字領域24.rc = new Rectangle( 4, 0x3b, 0x13, 0x1b ); - st文字領域Array[ 0x17 ] = st文字領域24; + st文字領域24.rc = new Rectangle(4, 0x3b, 0x13, 0x1b); + st文字領域Array[0x17] = st文字領域24; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域25 = st文字領域94; st文字領域25.ch = '8'; - st文字領域25.rc = new Rectangle( 0x18, 0x3b, 20, 0x1b ); - st文字領域Array[ 0x18 ] = st文字領域25; + st文字領域25.rc = new Rectangle(0x18, 0x3b, 20, 0x1b); + st文字領域Array[0x18] = st文字領域25; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域26 = st文字領域94; st文字領域26.ch = '9'; - st文字領域26.rc = new Rectangle( 0x2f, 0x3b, 0x13, 0x1b ); - st文字領域Array[ 0x19 ] = st文字領域26; + st文字領域26.rc = new Rectangle(0x2f, 0x3b, 0x13, 0x1b); + st文字領域Array[0x19] = st文字領域26; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域27 = st文字領域94; st文字領域27.ch = ':'; - st文字領域27.rc = new Rectangle( 0x44, 0x3b, 12, 0x1b ); - st文字領域Array[ 0x1a ] = st文字領域27; + st文字領域27.rc = new Rectangle(0x44, 0x3b, 12, 0x1b); + st文字領域Array[0x1a] = st文字領域27; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域28 = st文字領域94; st文字領域28.ch = ';'; - st文字領域28.rc = new Rectangle( 0x51, 0x3b, 13, 0x1b ); - st文字領域Array[ 0x1b ] = st文字領域28; + st文字領域28.rc = new Rectangle(0x51, 0x3b, 13, 0x1b); + st文字領域Array[0x1b] = st文字領域28; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域29 = st文字領域94; st文字領域29.ch = '<'; - st文字領域29.rc = new Rectangle( 0x60, 0x3b, 20, 0x1b ); - st文字領域Array[ 0x1c ] = st文字領域29; + st文字領域29.rc = new Rectangle(0x60, 0x3b, 20, 0x1b); + st文字領域Array[0x1c] = st文字領域29; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域30 = st文字領域94; st文字領域30.ch = '='; - st文字領域30.rc = new Rectangle( 0x74, 0x3b, 0x11, 0x1b ); - st文字領域Array[ 0x1d ] = st文字領域30; + st文字領域30.rc = new Rectangle(0x74, 0x3b, 0x11, 0x1b); + st文字領域Array[0x1d] = st文字領域30; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域31 = st文字領域94; st文字領域31.ch = '>'; - st文字領域31.rc = new Rectangle( 0x85, 0x3b, 20, 0x1b ); - st文字領域Array[ 30 ] = st文字領域31; + st文字領域31.rc = new Rectangle(0x85, 0x3b, 20, 0x1b); + st文字領域Array[30] = st文字領域31; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域32 = st文字領域94; st文字領域32.ch = '?'; - st文字領域32.rc = new Rectangle( 0x9c, 0x3b, 20, 0x1b ); - st文字領域Array[ 0x1f ] = st文字領域32; + st文字領域32.rc = new Rectangle(0x9c, 0x3b, 20, 0x1b); + st文字領域Array[0x1f] = st文字領域32; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域33 = st文字領域94; st文字領域33.ch = 'A'; - st文字領域33.rc = new Rectangle( 0xb1, 0x3b, 0x17, 0x1b ); - st文字領域Array[ 0x20 ] = st文字領域33; + st文字領域33.rc = new Rectangle(0xb1, 0x3b, 0x17, 0x1b); + st文字領域Array[0x20] = st文字領域33; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域34 = st文字領域94; st文字領域34.ch = 'B'; - st文字領域34.rc = new Rectangle( 0xcb, 0x3b, 0x15, 0x1b ); - st文字領域Array[ 0x21 ] = st文字領域34; + st文字領域34.rc = new Rectangle(0xcb, 0x3b, 0x15, 0x1b); + st文字領域Array[0x21] = st文字領域34; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域35 = st文字領域94; st文字領域35.ch = 'C'; - st文字領域35.rc = new Rectangle( 0xe3, 0x3b, 0x16, 0x1b ); - st文字領域Array[ 0x22 ] = st文字領域35; + st文字領域35.rc = new Rectangle(0xe3, 0x3b, 0x16, 0x1b); + st文字領域Array[0x22] = st文字領域35; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域36 = st文字領域94; st文字領域36.ch = 'D'; - st文字領域36.rc = new Rectangle( 2, 0x57, 0x16, 0x1b ); - st文字領域Array[ 0x23 ] = st文字領域36; + st文字領域36.rc = new Rectangle(2, 0x57, 0x16, 0x1b); + st文字領域Array[0x23] = st文字領域36; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域37 = st文字領域94; st文字領域37.ch = 'E'; - st文字領域37.rc = new Rectangle( 0x1a, 0x57, 0x16, 0x1b ); - st文字領域Array[ 0x24 ] = st文字領域37; + st文字領域37.rc = new Rectangle(0x1a, 0x57, 0x16, 0x1b); + st文字領域Array[0x24] = st文字領域37; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域38 = st文字領域94; st文字領域38.ch = 'F'; - st文字領域38.rc = new Rectangle( 0x30, 0x57, 0x16, 0x1b ); - st文字領域Array[ 0x25 ] = st文字領域38; + st文字領域38.rc = new Rectangle(0x30, 0x57, 0x16, 0x1b); + st文字領域Array[0x25] = st文字領域38; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域39 = st文字領域94; st文字領域39.ch = 'G'; - st文字領域39.rc = new Rectangle( 0x48, 0x57, 0x16, 0x1b ); - st文字領域Array[ 0x26 ] = st文字領域39; + st文字領域39.rc = new Rectangle(0x48, 0x57, 0x16, 0x1b); + st文字領域Array[0x26] = st文字領域39; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域40 = st文字領域94; st文字領域40.ch = 'H'; - st文字領域40.rc = new Rectangle( 0x61, 0x57, 0x18, 0x1b ); - st文字領域Array[ 0x27 ] = st文字領域40; + st文字領域40.rc = new Rectangle(0x61, 0x57, 0x18, 0x1b); + st文字領域Array[0x27] = st文字領域40; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域41 = st文字領域94; st文字領域41.ch = 'I'; - st文字領域41.rc = new Rectangle( 0x7a, 0x57, 13, 0x1b ); - st文字領域Array[ 40 ] = st文字領域41; + st文字領域41.rc = new Rectangle(0x7a, 0x57, 13, 0x1b); + st文字領域Array[40] = st文字領域41; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域42 = st文字領域94; st文字領域42.ch = 'J'; - st文字領域42.rc = new Rectangle( 0x88, 0x57, 20, 0x1b ); - st文字領域Array[ 0x29 ] = st文字領域42; + st文字領域42.rc = new Rectangle(0x88, 0x57, 20, 0x1b); + st文字領域Array[0x29] = st文字領域42; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域43 = st文字領域94; st文字領域43.ch = 'K'; - st文字領域43.rc = new Rectangle( 0x9d, 0x57, 0x18, 0x1b ); - st文字領域Array[ 0x2a ] = st文字領域43; + st文字領域43.rc = new Rectangle(0x9d, 0x57, 0x18, 0x1b); + st文字領域Array[0x2a] = st文字領域43; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域44 = st文字領域94; st文字領域44.ch = 'L'; - st文字領域44.rc = new Rectangle( 0xb7, 0x57, 20, 0x1b ); - st文字領域Array[ 0x2b ] = st文字領域44; + st文字領域44.rc = new Rectangle(0xb7, 0x57, 20, 0x1b); + st文字領域Array[0x2b] = st文字領域44; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域45 = st文字領域94; st文字領域45.ch = 'M'; - st文字領域45.rc = new Rectangle( 0xce, 0x57, 0x1a, 0x1b ); - st文字領域Array[ 0x2c ] = st文字領域45; + st文字領域45.rc = new Rectangle(0xce, 0x57, 0x1a, 0x1b); + st文字領域Array[0x2c] = st文字領域45; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域46 = st文字領域94; st文字領域46.ch = 'N'; - st文字領域46.rc = new Rectangle( 0xe9, 0x57, 0x17, 0x1b ); - st文字領域Array[ 0x2d ] = st文字領域46; + st文字領域46.rc = new Rectangle(0xe9, 0x57, 0x17, 0x1b); + st文字領域Array[0x2d] = st文字領域46; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域47 = st文字領域94; st文字領域47.ch = 'O'; - st文字領域47.rc = new Rectangle( 2, 0x73, 0x18, 0x1b ); - st文字領域Array[ 0x2e ] = st文字領域47; + st文字領域47.rc = new Rectangle(2, 0x73, 0x18, 0x1b); + st文字領域Array[0x2e] = st文字領域47; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域48 = st文字領域94; st文字領域48.ch = 'P'; - st文字領域48.rc = new Rectangle( 0x1c, 0x73, 0x15, 0x1b ); - st文字領域Array[ 0x2f ] = st文字領域48; + st文字領域48.rc = new Rectangle(0x1c, 0x73, 0x15, 0x1b); + st文字領域Array[0x2f] = st文字領域48; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域49 = st文字領域94; st文字領域49.ch = 'Q'; - st文字領域49.rc = new Rectangle( 0x33, 0x73, 0x17, 0x1b ); - st文字領域Array[ 0x30 ] = st文字領域49; + st文字領域49.rc = new Rectangle(0x33, 0x73, 0x17, 0x1b); + st文字領域Array[0x30] = st文字領域49; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域50 = st文字領域94; st文字領域50.ch = 'R'; - st文字領域50.rc = new Rectangle( 0x4c, 0x73, 0x16, 0x1b ); - st文字領域Array[ 0x31 ] = st文字領域50; + st文字領域50.rc = new Rectangle(0x4c, 0x73, 0x16, 0x1b); + st文字領域Array[0x31] = st文字領域50; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域51 = st文字領域94; st文字領域51.ch = 'S'; - st文字領域51.rc = new Rectangle( 100, 0x73, 0x15, 0x1b ); - st文字領域Array[ 50 ] = st文字領域51; + st文字領域51.rc = new Rectangle(100, 0x73, 0x15, 0x1b); + st文字領域Array[50] = st文字領域51; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域52 = st文字領域94; st文字領域52.ch = 'T'; - st文字領域52.rc = new Rectangle( 0x7c, 0x73, 0x16, 0x1b ); - st文字領域Array[ 0x33 ] = st文字領域52; + st文字領域52.rc = new Rectangle(0x7c, 0x73, 0x16, 0x1b); + st文字領域Array[0x33] = st文字領域52; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域53 = st文字領域94; st文字領域53.ch = 'U'; - st文字領域53.rc = new Rectangle( 0x93, 0x73, 0x16, 0x1b ); - st文字領域Array[ 0x34 ] = st文字領域53; + st文字領域53.rc = new Rectangle(0x93, 0x73, 0x16, 0x1b); + st文字領域Array[0x34] = st文字領域53; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域54 = st文字領域94; st文字領域54.ch = 'V'; - st文字領域54.rc = new Rectangle( 0xad, 0x73, 0x16, 0x1b ); - st文字領域Array[ 0x35 ] = st文字領域54; + st文字領域54.rc = new Rectangle(0xad, 0x73, 0x16, 0x1b); + st文字領域Array[0x35] = st文字領域54; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域55 = st文字領域94; st文字領域55.ch = 'W'; - st文字領域55.rc = new Rectangle( 0xc5, 0x73, 0x1a, 0x1b ); - st文字領域Array[ 0x36 ] = st文字領域55; + st文字領域55.rc = new Rectangle(0xc5, 0x73, 0x1a, 0x1b); + st文字領域Array[0x36] = st文字領域55; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域56 = st文字領域94; st文字領域56.ch = 'X'; - st文字領域56.rc = new Rectangle( 0xe0, 0x73, 0x1a, 0x1b ); - st文字領域Array[ 0x37 ] = st文字領域56; + st文字領域56.rc = new Rectangle(0xe0, 0x73, 0x1a, 0x1b); + st文字領域Array[0x37] = st文字領域56; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域57 = st文字領域94; st文字領域57.ch = 'Y'; - st文字領域57.rc = new Rectangle( 4, 0x8f, 0x17, 0x1b ); - st文字領域Array[ 0x38 ] = st文字領域57; + st文字領域57.rc = new Rectangle(4, 0x8f, 0x17, 0x1b); + st文字領域Array[0x38] = st文字領域57; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域58 = st文字領域94; st文字領域58.ch = 'Z'; - st文字領域58.rc = new Rectangle( 0x1b, 0x8f, 0x16, 0x1b ); - st文字領域Array[ 0x39 ] = st文字領域58; + st文字領域58.rc = new Rectangle(0x1b, 0x8f, 0x16, 0x1b); + st文字領域Array[0x39] = st文字領域58; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域59 = st文字領域94; st文字領域59.ch = '['; - st文字領域59.rc = new Rectangle( 0x31, 0x8f, 0x11, 0x1b ); - st文字領域Array[ 0x3a ] = st文字領域59; + st文字領域59.rc = new Rectangle(0x31, 0x8f, 0x11, 0x1b); + st文字領域Array[0x3a] = st文字領域59; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域60 = st文字領域94; st文字領域60.ch = '\\'; - st文字領域60.rc = new Rectangle( 0x42, 0x8f, 0x19, 0x1b ); - st文字領域Array[ 0x3b ] = st文字領域60; + st文字領域60.rc = new Rectangle(0x42, 0x8f, 0x19, 0x1b); + st文字領域Array[0x3b] = st文字領域60; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域61 = st文字領域94; st文字領域61.ch = ']'; - st文字領域61.rc = new Rectangle( 0x5c, 0x8f, 0x11, 0x1b ); - st文字領域Array[ 60 ] = st文字領域61; + st文字領域61.rc = new Rectangle(0x5c, 0x8f, 0x11, 0x1b); + st文字領域Array[60] = st文字領域61; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域62 = st文字領域94; st文字領域62.ch = '^'; - st文字領域62.rc = new Rectangle( 0x71, 0x8f, 0x10, 0x1b ); - st文字領域Array[ 0x3d ] = st文字領域62; + st文字領域62.rc = new Rectangle(0x71, 0x8f, 0x10, 0x1b); + st文字領域Array[0x3d] = st文字領域62; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域63 = st文字領域94; st文字領域63.ch = '_'; - st文字領域63.rc = new Rectangle( 0x81, 0x8f, 0x13, 0x1b ); - st文字領域Array[ 0x3e ] = st文字領域63; + st文字領域63.rc = new Rectangle(0x81, 0x8f, 0x13, 0x1b); + st文字領域Array[0x3e] = st文字領域63; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域64 = st文字領域94; st文字領域64.ch = 'a'; - st文字領域64.rc = new Rectangle( 150, 0x8f, 0x13, 0x1b ); - st文字領域Array[ 0x3f ] = st文字領域64; + st文字領域64.rc = new Rectangle(150, 0x8f, 0x13, 0x1b); + st文字領域Array[0x3f] = st文字領域64; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域65 = st文字領域94; st文字領域65.ch = 'b'; - st文字領域65.rc = new Rectangle( 0xac, 0x8f, 20, 0x1b ); - st文字領域Array[ 0x40 ] = st文字領域65; + st文字領域65.rc = new Rectangle(0xac, 0x8f, 20, 0x1b); + st文字領域Array[0x40] = st文字領域65; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域66 = st文字領域94; st文字領域66.ch = 'c'; - st文字領域66.rc = new Rectangle( 0xc3, 0x8f, 0x12, 0x1b ); - st文字領域Array[ 0x41 ] = st文字領域66; + st文字領域66.rc = new Rectangle(0xc3, 0x8f, 0x12, 0x1b); + st文字領域Array[0x41] = st文字領域66; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域67 = st文字領域94; st文字領域67.ch = 'd'; - st文字領域67.rc = new Rectangle( 0xd8, 0x8f, 0x15, 0x1b ); - st文字領域Array[ 0x42 ] = st文字領域67; + st文字領域67.rc = new Rectangle(0xd8, 0x8f, 0x15, 0x1b); + st文字領域Array[0x42] = st文字領域67; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域68 = st文字領域94; st文字領域68.ch = 'e'; - st文字領域68.rc = new Rectangle( 2, 0xab, 0x13, 0x1b ); - st文字領域Array[ 0x43 ] = st文字領域68; + st文字領域68.rc = new Rectangle(2, 0xab, 0x13, 0x1b); + st文字領域Array[0x43] = st文字領域68; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域69 = st文字領域94; st文字領域69.ch = 'f'; - st文字領域69.rc = new Rectangle( 0x17, 0xab, 0x11, 0x1b ); - st文字領域Array[ 0x44 ] = st文字領域69; + st文字領域69.rc = new Rectangle(0x17, 0xab, 0x11, 0x1b); + st文字領域Array[0x44] = st文字領域69; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域70 = st文字領域94; st文字領域70.ch = 'g'; - st文字領域70.rc = new Rectangle( 40, 0xab, 0x15, 0x1b ); - st文字領域Array[ 0x45 ] = st文字領域70; + st文字領域70.rc = new Rectangle(40, 0xab, 0x15, 0x1b); + st文字領域Array[0x45] = st文字領域70; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域71 = st文字領域94; st文字領域71.ch = 'h'; - st文字領域71.rc = new Rectangle( 0x3f, 0xab, 20, 0x1b ); - st文字領域Array[ 70 ] = st文字領域71; + st文字領域71.rc = new Rectangle(0x3f, 0xab, 20, 0x1b); + st文字領域Array[70] = st文字領域71; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域72 = st文字領域94; st文字領域72.ch = 'i'; - st文字領域72.rc = new Rectangle( 0x55, 0xab, 13, 0x1b ); - st文字領域Array[ 0x47 ] = st文字領域72; + st文字領域72.rc = new Rectangle(0x55, 0xab, 13, 0x1b); + st文字領域Array[0x47] = st文字領域72; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域73 = st文字領域94; st文字領域73.ch = 'j'; - st文字領域73.rc = new Rectangle( 0x62, 0xab, 0x10, 0x1b ); - st文字領域Array[ 0x48 ] = st文字領域73; + st文字領域73.rc = new Rectangle(0x62, 0xab, 0x10, 0x1b); + st文字領域Array[0x48] = st文字領域73; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域74 = st文字領域94; st文字領域74.ch = 'k'; - st文字領域74.rc = new Rectangle( 0x74, 0xab, 20, 0x1b ); - st文字領域Array[ 0x49 ] = st文字領域74; + st文字領域74.rc = new Rectangle(0x74, 0xab, 20, 0x1b); + st文字領域Array[0x49] = st文字領域74; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域75 = st文字領域94; st文字領域75.ch = 'l'; - st文字領域75.rc = new Rectangle( 0x8a, 0xab, 13, 0x1b ); - st文字領域Array[ 0x4a ] = st文字領域75; + st文字領域75.rc = new Rectangle(0x8a, 0xab, 13, 0x1b); + st文字領域Array[0x4a] = st文字領域75; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域76 = st文字領域94; st文字領域76.ch = 'm'; - st文字領域76.rc = new Rectangle( 0x98, 0xab, 0x1a, 0x1b ); - st文字領域Array[ 0x4b ] = st文字領域76; + st文字領域76.rc = new Rectangle(0x98, 0xab, 0x1a, 0x1b); + st文字領域Array[0x4b] = st文字領域76; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域77 = st文字領域94; st文字領域77.ch = 'n'; - st文字領域77.rc = new Rectangle( 0xb5, 0xab, 20, 0x1b ); - st文字領域Array[ 0x4c ] = st文字領域77; + st文字領域77.rc = new Rectangle(0xb5, 0xab, 20, 0x1b); + st文字領域Array[0x4c] = st文字領域77; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域78 = st文字領域94; st文字領域78.ch = 'o'; - st文字領域78.rc = new Rectangle( 0xcc, 0xab, 0x13, 0x1b ); - st文字領域Array[ 0x4d ] = st文字領域78; + st文字領域78.rc = new Rectangle(0xcc, 0xab, 0x13, 0x1b); + st文字領域Array[0x4d] = st文字領域78; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域79 = st文字領域94; st文字領域79.ch = 'p'; - st文字領域79.rc = new Rectangle( 0xe1, 0xab, 0x15, 0x1b ); - st文字領域Array[ 0x4e ] = st文字領域79; + st文字領域79.rc = new Rectangle(0xe1, 0xab, 0x15, 0x1b); + st文字領域Array[0x4e] = st文字領域79; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域80 = st文字領域94; st文字領域80.ch = 'q'; - st文字領域80.rc = new Rectangle( 2, 0xc7, 20, 0x1b ); - st文字領域Array[ 0x4f ] = st文字領域80; + st文字領域80.rc = new Rectangle(2, 0xc7, 20, 0x1b); + st文字領域Array[0x4f] = st文字領域80; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域81 = st文字領域94; st文字領域81.ch = 'r'; - st文字領域81.rc = new Rectangle( 0x18, 0xc7, 0x12, 0x1b ); - st文字領域Array[ 80 ] = st文字領域81; + st文字領域81.rc = new Rectangle(0x18, 0xc7, 0x12, 0x1b); + st文字領域Array[80] = st文字領域81; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域82 = st文字領域94; st文字領域82.ch = 's'; - st文字領域82.rc = new Rectangle( 0x2a, 0xc7, 0x13, 0x1b ); - st文字領域Array[ 0x51 ] = st文字領域82; + st文字領域82.rc = new Rectangle(0x2a, 0xc7, 0x13, 0x1b); + st文字領域Array[0x51] = st文字領域82; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域83 = st文字領域94; st文字領域83.ch = 't'; - st文字領域83.rc = new Rectangle( 0x3f, 0xc7, 0x10, 0x1b ); - st文字領域Array[ 0x52 ] = st文字領域83; + st文字領域83.rc = new Rectangle(0x3f, 0xc7, 0x10, 0x1b); + st文字領域Array[0x52] = st文字領域83; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域84 = st文字領域94; st文字領域84.ch = 'u'; - st文字領域84.rc = new Rectangle( 80, 0xc7, 20, 0x1b ); - st文字領域Array[ 0x53 ] = st文字領域84; + st文字領域84.rc = new Rectangle(80, 0xc7, 20, 0x1b); + st文字領域Array[0x53] = st文字領域84; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域85 = st文字領域94; st文字領域85.ch = 'v'; - st文字領域85.rc = new Rectangle( 0x68, 0xc7, 20, 0x1b ); - st文字領域Array[ 0x54 ] = st文字領域85; + st文字領域85.rc = new Rectangle(0x68, 0xc7, 20, 0x1b); + st文字領域Array[0x54] = st文字領域85; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域86 = st文字領域94; st文字領域86.ch = 'w'; - st文字領域86.rc = new Rectangle( 0x7f, 0xc7, 0x1a, 0x1b ); - st文字領域Array[ 0x55 ] = st文字領域86; + st文字領域86.rc = new Rectangle(0x7f, 0xc7, 0x1a, 0x1b); + st文字領域Array[0x55] = st文字領域86; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域87 = st文字領域94; st文字領域87.ch = 'x'; - st文字領域87.rc = new Rectangle( 0x9a, 0xc7, 0x16, 0x1b ); - st文字領域Array[ 0x56 ] = st文字領域87; + st文字領域87.rc = new Rectangle(0x9a, 0xc7, 0x16, 0x1b); + st文字領域Array[0x56] = st文字領域87; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域88 = st文字領域94; st文字領域88.ch = 'y'; - st文字領域88.rc = new Rectangle( 0xb1, 0xc7, 0x16, 0x1b ); - st文字領域Array[ 0x57 ] = st文字領域88; + st文字領域88.rc = new Rectangle(0xb1, 0xc7, 0x16, 0x1b); + st文字領域Array[0x57] = st文字領域88; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域89 = st文字領域94; st文字領域89.ch = 'z'; - st文字領域89.rc = new Rectangle( 200, 0xc7, 0x13, 0x1b ); - st文字領域Array[ 0x58 ] = st文字領域89; + st文字領域89.rc = new Rectangle(200, 0xc7, 0x13, 0x1b); + st文字領域Array[0x58] = st文字領域89; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域90 = st文字領域94; st文字領域90.ch = '{'; - st文字領域90.rc = new Rectangle( 220, 0xc7, 15, 0x1b ); - st文字領域Array[ 0x59 ] = st文字領域90; + st文字領域90.rc = new Rectangle(220, 0xc7, 15, 0x1b); + st文字領域Array[0x59] = st文字領域90; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域91 = st文字領域94; st文字領域91.ch = '|'; - st文字領域91.rc = new Rectangle( 0xeb, 0xc7, 13, 0x1b ); - st文字領域Array[ 90 ] = st文字領域91; + st文字領域91.rc = new Rectangle(0xeb, 0xc7, 13, 0x1b); + st文字領域Array[90] = st文字領域91; st文字領域94 = new ST文字領域(); ST文字領域 st文字領域92 = st文字領域94; st文字領域92.ch = '}'; - st文字領域92.rc = new Rectangle( 1, 0xe3, 15, 0x1b ); - st文字領域Array[ 0x5b ] = st文字領域92; + st文字領域92.rc = new Rectangle(1, 0xe3, 15, 0x1b); + st文字領域Array[0x5b] = st文字領域92; ST文字領域 st文字領域93 = new ST文字領域(); st文字領域93.ch = '~'; - st文字領域93.rc = new Rectangle( 0x12, 0xe3, 0x12, 0x1b ); - st文字領域Array[ 0x5c ] = st文字領域93; + st文字領域93.rc = new Rectangle(0x12, 0xe3, 0x12, 0x1b); + st文字領域Array[0x5c] = st文字領域93; + + st文字領域Array[0x5d] = new ST文字領域(); // #24954 2011.4.23 yyagi + st文字領域Array[0x5d].ch = '@'; + st文字領域Array[0x5d].rc = new Rectangle(38, 227, 28, 28); + st文字領域Array[0x5e] = new ST文字領域(); + st文字領域Array[0x5e].ch = '`'; + st文字領域Array[0x5e].rc = new Rectangle(69, 226, 14, 29); - st文字領域Array[ 0x5d ] = new ST文字領域(); // #24954 2011.4.23 yyagi - st文字領域Array[ 0x5d ].ch = '@'; - st文字領域Array[ 0x5d ].rc = new Rectangle( 38, 227, 28, 28 ); - st文字領域Array[ 0x5e ] = new ST文字領域(); - st文字領域Array[ 0x5e ].ch = '`'; - st文字領域Array[ 0x5e ].rc = new Rectangle( 69, 226, 14, 29 ); - this.st文字領域 = st文字領域Array; } // メソッド - public int n文字列長dot( string str ) + public int n文字列長dot(string str) { - return this.n文字列長dot( str, 1f ); + return this.n文字列長dot(str, 1f); } - public int n文字列長dot( string str, float fScale ) + public int n文字列長dot(string str, float fScale) { - if( string.IsNullOrEmpty( str ) ) + if (string.IsNullOrEmpty(str)) { return 0; } int num = 0; - foreach( char ch in str ) + foreach (char ch in str) { - foreach( ST文字領域 st文字領域 in this.st文字領域 ) + foreach (ST文字領域 st文字領域 in this.st文字領域) { - if( st文字領域.ch == ch ) + if (st文字領域.ch == ch) { - num += (int) ( ( st文字領域.rc.Width - 5 ) * fScale ); + num += (int)((st文字領域.rc.Width - 5) * fScale); break; } } } return num; } - public void t文字列描画( int x, int y, string str ) + public void t文字列描画(int x, int y, string str) { - this.t文字列描画( x, y, str, false, 1f ); + this.t文字列描画(x, y, str, false, 1f); } - public void t文字列描画( int x, int y, string str, bool b強調 ) + public void t文字列描画(int x, int y, string str, bool b強調) { - this.t文字列描画( x, y, str, b強調, 1f ); + this.t文字列描画(x, y, str, b強調, 1f); } - public void t文字列描画( int x, int y, string str, bool b強調, float fScale ) + public void t文字列描画(int x, int y, string str, bool b強調, float fScale) { - if( !base.b活性化してない && !string.IsNullOrEmpty( str ) ) + if (!base.b活性化してない && !string.IsNullOrEmpty(str)) { CTexture texture = b強調 ? this.tx強調文字 : this.tx通常文字; - if( texture != null ) + if (texture != null) { - texture.vc拡大縮小倍率 = new Vector3( fScale, fScale, 1f ); - foreach( char ch in str ) + texture.vc拡大縮小倍率 = new Vector3(fScale, fScale, 1f); + foreach (char ch in str) { - foreach( ST文字領域 st文字領域 in this.st文字領域 ) + foreach (ST文字領域 st文字領域 in this.st文字領域) { - if( st文字領域.ch == ch ) + if (st文字領域.ch == ch) { - texture.t2D描画( CDTXMania.app.Device, x, y, st文字領域.rc ); - x += (int) ( ( st文字領域.rc.Width - 5 ) * fScale ); + texture.t2D描画(CDTXMania.app.Device, x, y, st文字領域.rc); + x += (int)((st文字領域.rc.Width - 5) * fScale); break; } } @@ -555,23 +555,23 @@ namespace DTXMania public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - this.tx通常文字 = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\Screen font dfp.png" ), false ); - this.tx強調文字 = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\Screen font dfp em.png" ), false ); + this.tx通常文字 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\Screen font dfp.png"), false); + this.tx強調文字 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\Screen font dfp em.png"), false); base.OnManagedリソースの作成(); } } public override void OnManagedリソースの解放() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - if( this.tx強調文字 != null ) + if (this.tx強調文字 != null) { this.tx強調文字.Dispose(); this.tx強調文字 = null; } - if( this.tx通常文字 != null ) + if (this.tx通常文字 != null) { this.tx通常文字.Dispose(); this.tx通常文字 = null; @@ -579,13 +579,13 @@ namespace DTXMania base.OnManagedリソースの解放(); } } - + // その他 #region [ private ] //----------------- - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] private struct ST文字領域 { public char ch; diff --git a/DTXManiaプロジェクト/コード/ステージ/CActFIFOBlack.cs b/DTXManiaプロジェクト/コード/ステージ/CActFIFOBlack.cs index d18b1ab0..ffcf22f5 100644 --- a/DTXManiaプロジェクト/コード/ステージ/CActFIFOBlack.cs +++ b/DTXManiaプロジェクト/コード/ステージ/CActFIFOBlack.cs @@ -14,36 +14,36 @@ namespace DTXMania public void tフェードアウト開始() { this.mode = EFIFOモード.フェードアウト; - this.counter = new CCounter( 0, 100, 5, CDTXMania.app.Timer ); + this.counter = new CCounter(0, 100, 5, CDTXMania.app.Timer); } public void tフェードイン開始() { this.mode = EFIFOモード.フェードイン; - this.counter = new CCounter( 0, 100, 5, CDTXMania.app.Timer ); + this.counter = new CCounter(0, 100, 5, CDTXMania.app.Timer); } - + // CActivity 実装 public override void On非活性化() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.tx黒タイル64x64 ); + TextureFactory.tテクスチャの解放(ref this.tx黒タイル64x64); base.On非活性化(); } } public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - this.tx黒タイル64x64 = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\Tile black 64x64.png" ), false ); + this.tx黒タイル64x64 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\Tile black 64x64.png"), false); base.OnManagedリソースの作成(); } } public override int On進行描画() { - if( base.b活性化してない || ( this.counter == null ) ) + if (base.b活性化してない || (this.counter == null)) { return 0; } @@ -51,16 +51,16 @@ namespace DTXMania // Size clientSize = CDTXMania.app.Window.ClientSize; // #23510 2010.10.31 yyagi: delete as of no one use this any longer. if (this.tx黒タイル64x64 != null) { - this.tx黒タイル64x64.n透明度 = ( this.mode == EFIFOモード.フェードイン ) ? ( ( ( 100 - this.counter.n現在の値 ) * 0xff ) / 100 ) : ( ( this.counter.n現在の値 * 0xff ) / 100 ); + this.tx黒タイル64x64.n透明度 = (this.mode == EFIFOモード.フェードイン) ? (((100 - this.counter.n現在の値) * 0xff) / 100) : ((this.counter.n現在の値 * 0xff) / 100); for (int i = 0; i <= (SampleFramework.GameWindowSize.Width / 64); i++) // #23510 2010.10.31 yyagi: change "clientSize.Width" to "640" to fix FIFO drawing size { for (int j = 0; j <= (SampleFramework.GameWindowSize.Height / 64); j++) // #23510 2010.10.31 yyagi: change "clientSize.Height" to "480" to fix FIFO drawing size { - this.tx黒タイル64x64.t2D描画( CDTXMania.app.Device, i * 64, j * 64 ); + this.tx黒タイル64x64.t2D描画(CDTXMania.app.Device, i * 64, j * 64); } } } - if( this.counter.n現在の値 != 100 ) + if (this.counter.n現在の値 != 100) { return 0; } diff --git a/DTXManiaプロジェクト/コード/ステージ/CActFIFOWhite.cs b/DTXManiaプロジェクト/コード/ステージ/CActFIFOWhite.cs index 1d7df2de..45183b19 100644 --- a/DTXManiaプロジェクト/コード/ステージ/CActFIFOWhite.cs +++ b/DTXManiaプロジェクト/コード/ステージ/CActFIFOWhite.cs @@ -13,12 +13,12 @@ namespace DTXMania public void tフェードアウト開始() { this.mode = EFIFOモード.フェードアウト; - this.counter = new CCounter( 0, 100, 5, CDTXMania.app.Timer ); + this.counter = new CCounter(0, 100, 5, CDTXMania.app.Timer); } public void tフェードイン開始() { this.mode = EFIFOモード.フェードイン; - this.counter = new CCounter( 0, 100, 5, CDTXMania.app.Timer ); + this.counter = new CCounter(0, 100, 5, CDTXMania.app.Timer); } public void tフェードイン完了() // #25406 2011.6.9 yyagi { @@ -29,23 +29,23 @@ namespace DTXMania public override void On非活性化() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.tx白タイル64x64 ); + TextureFactory.tテクスチャの解放(ref this.tx白タイル64x64); base.On非活性化(); } } public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - this.tx白タイル64x64 = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\Tile white 64x64.png" ), false ); + this.tx白タイル64x64 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\Tile white 64x64.png"), false); base.OnManagedリソースの作成(); } } public override int On進行描画() { - if( base.b活性化してない || ( this.counter == null ) ) + if (base.b活性化してない || (this.counter == null)) { return 0; } @@ -54,16 +54,16 @@ namespace DTXMania // Size clientSize = CDTXMania.app.Window.ClientSize; // #23510 2010.10.31 yyagi: delete as of no one use this any longer. if (this.tx白タイル64x64 != null) { - this.tx白タイル64x64.n透明度 = ( this.mode == EFIFOモード.フェードイン ) ? ( ( ( 100 - this.counter.n現在の値 ) * 0xff ) / 100 ) : ( ( this.counter.n現在の値 * 0xff ) / 100 ); + this.tx白タイル64x64.n透明度 = (this.mode == EFIFOモード.フェードイン) ? (((100 - this.counter.n現在の値) * 0xff) / 100) : ((this.counter.n現在の値 * 0xff) / 100); for (int i = 0; i <= (SampleFramework.GameWindowSize.Width / 64); i++) // #23510 2010.10.31 yyagi: change "clientSize.Width" to "640" to fix FIFO drawing size { for (int j = 0; j <= (SampleFramework.GameWindowSize.Height / 64); j++) // #23510 2010.10.31 yyagi: change "clientSize.Height" to "480" to fix FIFO drawing size { - this.tx白タイル64x64.t2D描画( CDTXMania.app.Device, i * 64, j * 64 ); + this.tx白タイル64x64.t2D描画(CDTXMania.app.Device, i * 64, j * 64); } } } - if( this.counter.n現在の値 != 100 ) + if (this.counter.n現在の値 != 100) { return 0; } diff --git a/DTXManiaプロジェクト/コード/ステージ/CActLVLNFont.cs b/DTXManiaプロジェクト/コード/ステージ/CActLVLNFont.cs index c3dbd8db..8f1d98c9 100644 --- a/DTXManiaプロジェクト/コード/ステージ/CActLVLNFont.cs +++ b/DTXManiaプロジェクト/コード/ステージ/CActLVLNFont.cs @@ -85,7 +85,7 @@ namespace DTXMania { if (!base.b活性化してない) { - if ( this.tx数値 != null ) + if (this.tx数値 != null) { this.tx数値.Dispose(); this.tx数値 = null; diff --git a/DTXManiaプロジェクト/コード/ステージ/CActオプションパネル.cs b/DTXManiaプロジェクト/コード/ステージ/CActオプションパネル.cs index 645d8146..c490a1fd 100644 --- a/DTXManiaプロジェクト/コード/ステージ/CActオプションパネル.cs +++ b/DTXManiaプロジェクト/コード/ステージ/CActオプションパネル.cs @@ -13,31 +13,31 @@ namespace DTXMania public override void On非活性化() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - TextureFactory.tテクスチャの解放( ref this.txオプションパネル ); + TextureFactory.tテクスチャの解放(ref this.txオプションパネル); base.On非活性化(); } } public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - this.txオプションパネル = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\Screen option panels.png" ), false ); + this.txオプションパネル = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\Screen option panels.png"), false); base.OnManagedリソースの作成(); } } public override int On進行描画() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { Device device = CDTXMania.app.Device; CConfigIni configIni = CDTXMania.app.ConfigIni; - if( this.txオプションパネル != null ) + if (this.txオプションパネル != null) { #region [ スクロール速度表示 ] int drums = configIni.n譜面スクロール速度.Drums; - if( drums > 15 ) + if (drums > 15) { drums = 15; } @@ -45,10 +45,10 @@ namespace DTXMania device, 0x171 * Scale.X, 12 * Scale.Y - 4, - this.rc譜面スピード[ drums ] + this.rc譜面スピード[drums] ); int guitar = configIni.n譜面スクロール速度.Guitar; - if( guitar > 15 ) + if (guitar > 15) { guitar = 15; } @@ -56,10 +56,10 @@ namespace DTXMania device, 0x171 * Scale.X, 0x18 * Scale.Y - 4, - this.rc譜面スピード[ guitar ] + this.rc譜面スピード[guitar] ); int bass = configIni.n譜面スクロール速度.Bass; - if( bass > 15 ) + if (bass > 15) { bass = 15; } @@ -67,7 +67,7 @@ namespace DTXMania device, 0x171 * Scale.X, 0x24 * Scale.Y - 4, - this.rc譜面スピード[ bass ] + this.rc譜面スピード[bass] ); #endregion #region [ Sudden/Hidden/Invisible ] @@ -75,42 +75,42 @@ namespace DTXMania device, 0x189 * Scale.X, 12 * Scale.Y - 4, - this.rcHS[ ( configIni.bHidden.Drums ? 1 : 0 ) + ( configIni.bSudden.Drums ? 2 : 0 ) + - ( configIni.eInvisible.Drums == EInvisible.SEMI ? 4 : 0 ) + - ( configIni.eInvisible.Drums == EInvisible.FULL ? 5 : 0 ) ] ); + this.rcHS[(configIni.bHidden.Drums ? 1 : 0) + (configIni.bSudden.Drums ? 2 : 0) + + (configIni.eInvisible.Drums == EInvisible.SEMI ? 4 : 0) + + (configIni.eInvisible.Drums == EInvisible.FULL ? 5 : 0)]); this.txオプションパネル.t2D描画( device, 0x189 * Scale.X, 0x18 * Scale.Y - 4, - this.rcHS[ ( configIni.bHidden.Guitar ? 1 : 0 ) + ( configIni.bSudden.Guitar ? 2 : 0 ) + - ( configIni.eInvisible.Guitar == EInvisible.SEMI ? 4 : 0 ) + - ( configIni.eInvisible.Guitar == EInvisible.FULL ? 5 : 0 ) ] ); + this.rcHS[(configIni.bHidden.Guitar ? 1 : 0) + (configIni.bSudden.Guitar ? 2 : 0) + + (configIni.eInvisible.Guitar == EInvisible.SEMI ? 4 : 0) + + (configIni.eInvisible.Guitar == EInvisible.FULL ? 5 : 0)]); this.txオプションパネル.t2D描画( device, 0x189 * Scale.X, 0x24 * Scale.Y - 4, - this.rcHS[ ( configIni.bHidden.Bass ? 1 : 0 ) + ( configIni.bSudden.Bass ? 2 : 0 ) + - ( configIni.eInvisible.Bass == EInvisible.SEMI ? 4 : 0 ) + - ( configIni.eInvisible.Bass == EInvisible.FULL ? 5 : 0 ) ] ); + this.rcHS[(configIni.bHidden.Bass ? 1 : 0) + (configIni.bSudden.Bass ? 2 : 0) + + (configIni.eInvisible.Bass == EInvisible.SEMI ? 4 : 0) + + (configIni.eInvisible.Bass == EInvisible.FULL ? 5 : 0)]); #endregion #region [ Dark ] this.txオプションパネル.t2D描画( device, 0x1a1 * Scale.X, 12 * Scale.Y - 4, - this.rcDark[ (int) configIni.eDark ] + this.rcDark[(int)configIni.eDark] ); this.txオプションパネル.t2D描画( device, 0x1a1 * Scale.X, 0x18 * Scale.Y - 4, - this.rcDark[ (int) configIni.eDark ] + this.rcDark[(int)configIni.eDark] ); this.txオプションパネル.t2D描画( device, 0x1a1 * Scale.X, 0x24 * Scale.Y - 4, - this.rcDark[ (int) configIni.eDark ] + this.rcDark[(int)configIni.eDark] ); #endregion #region [ Reverse ] @@ -118,19 +118,19 @@ namespace DTXMania device, 0x1b9 * Scale.X, 12 * Scale.Y - 4, - this.rcReverse[ configIni.bReverse.Drums ? 1 : 0 ] + this.rcReverse[configIni.bReverse.Drums ? 1 : 0] ); this.txオプションパネル.t2D描画( device, 0x1b9 * Scale.X, 0x18 * Scale.Y - 4, - this.rcReverse[ configIni.bReverse.Guitar ? 1 : 0 ] + this.rcReverse[configIni.bReverse.Guitar ? 1 : 0] ); this.txオプションパネル.t2D描画( device, 0x1b9 * Scale.X, 0x24 * Scale.Y - 4, - this.rcReverse[ configIni.bReverse.Bass ? 1 : 0 ] + this.rcReverse[configIni.bReverse.Bass ? 1 : 0] ); #endregion #region [ 判定文字表示位置 ] @@ -138,19 +138,19 @@ namespace DTXMania device, 0x1d1 * Scale.X, 12 * Scale.Y - 4, - this.rcPosition[ (int) configIni.判定文字表示位置.Drums ] + this.rcPosition[(int)configIni.判定文字表示位置.Drums] ); this.txオプションパネル.t2D描画( device, 0x1d1 * Scale.X, 0x18 * Scale.Y - 4, - this.rcPosition[ (int) configIni.判定文字表示位置.Guitar ] + this.rcPosition[(int)configIni.判定文字表示位置.Guitar] ); this.txオプションパネル.t2D描画( device, 0x1d1 * Scale.X, 0x24 * Scale.Y - 4, - this.rcPosition[ (int) configIni.判定文字表示位置.Bass ] + this.rcPosition[(int)configIni.判定文字表示位置.Bass] ); #endregion #region [ Tight ] @@ -158,7 +158,7 @@ namespace DTXMania device, 0x1e9 * Scale.X, 12 * Scale.Y - 4, - this.rcTight[ configIni.bTight ? 1 : 0 ] + this.rcTight[configIni.bTight ? 1 : 0] ); #endregion #region [ Random ] @@ -166,13 +166,13 @@ namespace DTXMania device, 0x1e9 * Scale.X, 0x18 * Scale.Y - 4, - this.rcRandom[ (int) configIni.eRandom.Guitar ] + this.rcRandom[(int)configIni.eRandom.Guitar] ); this.txオプションパネル.t2D描画( device, 0x1e9 * Scale.X, 0x24 * Scale.Y - 4, - this.rcRandom[ (int) configIni.eRandom.Bass ] + this.rcRandom[(int)configIni.eRandom.Bass] ); #endregion #region [ ComboPosigion ] @@ -180,7 +180,7 @@ namespace DTXMania device, 0x201 * Scale.X, 12 * Scale.Y - 4, - this.rcComboPos[ (int) configIni.ドラムコンボ文字の表示位置 ] + this.rcComboPos[(int)configIni.ドラムコンボ文字の表示位置] ); #endregion #region [ Light ] @@ -188,13 +188,13 @@ namespace DTXMania device, 0x201 * Scale.X, 0x18 * Scale.Y - 4, - this.rcLight[ configIni.bLight.Guitar ? 1 : 0 ] + this.rcLight[configIni.bLight.Guitar ? 1 : 0] ); this.txオプションパネル.t2D描画( device, 0x201 * Scale.X, 0x24 * Scale.Y - 4, - this.rcLight[ configIni.bLight.Bass ? 1 : 0 ] + this.rcLight[configIni.bLight.Bass ? 1 : 0] ); #endregion #region [ Left ] @@ -202,13 +202,13 @@ namespace DTXMania device, 0x219 * Scale.X, 0x18 * Scale.Y - 4, - this.rcLeft[ configIni.bLeft.Guitar ? 1 : 0 ] + this.rcLeft[configIni.bLeft.Guitar ? 1 : 0] ); this.txオプションパネル.t2D描画( device, 0x219 * Scale.X, 0x24 * Scale.Y - 4, - this.rcLeft[ configIni.bLeft.Bass ? 1 : 0 ] + this.rcLeft[configIni.bLeft.Bass ? 1 : 0] ); #endregion } @@ -216,7 +216,7 @@ namespace DTXMania return 0; } - + // その他 #region [ private ] diff --git a/DTXManiaプロジェクト/コード/ステージ/CDTXVmode.cs b/DTXManiaプロジェクト/コード/ステージ/CDTXVmode.cs index 8cbad039..9e5ab6e0 100644 --- a/DTXManiaプロジェクト/コード/ステージ/CDTXVmode.cs +++ b/DTXManiaプロジェクト/コード/ステージ/CDTXVmode.cs @@ -61,7 +61,7 @@ namespace DTXMania { get; private set; -// private set; // 本来はprivate setにすべきだが、デバッグが簡単になるので、しばらくはprivateなしのままにする。 + // private set; // 本来はprivate setにすべきだが、デバッグが簡単になるので、しばらくはprivateなしのままにする。 } /// @@ -175,11 +175,11 @@ namespace DTXMania /// プロパティNeedReloadにも結果が入る /// これを呼び出すたびに、Refreshedをtrueにする /// - public bool bIsNeedReloadDTX( string filename ) + public bool bIsNeedReloadDTX(string filename) { - if ( !File.Exists( filename ) ) // 指定したファイルが存在しないなら例外終了 + if (!File.Exists(filename)) // 指定したファイルが存在しないなら例外終了 { - Trace.TraceError( "ファイルが見つかりません。({0})", filename ); + Trace.TraceError("ファイルが見つかりません。({0})", filename); throw new FileNotFoundException(); //return false; } @@ -188,9 +188,9 @@ namespace DTXMania // 前回とファイル名が異なるか、タイムスタンプが更新されているか、 // GRmode等の設定を変更したなら、DTX要更新 - DateTime current_timestamp = File.GetLastWriteTime( filename ); - if ( last_path != filename || current_timestamp > last_timestamp || - this.lastGRmode != this.GRmode || this.lastTimeStretch != this.TimeStretch || this.lastVSyncWait != this.VSyncWait ) + DateTime current_timestamp = File.GetLastWriteTime(filename); + if (last_path != filename || current_timestamp > last_timestamp || + this.lastGRmode != this.GRmode || this.lastTimeStretch != this.TimeStretch || this.lastVSyncWait != this.VSyncWait) { this.last_path = filename; this.last_timestamp = current_timestamp; @@ -213,58 +213,58 @@ namespace DTXMania /// /// DTXV用の引数であればtrue /// 内部でEnabled, nStartBar, Command, NeedReload, filename, last_path, last_timestampを設定する - public bool ParseArguments( string arg ) + public bool ParseArguments(string arg) { bool ret = false, analyzing = true; this.nStartBar = 0; - if ( arg != null ) + if (arg != null) { - while ( analyzing ) + while (analyzing) { - if ( arg == "" ) + if (arg == "") { analyzing = false; } - else if ( arg.StartsWith( "-V", StringComparison.OrdinalIgnoreCase ) ) // サウンド再生 + else if (arg.StartsWith("-V", StringComparison.OrdinalIgnoreCase)) // サウンド再生 { // -Vvvv,ppp,"filename"の形式。 vvv=volume, ppp=pan. this.Enabled = true; this.Command = ECommand.Preview; this.Refreshed = true; ret = true; - arg = arg.Substring( 2 ); + arg = arg.Substring(2); - int pVol = arg.IndexOf( ',' ); //Trace.TraceInformation( "pVol=" + pVol ); - string strVol = arg.Substring( 0, pVol ); //Trace.TraceInformation( "strVol=" + strVol ); - this.previewVolume = Convert.ToInt32( strVol ); //Trace.TraceInformation( "previewVolume=" + previewVolume ); - int pPan = arg.IndexOf( ',', pVol + 1 ); //Trace.TraceInformation( "pPan=" + pPan ); - string strPan = arg.Substring( pVol + 1, pPan - pVol - 1 ); //Trace.TraceInformation( "strPan=" + strPan ); - this.previewPan = Convert.ToInt32( strPan ); //Trace.TraceInformation( "previewPan=" + previewPan ); + int pVol = arg.IndexOf(','); //Trace.TraceInformation( "pVol=" + pVol ); + string strVol = arg.Substring(0, pVol); //Trace.TraceInformation( "strVol=" + strVol ); + this.previewVolume = Convert.ToInt32(strVol); //Trace.TraceInformation( "previewVolume=" + previewVolume ); + int pPan = arg.IndexOf(',', pVol + 1); //Trace.TraceInformation( "pPan=" + pPan ); + string strPan = arg.Substring(pVol + 1, pPan - pVol - 1); //Trace.TraceInformation( "strPan=" + strPan ); + this.previewPan = Convert.ToInt32(strPan); //Trace.TraceInformation( "previewPan=" + previewPan ); - arg = arg.Substring( pPan + 1 ); - arg = arg.Trim( new char[] { '\"' } ); + arg = arg.Substring(pPan + 1); + arg = arg.Trim(new char[] { '\"' }); this.previewFilename = arg; analyzing = false; } // -S -Nxxx filename - else if ( arg.StartsWith( "-S", StringComparison.OrdinalIgnoreCase ) ) // DTXV再生停止 + else if (arg.StartsWith("-S", StringComparison.OrdinalIgnoreCase)) // DTXV再生停止 { this.Enabled = true; this.Command = ECommand.Stop; this.Refreshed = true; ret = true; - arg = arg.Substring( 2 ); + arg = arg.Substring(2); } - else if ( arg.StartsWith( "-D", StringComparison.OrdinalIgnoreCase ) ) + else if (arg.StartsWith("-D", StringComparison.OrdinalIgnoreCase)) { // -DW, -DA1など - arg = arg.Substring( 2 ); // -D を削除 - switch ( arg[ 0 ] ) + arg = arg.Substring(2); // -D を削除 + switch (arg[0]) { #region [ DirectSound ] case 'D': - if ( this.soundDeviceType != ESoundDeviceType.DirectSound ) + if (this.soundDeviceType != ESoundDeviceType.DirectSound) { this.ChangedSoundDevice = true; this.soundDeviceType = ESoundDeviceType.DirectSound; @@ -273,12 +273,12 @@ namespace DTXMania { this.ChangedSoundDevice = false; } - arg = arg.Substring( 1 ); + arg = arg.Substring(1); break; #endregion #region [ WASAPI ] case 'W': - if ( this.soundDeviceType != ESoundDeviceType.ExclusiveWASAPI ) + if (this.soundDeviceType != ESoundDeviceType.ExclusiveWASAPI) { this.ChangedSoundDevice = true; this.soundDeviceType = ESoundDeviceType.ExclusiveWASAPI; @@ -287,12 +287,12 @@ namespace DTXMania { this.ChangedSoundDevice = false; } - arg = arg.Substring( 1 ); + arg = arg.Substring(1); break; #endregion #region [ ASIO ] case 'A': - if ( this.soundDeviceType != ESoundDeviceType.ASIO ) + if (this.soundDeviceType != ESoundDeviceType.ASIO) { this.ChangedSoundDevice = true; this.soundDeviceType = ESoundDeviceType.ASIO; @@ -301,18 +301,18 @@ namespace DTXMania { this.ChangedSoundDevice = false; } - arg = arg.Substring( 1 ); + arg = arg.Substring(1); int nAsioDev = 0, p = 0; - while ( true ) + while (true) { - char c = arg[ 0 ]; - if ( '0' <= c && c <= '9' ) + char c = arg[0]; + if ('0' <= c && c <= '9') { nAsioDev *= 10; nAsioDev += c - '0'; p++; - arg = arg.Substring( 1 ); + arg = arg.Substring(1); continue; } else @@ -320,7 +320,7 @@ namespace DTXMania break; } } - if ( this.nASIOdevice != nAsioDev ) + if (this.nASIOdevice != nAsioDev) { this.ChangedSoundDevice = true; this.nASIOdevice = nAsioDev; @@ -331,34 +331,34 @@ namespace DTXMania #region [ GRmode, TimeStretch, VSyncWait ] { // Reload判定は、-Nのところで行う - this.GRmode = ( arg[ 0 ] == 'Y' ); - this.TimeStretch = ( arg[ 1 ] == 'Y' ); - this.VSyncWait = ( arg[ 2 ] == 'Y' ); + this.GRmode = (arg[0] == 'Y'); + this.TimeStretch = (arg[1] == 'Y'); + this.VSyncWait = (arg[2] == 'Y'); - arg = arg.Substring( 3 ); + arg = arg.Substring(3); } #endregion } - else if ( arg.StartsWith( "-N", StringComparison.OrdinalIgnoreCase ) ) + else if (arg.StartsWith("-N", StringComparison.OrdinalIgnoreCase)) { this.Enabled = true; this.Command = ECommand.Play; ret = true; - arg = arg.Substring( 2 ); // "-N"を除去 - string[] p = arg.Split( new char[] { ' ' } ); - this.nStartBar = int.Parse( p[ 0 ] ); // 再生開始小節 - if ( this.nStartBar < 0 ) + arg = arg.Substring(2); // "-N"を除去 + string[] p = arg.Split(new char[] { ' ' }); + this.nStartBar = int.Parse(p[0]); // 再生開始小節 + if (this.nStartBar < 0) { this.nStartBar = -1; } - int startIndex = arg.IndexOf( ' ' ); - string filename = arg.Substring( startIndex + 1 ); // 再生ファイル名(フルパス) これで引数が終わっていることを想定 + int startIndex = arg.IndexOf(' '); + string filename = arg.Substring(startIndex + 1); // 再生ファイル名(フルパス) これで引数が終わっていることを想定 try { - filename = filename.Trim( new char[] { '\"' } ); - bIsNeedReloadDTX( filename ); + filename = filename.Trim(new char[] { '\"' }); + bIsNeedReloadDTX(filename); } catch // 指定ファイルが存在しない { @@ -372,8 +372,8 @@ namespace DTXMania } } } -//string[] s = { "Stop", "Play", "Preview" }; -//Trace.TraceInformation( "Command: " + s[ (int) this.Command ] ); + //string[] s = { "Stop", "Play", "Preview" }; + //Trace.TraceInformation( "Command: " + s[ (int) this.Command ] ); return ret; } @@ -384,14 +384,14 @@ namespace DTXMania { CConfigIni cc = new CConfigIni(); string path = CDTXMania.app.strEXEのあるフォルダ + "Config.ini"; - if ( File.Exists( path ) ) + if (File.Exists(path)) { - FileInfo fi = new FileInfo( path ); - if ( fi.Length > 0 ) // Config.iniが0byteだったなら、読み込まない + FileInfo fi = new FileInfo(path); + if (fi.Length > 0) // Config.iniが0byteだったなら、読み込まない { try { - cc.tファイルから読み込み( path ); + cc.tファイルから読み込み(path); } catch { @@ -401,19 +401,19 @@ namespace DTXMania fi = null; } - cc.nViewerScrollSpeed = CDTXMania.app.ConfigIni.n譜面スクロール速度; + cc.nViewerScrollSpeed = CDTXMania.app.ConfigIni.n譜面スクロール速度; cc.bViewerShowDebugStatus = CDTXMania.app.ConfigIni.b演奏情報を表示する; - cc.bViewerVSyncWait = CDTXMania.app.ConfigIni.b垂直帰線待ちを行う; - cc.bViewerTimeStretch = CDTXMania.app.ConfigIni.bTimeStretch; - cc.bViewerDrums有効 = CDTXMania.app.ConfigIni.bDrums有効; - cc.bViewerGuitar有効 = CDTXMania.app.ConfigIni.bGuitar有効; + cc.bViewerVSyncWait = CDTXMania.app.ConfigIni.b垂直帰線待ちを行う; + cc.bViewerTimeStretch = CDTXMania.app.ConfigIni.bTimeStretch; + cc.bViewerDrums有効 = CDTXMania.app.ConfigIni.bDrums有効; + cc.bViewerGuitar有効 = CDTXMania.app.ConfigIni.bGuitar有効; cc.nViewerウインドウwidth = CDTXMania.app.ConfigIni.nウインドウwidth; cc.nViewerウインドウheight = CDTXMania.app.ConfigIni.nウインドウheight; cc.nViewer初期ウィンドウ開始位置X = CDTXMania.app.ConfigIni.n初期ウィンドウ開始位置X; cc.nViewer初期ウィンドウ開始位置Y = CDTXMania.app.ConfigIni.n初期ウィンドウ開始位置Y; - cc.t書き出し( path ); + cc.t書き出し(path); } private string last_path; diff --git a/DTXManiaプロジェクト/コード/ステージ/CStage.cs b/DTXManiaプロジェクト/コード/ステージ/CStage.cs index a8d7b412..c17d1cd2 100644 --- a/DTXManiaプロジェクト/コード/ステージ/CStage.cs +++ b/DTXManiaプロジェクト/コード/ステージ/CStage.cs @@ -35,7 +35,7 @@ namespace DTXMania ChangeSkin, // #28195 2011.5.4 yyagi 終了 } - + internal Eフェーズ eフェーズID; public enum Eフェーズ { diff --git a/DTXManiaプロジェクト/コード/プラグイン/CPluginHost.cs b/DTXManiaプロジェクト/コード/プラグイン/CPluginHost.cs index 2eba05b3..1bc753ca 100644 --- a/DTXManiaプロジェクト/コード/プラグイン/CPluginHost.cs +++ b/DTXManiaプロジェクト/コード/プラグイン/CPluginHost.cs @@ -14,7 +14,7 @@ namespace DTXMania // コンストラクタ public CPluginHost() { - this._DTXManiaVersion = new CDTXVersion( CDTXMania.VERSION ); + this._DTXManiaVersion = new CDTXVersion(CDTXMania.VERSION); } @@ -26,7 +26,7 @@ namespace DTXMania } public Device D3D9Device { - get { return (CDTXMania.app != null ) ? CDTXMania.app.Device : null; } + get { return (CDTXMania.app != null) ? CDTXMania.app.Device : null; } } public Format TextureFormat { @@ -46,11 +46,11 @@ namespace DTXMania } public CStage.Eステージ e現在のステージ { - get { return ( CDTXMania.app.r現在のステージ != null ) ? CDTXMania.app.r現在のステージ.eステージID : CStage.Eステージ.何もしない; } + get { return (CDTXMania.app.r現在のステージ != null) ? CDTXMania.app.r現在のステージ.eステージID : CStage.Eステージ.何もしない; } } public CStage.Eフェーズ e現在のフェーズ { - get { return ( CDTXMania.app.r現在のステージ != null ) ? CDTXMania.app.r現在のステージ.eフェーズID : CStage.Eフェーズ.共通_通常状態; } + get { return (CDTXMania.app.r現在のステージ != null) ? CDTXMania.app.r現在のステージ.eフェーズID : CStage.Eフェーズ.共通_通常状態; } } public bool t入力を占有する(IPluginActivity act) { @@ -68,13 +68,13 @@ namespace DTXMania CDTXMania.app.act現在入力を占有中のプラグイン = null; return true; } - public void tシステムサウンドを再生する( Eシステムサウンド sound ) + public void tシステムサウンドを再生する(Eシステムサウンド sound) { - if( CDTXMania.app.Skin != null ) - CDTXMania.app.Skin[ sound ].t再生する(); + if (CDTXMania.app.Skin != null) + CDTXMania.app.Skin[sound].t再生する(); } - - + + // その他 #region [ private ] diff --git a/DTXManiaプロジェクト/コード/プラグイン/IPluginActivity.cs b/DTXManiaプロジェクト/コード/プラグイン/IPluginActivity.cs index 124cca1d..9e1674a9 100644 --- a/DTXManiaプロジェクト/コード/プラグイン/IPluginActivity.cs +++ b/DTXManiaプロジェクト/コード/プラグイン/IPluginActivity.cs @@ -13,14 +13,14 @@ namespace DTXMania /// (4) Direct3D デバイスのリセット時には、デバイスのリセット前に OnUnmanagedリソースの解放() を1回呼び出し、デバイスをリセットしたのち、OnUnmanagedリソースの作成() を1回呼び出します。 /// (5) Direct3D デバイスのロスト時には、デバイスの再生成前に OnUnmanagedリソースの解放()・OnManagedリソースの解放() を1回ずつ呼び出し、デバイスを再生成したのち、OnManagedリソースの作成()・OnUnmanagedリソースの作成() を1回ずつ呼び出します。 /// - public interface IPluginActivity + public interface IPluginActivity { /// /// プラグインの初期化を行います。 /// DTXMania の起動処理の最後(セットアップ画面が表示される直前)に、DTXMania から一度だけ呼び出されます。 /// プラグインが、ホスト(DTXMania)の情報にアクセスするためのオブジェクト。 /// - void On初期化( DTXMania.IPluginHost PluginHost ); + void On初期化(DTXMania.IPluginHost PluginHost); /// /// プラグインの終了処理を行います。 @@ -32,7 +32,7 @@ namespace DTXMania /// Managed リソースを作成します。 /// void OnManagedリソースの作成(); - + /// /// Unmanaged リソースを作成します。 /// @@ -56,13 +56,13 @@ namespace DTXMania /// パッド入力。他のプラグインが入力占有中である場合は null が渡されます。 /// キーボード入力。他のプラグインが入力占有中である場合は null が渡されます。 /// - void On進行描画( DTXMania.CPad pad, FDK.IInputDevice keyboard ); + void On進行描画(DTXMania.CPad pad, FDK.IInputDevice keyboard); /// /// ステージが変わる度に呼び出されます。 /// 呼び出しタイミングは、新しいステージの活性化直後かつ描画開始前です。 /// - void Onステージ変更(CConfigIni config); + void Onステージ変更(CConfigIni config); /// /// 選曲画面で選択曲が変更された場合に呼び出されます。 @@ -74,10 +74,10 @@ namespace DTXMania /// 選択されている曲のset.defブロック番号(0~)。setDef.blocks[]の引数です。set.def が存在しなければ負数を渡します。 /// 選択されている曲のブロック内の曲番号(0~4)。setDef.blocks[nブロック番号inSetDef].File[]/Label[]の引数です。set.def が存在しなければ負数を渡します。 /// この番号は、選曲画面でプレイヤーが目にしているレベル(L1~L5)に常に対応するとは限りません。 - void On選択曲変更( string str選択曲ファイル名, DTXMania.CSetDef setDef, int nブロック番号inSetDef, int n曲番号inブロック ); + void On選択曲変更(string str選択曲ファイル名, DTXMania.CSetDef setDef, int nブロック番号inSetDef, int n曲番号inブロック); - void On演奏クリア( DTXMania.CScoreIni scoreIni ); - void On演奏失敗( DTXMania.CScoreIni scoreIni ); - void On演奏キャンセル( DTXMania.CScoreIni scoreIni ); + void On演奏クリア(DTXMania.CScoreIni scoreIni); + void On演奏失敗(DTXMania.CScoreIni scoreIni); + void On演奏キャンセル(DTXMania.CScoreIni scoreIni); } } diff --git a/DTXManiaプロジェクト/コード/プラグイン/IPluginHost.cs b/DTXManiaプロジェクト/コード/プラグイン/IPluginHost.cs index 8f097439..d4cff246 100644 --- a/DTXManiaプロジェクト/コード/プラグイン/IPluginHost.cs +++ b/DTXManiaプロジェクト/コード/プラグイン/IPluginHost.cs @@ -45,7 +45,7 @@ /// /// 宣言するプラグイン(すなわち this を指定する) /// 占有に成功すれば true を返し、既に誰かが占有中である場合には false を返します。 - bool t入力を占有する( IPluginActivity act ); + bool t入力を占有する(IPluginActivity act); /// /// 自分以外が入力データを扱って良いことを宣言します。 @@ -53,12 +53,12 @@ /// /// 宣言するプラグイン(すなわち this を指定する) /// 占有解除に成功すれば true、失敗すれば flase を返します。 - bool t入力の占有を解除する( IPluginActivity act ); + bool t入力の占有を解除する(IPluginActivity act); /// /// 指定されたシステムサウンド/BGMを再生します。 /// /// 再生するシステムサウンドの識別子。 - void tシステムサウンドを再生する( Eシステムサウンド sound ); + void tシステムサウンドを再生する(Eシステムサウンド sound); } } diff --git a/DTXManiaプロジェクト/コード/全体/CActFlushGPU.cs b/DTXManiaプロジェクト/コード/全体/CActFlushGPU.cs index 1bf5d76e..92ada46e 100644 --- a/DTXManiaプロジェクト/コード/全体/CActFlushGPU.cs +++ b/DTXManiaプロジェクト/コード/全体/CActFlushGPU.cs @@ -19,20 +19,20 @@ namespace DTXMania public override void OnManagedリソースの作成() { - if ( !base.b活性化してない ) + if (!base.b活性化してない) { try // #xxxxx 2012.12.31 yyagi: to prepare flush, first of all, I create q queue to the GPU. { - IDirect3DQuery9 = new SlimDX.Direct3D9.Query( CDTXMania.app.Device, QueryType.Occlusion ); + IDirect3DQuery9 = new SlimDX.Direct3D9.Query(CDTXMania.app.Device, QueryType.Occlusion); } - catch ( Exception e ) + catch (Exception e) { - Trace.TraceError( e.Message ); + Trace.TraceError(e.Message); } base.OnManagedリソースの作成(); } } - public override void OnManagedリソースの解放() + public override void OnManagedリソースの解放() { IDirect3DQuery9.Dispose(); IDirect3DQuery9 = null; @@ -40,11 +40,11 @@ namespace DTXMania } public override int On進行描画() { - if ( !base.b活性化してない ) + if (!base.b活性化してない) { - IDirect3DQuery9.Issue( Issue.End ); + IDirect3DQuery9.Issue(Issue.End); DWM.Flush(); - IDirect3DQuery9.GetData( true ); // flush GPU queue + IDirect3DQuery9.GetData(true); // flush GPU queue } return 0; } diff --git a/DTXManiaプロジェクト/コード/全体/CConfigIni.cs b/DTXManiaプロジェクト/コード/全体/CConfigIni.cs index 9756d8f9..8d6e4141 100644 --- a/DTXManiaプロジェクト/コード/全体/CConfigIni.cs +++ b/DTXManiaプロジェクト/コード/全体/CConfigIni.cs @@ -227,99 +227,99 @@ namespace DTXMania this.padCapture = value; } } - public CConfigIni.CKeyAssign.STKEYASSIGN[] this[ int index ] + public CConfigIni.CKeyAssign.STKEYASSIGN[] this[int index] { get { - switch ( index ) + switch (index) { - case (int) EKeyConfigPad.HH: + case (int)EKeyConfigPad.HH: return this.padHH_R; - case (int) EKeyConfigPad.SD: + case (int)EKeyConfigPad.SD: return this.padSD_G; - case (int) EKeyConfigPad.BD: + case (int)EKeyConfigPad.BD: return this.padBD_B; - case (int) EKeyConfigPad.HT: + case (int)EKeyConfigPad.HT: return this.padHT_Pick; - case (int) EKeyConfigPad.LT: + case (int)EKeyConfigPad.LT: return this.padLT_Wail; - case (int) EKeyConfigPad.FT: + case (int)EKeyConfigPad.FT: return this.padFT_Cancel; - case (int) EKeyConfigPad.CY: + case (int)EKeyConfigPad.CY: return this.padCY_Decide; - case (int) EKeyConfigPad.HHO: + case (int)EKeyConfigPad.HHO: return this.padHHO; - case (int) EKeyConfigPad.RD: + case (int)EKeyConfigPad.RD: return this.padRD; - case (int) EKeyConfigPad.LC: + case (int)EKeyConfigPad.LC: return this.padLC; - case (int) EKeyConfigPad.HP: // #27029 2012.1.4 from + case (int)EKeyConfigPad.HP: // #27029 2012.1.4 from return this.padHP; // - case (int) EKeyConfigPad.Capture: + case (int)EKeyConfigPad.Capture: return this.padCapture; } throw new IndexOutOfRangeException(); } set { - switch ( index ) + switch (index) { - case (int) EKeyConfigPad.HH: + case (int)EKeyConfigPad.HH: this.padHH_R = value; return; - case (int) EKeyConfigPad.SD: + case (int)EKeyConfigPad.SD: this.padSD_G = value; return; - case (int) EKeyConfigPad.BD: + case (int)EKeyConfigPad.BD: this.padBD_B = value; return; - case (int) EKeyConfigPad.Pick: + case (int)EKeyConfigPad.Pick: this.padHT_Pick = value; return; - case (int) EKeyConfigPad.LT: + case (int)EKeyConfigPad.LT: this.padLT_Wail = value; return; - case (int) EKeyConfigPad.FT: + case (int)EKeyConfigPad.FT: this.padFT_Cancel = value; return; - case (int) EKeyConfigPad.CY: + case (int)EKeyConfigPad.CY: this.padCY_Decide = value; return; - case (int) EKeyConfigPad.HHO: + case (int)EKeyConfigPad.HHO: this.padHHO = value; return; - case (int) EKeyConfigPad.RD: + case (int)EKeyConfigPad.RD: this.padRD = value; return; - case (int) EKeyConfigPad.LC: + case (int)EKeyConfigPad.LC: this.padLC = value; return; - case (int) EKeyConfigPad.HP: + case (int)EKeyConfigPad.HP: this.padHP = value; return; - case (int) EKeyConfigPad.Capture: + case (int)EKeyConfigPad.Capture: this.padCapture = value; return; } @@ -345,13 +345,13 @@ namespace DTXMania #endregion } - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] public struct STKEYASSIGN { public E入力デバイス 入力デバイス; public int ID; public int コード; - public STKEYASSIGN( E入力デバイス DeviceType, int nID, int nCode ) + public STKEYASSIGN(E入力デバイス DeviceType, int nID, int nCode) { this.入力デバイス = DeviceType; this.ID = nID; @@ -363,43 +363,43 @@ namespace DTXMania public CKeyAssignPad Drums = new CKeyAssignPad(); public CKeyAssignPad Guitar = new CKeyAssignPad(); public CKeyAssignPad System = new CKeyAssignPad(); - public CKeyAssignPad this[ int index ] + public CKeyAssignPad this[int index] { get { - switch( index ) + switch (index) { - case (int) EKeyConfigPart.DRUMS: + case (int)EKeyConfigPart.DRUMS: return this.Drums; - case (int) EKeyConfigPart.GUITAR: + case (int)EKeyConfigPart.GUITAR: return this.Guitar; - case (int) EKeyConfigPart.BASS: + case (int)EKeyConfigPart.BASS: return this.Bass; - case (int) EKeyConfigPart.SYSTEM: + case (int)EKeyConfigPart.SYSTEM: return this.System; } throw new IndexOutOfRangeException(); } set { - switch( index ) + switch (index) { - case (int) EKeyConfigPart.DRUMS: + case (int)EKeyConfigPart.DRUMS: this.Drums = value; return; - case (int) EKeyConfigPart.GUITAR: + case (int)EKeyConfigPart.GUITAR: this.Guitar = value; return; - case (int) EKeyConfigPart.BASS: + case (int)EKeyConfigPart.BASS: this.Bass = value; return; - case (int) EKeyConfigPart.SYSTEM: + case (int)EKeyConfigPart.SYSTEM: this.System = value; return; } @@ -416,7 +416,7 @@ namespace DTXMania // DirectSound, ASIO, WASAPI, - Unknown=99 + Unknown = 99 } // プロパティ @@ -462,7 +462,7 @@ namespace DTXMania public bool b選曲リストフォントを太字にする; public bool b全画面モード; public int n初期ウィンドウ開始位置X; // #30675 2013.02.04 ikanick add - public int n初期ウィンドウ開始位置Y; + public int n初期ウィンドウ開始位置Y; public int nウインドウwidth; // #23510 2010.10.31 yyagi add public int nウインドウheight; // #23510 2010.10.31 yyagi add public Dictionary dicJoystick; @@ -476,7 +476,7 @@ namespace DTXMania public E打ち分け時の再生の優先順位 eHitSoundPriorityHH; public STDGBVALUE eRandom; public Eダメージレベル eダメージレベル; - public CKeyAssign KeyAssign; + public CKeyAssign KeyAssign; public int n非フォーカス時スリープms; // #23568 2010.11.04 ikanick add public int nフレーム毎スリープms; // #xxxxx 2011.11.27 yyagi add public int n演奏速度; @@ -492,27 +492,27 @@ namespace DTXMania public string str選曲リストフォント; public Eドラムコンボ文字の表示位置 ドラムコンボ文字の表示位置; public STDGBVALUE 判定文字表示位置; -// public int nハイハット切り捨て下限Velocity; -// public int n切り捨て下限Velocity; // #23857 2010.12.12 yyagi VelocityMin + // public int nハイハット切り捨て下限Velocity; + // public int n切り捨て下限Velocity; // #23857 2010.12.12 yyagi VelocityMin public STDGBVALUE nInputAdjustTimeMs; // #23580 2011.1.3 yyagi タイミングアジャスト機能 public STDGBVALUE nJudgeLinePosOffset; // #31602 2013.6.23 yyagi 判定ライン表示位置のオフセット public STDGBVALUE fJudgeLinePosOffsetBase; - public int nShowLagType; // #25370 2011.6.5 yyagi ズレ時間表示機能 + public int nShowLagType; // #25370 2011.6.5 yyagi ズレ時間表示機能 public bool bIsAutoResultCapture; // #25399 2011.6.9 yyagi リザルト画像自動保存機能のON/OFF制御 public int nPoliphonicSounds; // #28228 2012.5.1 yyagi レーン毎の最大同時発音数 public bool bバッファ入力を行う; public bool bIsEnabledSystemMenu; // #28200 2012.5.1 yyagi System Menuの使用可否切替 public string strSystemSkinSubfolderFullName; // #28195 2012.5.2 yyagi Skin切替用 System/以下のサブフォルダ名 public bool bUseBoxDefSkin; // #28195 2012.5.6 yyagi Skin切替用 box.defによるスキン変更機能を使用するか否か - public STDGBVALUE eAutoGhost; // #35411 2015.8.18 chnmr0 プレー時使用ゴーストデータ種別 - public STDGBVALUE eTargetGhost; // #35411 2015.8.18 chnmr0 ゴーストデータ再生方法 + public STDGBVALUE eAutoGhost; // #35411 2015.8.18 chnmr0 プレー時使用ゴーストデータ種別 + public STDGBVALUE eTargetGhost; // #35411 2015.8.18 chnmr0 ゴーストデータ再生方法 public bool b曲読み込みを高速化する; // #36046 2016.2.21 ikanick public bool bConfigIniがないかDTXManiaのバージョンが異なる { get { - return ( !this.bConfigIniが存在している || !CDTXMania.VERSION.Equals( this.strDTXManiaのバージョン ) ); + return (!this.bConfigIniが存在している || !CDTXMania.VERSION.Equals(this.strDTXManiaのバージョン)); } } public bool bDrums有効 @@ -524,7 +524,7 @@ namespace DTXMania set { this._bDrums有効 = value; - if( !this._bGuitar有効 && !this._bDrums有効 ) + if (!this._bGuitar有効 && !this._bDrums有効) { this._bGuitar有効 = true; } @@ -534,13 +534,13 @@ namespace DTXMania { get { - for( int i = 0; i <= (int)EKeyConfigPart.SYSTEM; i++ ) + for (int i = 0; i <= (int)EKeyConfigPart.SYSTEM; i++) { - for( int j = 0; j <= (int)EKeyConfigPad.Capture; j++ ) + for (int j = 0; j <= (int)EKeyConfigPad.Capture; j++) { - for( int k = 0; k < 0x10; k++ ) + for (int k = 0; k < 0x10; k++) { - if( ( this.KeyAssign[ i ][ j ][ k ].入力デバイス == E入力デバイス.キーボード ) && ( this.KeyAssign[ i ][ j ][ k ].コード == (int) SlimDX.DirectInput.Key.Return ) ) + if ((this.KeyAssign[i][j][k].入力デバイス == E入力デバイス.キーボード) && (this.KeyAssign[i][j][k].コード == (int)SlimDX.DirectInput.Key.Return)) { return false; } @@ -559,7 +559,7 @@ namespace DTXMania set { this._bGuitar有効 = value; - if( !this._bGuitar有効 && !this._bDrums有効 ) + if (!this._bGuitar有効 && !this._bDrums有効) { this._bDrums有効 = true; } @@ -580,16 +580,16 @@ namespace DTXMania { get { - return ( !this.bDrums有効 && this.bGuitar有効 ); + return (!this.bDrums有効 && this.bGuitar有効); } } public bool bドラムが全部オートプレイである { get { - for ( int i = (int) Eレーン.LC; i <= (int) Eレーン.CY; i++ ) + for (int i = (int)Eレーン.LC; i <= (int)Eレーン.CY; i++) { - if( !this.bAutoPlay[ i ] ) + if (!this.bAutoPlay[i]) { return false; } @@ -601,9 +601,9 @@ namespace DTXMania { get { - for ( int i = (int) Eレーン.GtR; i <= (int) Eレーン.GtW; i++ ) + for (int i = (int)Eレーン.GtR; i <= (int)Eレーン.GtW; i++) { - if ( !this.bAutoPlay[ i ] ) + if (!this.bAutoPlay[i]) { return false; } @@ -615,9 +615,9 @@ namespace DTXMania { get { - for ( int i = (int) Eレーン.BsR; i <= (int) Eレーン.BsW; i++ ) + for (int i = (int)Eレーン.BsR; i <= (int)Eレーン.BsW; i++) { - if ( !this.bAutoPlay[ i ] ) + if (!this.bAutoPlay[i]) { return false; } @@ -644,11 +644,11 @@ namespace DTXMania } set { - if( value < 0 ) + if (value < 0) { this.nBGAlpha = 0; } - else if( value > 0xff ) + else if (value > 0xff) { this.nBGAlpha = 0xff; } @@ -667,19 +667,19 @@ namespace DTXMania } public bool bIsSwappedGuitarBass_AutoFlagsAreSwapped // #24415 2011.2.21 yyagi FLIP中にalt-f4終了で、AUTOフラグがswapした状態でconfig.iniが出力されてしまうことを避けるためのフラグ { - get; - set; + get; + set; } public bool bIsSwappedGuitarBass_PlaySettingsAreSwapped // #35417 2015.8.18 yyagi FLIP中にalt-f4終了で、演奏設定がswapした状態でconfig.iniが出力されてしまうことを避けるためのフラグ { - get; - set; + get; + set; } public STAUTOPLAY bAutoPlay; public int nSoundDeviceType; // #24820 2012.12.23 yyagi 出力サウンドデバイス(0=ACM(にしたいが設計がきつそうならDirectShow), 1=ASIO, 2=WASAPI) public int nWASAPIBufferSizeMs; // #24820 2013.1.15 yyagi WASAPIのバッファサイズ -// public int nASIOBufferSizeMs; // #24820 2012.12.28 yyagi ASIOのバッファサイズ + // public int nASIOBufferSizeMs; // #24820 2012.12.28 yyagi ASIOのバッファサイズ public int nASIODevice; // #24820 2013.1.17 yyagi ASIOデバイス public bool bUseOSTimer; // #33689 2014.6.6 yyagi 演奏タイマーの種類 public bool bDynamicBassMixerManagement; // #24820 @@ -692,10 +692,10 @@ namespace DTXMania public bool bViewerShowDebugStatus; public bool bViewerTimeStretch; public bool bViewerDrums有効, bViewerGuitar有効; - public int nViewer初期ウィンドウ開始位置X; - public int nViewer初期ウィンドウ開始位置Y; - public int nViewerウインドウwidth; - public int nViewerウインドウheight; + public int nViewer初期ウィンドウ開始位置X; + public int nViewer初期ウィンドウ開始位置Y; + public int nViewerウインドウwidth; + public int nViewerウインドウheight; //public bool bNoMP3Streaming; // 2014.4.14 yyagi; mp3のシーク位置がおかしくなる場合は、これをtrueにすることで、wavにデコードしてからオンメモリ再生する public int nMasterVolume; @@ -851,18 +851,18 @@ namespace DTXMania #endif #region [ STRANGE ] public STRANGE nヒット範囲ms; - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] public struct STRANGE { public int Perfect; public int Great; public int Good; public int Poor; - public int this[ int index ] + public int this[int index] { get { - switch( index ) + switch (index) { case 0: return this.Perfect; @@ -880,7 +880,7 @@ namespace DTXMania } set { - switch( index ) + switch (index) { case 0: this.Perfect = value; @@ -905,7 +905,7 @@ namespace DTXMania #endregion #region [ STLANEVALUE ] public STLANEVALUE nVelocityMin; - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] public struct STLANEVALUE { public int LC; @@ -919,11 +919,11 @@ namespace DTXMania public int RD; public int Guitar; public int Bass; - public int this[ int index ] + public int this[int index] { get { - switch( index ) + switch (index) { case 0: return this.LC; @@ -962,7 +962,7 @@ namespace DTXMania } set { - switch( index ) + switch (index) { case 0: this.LC = value; @@ -1030,12 +1030,12 @@ namespace DTXMania //CDTXMania.app.ConfigIni.bAutoPlay.Bass = CDTXMania.app.ConfigIni.bAutoPlay.Guitar; //CDTXMania.app.ConfigIni.bAutoPlay.Guitar = ts; - int looptime = (int) Eレーン.GtW - (int) Eレーン.GtR + 1; // #29390 2013.1.25 yyagi ギターのAutoLane/AutoPick対応に伴い、FLIPもこれに対応 - for ( int i = 0; i < looptime; i++ ) // こんなに離れたところを独立して修正しなければならない設計ではいけませんね・・・ + int looptime = (int)Eレーン.GtW - (int)Eレーン.GtR + 1; // #29390 2013.1.25 yyagi ギターのAutoLane/AutoPick対応に伴い、FLIPもこれに対応 + for (int i = 0; i < looptime; i++) // こんなに離れたところを独立して修正しなければならない設計ではいけませんね・・・ { - bool b = CDTXMania.app.ConfigIni.bAutoPlay[ i + (int) Eレーン.BsR ]; - CDTXMania.app.ConfigIni.bAutoPlay[ i + (int) Eレーン.BsR ] = CDTXMania.app.ConfigIni.bAutoPlay[ i + (int) Eレーン.GtR ]; - CDTXMania.app.ConfigIni.bAutoPlay[ i + (int) Eレーン.GtR ] = b; + bool b = CDTXMania.app.ConfigIni.bAutoPlay[i + (int)Eレーン.BsR]; + CDTXMania.app.ConfigIni.bAutoPlay[i + (int)Eレーン.BsR] = CDTXMania.app.ConfigIni.bAutoPlay[i + (int)Eレーン.GtR]; + CDTXMania.app.ConfigIni.bAutoPlay[i + (int)Eレーン.GtR] = b; } CDTXMania.app.ConfigIni.bIsSwappedGuitarBass_AutoFlagsAreSwapped = !CDTXMania.app.ConfigIni.bIsSwappedGuitarBass_AutoFlagsAreSwapped; @@ -1043,19 +1043,19 @@ namespace DTXMania public void SwapGuitarBassInfos_PlaySettings() // #35417 2015.8.18 yyagi: 演奏設定のFLIP機能を追加 { bool b; - b = bGraph.Bass; bGraph.Bass = bGraph.Guitar; bGraph.Guitar = b; - b = bHidden.Bass; bHidden.Bass = bHidden.Guitar; bHidden.Guitar = b; - b = bLeft.Bass; bLeft.Bass = bLeft.Guitar; bLeft.Guitar = b; - b = bLight.Bass; bLight.Bass = bLight.Guitar; bLight.Guitar = b; - b = bReverse.Bass; bReverse.Bass = bReverse.Guitar; bReverse.Guitar = b; - b = bSudden.Bass; bSudden.Bass = bSudden.Guitar; bSudden.Guitar = b; + b = bGraph.Bass; bGraph.Bass = bGraph.Guitar; bGraph.Guitar = b; + b = bHidden.Bass; bHidden.Bass = bHidden.Guitar; bHidden.Guitar = b; + b = bLeft.Bass; bLeft.Bass = bLeft.Guitar; bLeft.Guitar = b; + b = bLight.Bass; bLight.Bass = bLight.Guitar; bLight.Guitar = b; + b = bReverse.Bass; bReverse.Bass = bReverse.Guitar; bReverse.Guitar = b; + b = bSudden.Bass; bSudden.Bass = bSudden.Guitar; bSudden.Guitar = b; EInvisible ei; - ei = eInvisible.Bass; eInvisible.Bass = eInvisible.Guitar; eInvisible.Guitar = ei; + ei = eInvisible.Bass; eInvisible.Bass = eInvisible.Guitar; eInvisible.Guitar = ei; Eランダムモード er; - er = eRandom.Bass; eRandom.Bass = eRandom.Guitar; eRandom.Guitar = er; + er = eRandom.Bass; eRandom.Bass = eRandom.Guitar; eRandom.Guitar = er; E判定文字表示位置 ej; - ej = 判定文字表示位置.Bass; 判定文字表示位置.Bass = 判定文字表示位置.Guitar; 判定文字表示位置.Guitar = ej; + ej = 判定文字表示位置.Bass; 判定文字表示位置.Bass = 判定文字表示位置.Guitar; 判定文字表示位置.Guitar = ej; int n; n = n表示可能な最小コンボ数.Bass; n表示可能な最小コンボ数.Bass = n表示可能な最小コンボ数.Guitar; n表示可能な最小コンボ数.Guitar = n; @@ -1138,23 +1138,23 @@ namespace DTXMania this.nInputAdjustTimeMs = new STDGBVALUE(); // #23580 2011.1.3 yyagi this.nJudgeLinePosOffset = new STDGBVALUE(); // #31602 2013.6.23 yyagi this.e判定表示優先度 = E判定表示優先度.Chipより下; - for ( int i = 0; i < 3; i++ ) + for (int i = 0; i < 3; i++) { - this.b演奏音を強調する[ i ] = true; - this.bSudden[ i ] = false; - this.bHidden[ i ] = false; - this.bReverse[ i ] = false; - this.eRandom[ i ] = Eランダムモード.OFF; - this.bLight[ i ] = false; - this.bLeft[ i ] = false; - this.判定文字表示位置[ i ] = E判定文字表示位置.レーン上; - this.n譜面スクロール速度[ i ] = 1; - this.nInputAdjustTimeMs[ i ] = 0; - this.nJudgeLinePosOffset[ i ] = 0; - this.fJudgeLinePosOffsetBase[ i ] = 0.0f; - this.eInvisible[ i ] = EInvisible.OFF; - this.nViewerScrollSpeed[ i ] = 1; - this.e判定位置[ i ] = E判定位置.標準; + this.b演奏音を強調する[i] = true; + this.bSudden[i] = false; + this.bHidden[i] = false; + this.bReverse[i] = false; + this.eRandom[i] = Eランダムモード.OFF; + this.bLight[i] = false; + this.bLeft[i] = false; + this.判定文字表示位置[i] = E判定文字表示位置.レーン上; + this.n譜面スクロール速度[i] = 1; + this.nInputAdjustTimeMs[i] = 0; + this.nJudgeLinePosOffset[i] = 0; + this.fJudgeLinePosOffsetBase[i] = 0.0f; + this.eInvisible[i] = EInvisible.OFF; + this.nViewerScrollSpeed[i] = 1; + this.e判定位置[i] = E判定位置.標準; //this.e判定表示優先度[ i ] = E判定表示優先度.Chipより下; } @@ -1188,7 +1188,7 @@ namespace DTXMania this.nヒット範囲ms.Good = 84; this.nヒット範囲ms.Poor = 117; this.ConfigIniファイル名 = ""; - this.dicJoystick = new Dictionary( 10 ); + this.dicJoystick = new Dictionary(10); this.tデフォルトのキーアサインに設定する(); #region [ velocityMin ] this.nVelocityMin.LC = 0; // #23857 2011.1.31 yyagi VelocityMin @@ -1202,7 +1202,7 @@ namespace DTXMania this.nVelocityMin.RD = 0; #endregion this.nRisky = 0; // #23539 2011.7.26 yyagi RISKYモード - this.nShowLagType = (int) EShowLagType.OFF; // #25370 2011.6.3 yyagi ズレ時間表示 + this.nShowLagType = (int)EShowLagType.OFF; // #25370 2011.6.3 yyagi ズレ時間表示 this.bIsAutoResultCapture = false; // #25399 2011.6.9 yyagi リザルト画像自動保存機能ON/OFF this.bバッファ入力を行う = true; @@ -1210,21 +1210,21 @@ namespace DTXMania this.bIsAllowedDoubleClickFullscreen = true; // #26752 2011.11.26 ダブルクリックでのフルスクリーンモード移行を許可 this.eBDGroup = EBDGroup.打ち分ける; // #27029 2012.1.4 from HHPedalとBassPedalのグルーピング this.nPoliphonicSounds = 4; // #28228 2012.5.1 yyagi レーン毎の最大同時発音数 - // #24820 2013.1.15 yyagi 初期値を4から2に変更。BASS.net使用時の負荷軽減のため。 - // #24820 2013.1.17 yyagi 初期値を4に戻した。動的なミキサー制御がうまく動作しているため。 + // #24820 2013.1.15 yyagi 初期値を4から2に変更。BASS.net使用時の負荷軽減のため。 + // #24820 2013.1.17 yyagi 初期値を4に戻した。動的なミキサー制御がうまく動作しているため。 this.bIsEnabledSystemMenu = true; // #28200 2012.5.1 yyagi System Menuの利用可否切替(使用可) this.strSystemSkinSubfolderFullName = ""; // #28195 2012.5.2 yyagi 使用中のSkinサブフォルダ名 this.bUseBoxDefSkin = true; // #28195 2012.5.6 yyagi box.defによるスキン切替機能を使用するか否か this.bTight = false; // #29500 2012.9.11 kairera0467 TIGHTモード #region [ WASAPI/ASIO ] this.nSoundDeviceType = FDK.COS.bIsVistaOrLater ? - (int) ESoundDeviceTypeForConfig.WASAPI : (int) ESoundDeviceTypeForConfig.ACM; // #24820 2012.12.23 yyagi 初期値はACM | #31927 2013.8.25 yyagi OSにより初期値変更 + (int)ESoundDeviceTypeForConfig.WASAPI : (int)ESoundDeviceTypeForConfig.ACM; // #24820 2012.12.23 yyagi 初期値はACM | #31927 2013.8.25 yyagi OSにより初期値変更 this.nWASAPIBufferSizeMs = 50; // #24820 2013.1.15 yyagi 初期値は50(0で自動設定) this.nASIODevice = 0; // #24820 2013.1.17 yyagi -// this.nASIOBufferSizeMs = 0; // #24820 2012.12.25 yyagi 初期値は0(自動設定) + // this.nASIOBufferSizeMs = 0; // #24820 2012.12.25 yyagi 初期値は0(自動設定) #endregion - this.bUseOSTimer = false;; // #33689 2014.6.6 yyagi 初期値はfalse (FDKのタイマー。FROM氏考案の独自タイマー) + this.bUseOSTimer = false; ; // #33689 2014.6.6 yyagi 初期値はfalse (FDKのタイマー。FROM氏考案の独自タイマー) this.bDynamicBassMixerManagement = true; // this.bTimeStretch = false; // #23664 2013.2.24 yyagi 初期値はfalse (再生速度変更を、ピッチ変更にて行う) this.nChipDisplayTimeMs = 3000; // #32072 2013.10.24 yyagi Semi-Invisibleでの、チップ再表示期間 @@ -1244,45 +1244,45 @@ namespace DTXMania this.nMasterVolume = 100; // #33700 2014.4.26 yyagi マスターボリュームの設定(WASAPI/ASIO用) this.b曲読み込みを高速化する = true; } - public CConfigIni( string iniファイル名 ) + public CConfigIni(string iniファイル名) : this() { - this.tファイルから読み込み( iniファイル名 ); + this.tファイルから読み込み(iniファイル名); } // メソッド - public void t指定した入力が既にアサイン済みである場合はそれを全削除する( E入力デバイス DeviceType, int nID, int nCode ) + public void t指定した入力が既にアサイン済みである場合はそれを全削除する(E入力デバイス DeviceType, int nID, int nCode) { - for( int i = 0; i <= (int)EKeyConfigPart.SYSTEM; i++ ) + for (int i = 0; i <= (int)EKeyConfigPart.SYSTEM; i++) { - for( int j = 0; j <= (int)EKeyConfigPad.Capture; j++ ) + for (int j = 0; j <= (int)EKeyConfigPad.Capture; j++) { - for( int k = 0; k < 0x10; k++ ) + for (int k = 0; k < 0x10; k++) { - if( ( ( this.KeyAssign[ i ][ j ][ k ].入力デバイス == DeviceType ) && ( this.KeyAssign[ i ][ j ][ k ].ID == nID ) ) && ( this.KeyAssign[ i ][ j ][ k ].コード == nCode ) ) + if (((this.KeyAssign[i][j][k].入力デバイス == DeviceType) && (this.KeyAssign[i][j][k].ID == nID)) && (this.KeyAssign[i][j][k].コード == nCode)) { - for( int m = k; m < 15; m++ ) + for (int m = k; m < 15; m++) { - this.KeyAssign[ i ][ j ][ m ] = this.KeyAssign[ i ][ j ][ m + 1 ]; + this.KeyAssign[i][j][m] = this.KeyAssign[i][j][m + 1]; } - this.KeyAssign[ i ][ j ][ 15 ].入力デバイス = E入力デバイス.不明; - this.KeyAssign[ i ][ j ][ 15 ].ID = 0; - this.KeyAssign[ i ][ j ][ 15 ].コード = 0; + this.KeyAssign[i][j][15].入力デバイス = E入力デバイス.不明; + this.KeyAssign[i][j][15].ID = 0; + this.KeyAssign[i][j][15].コード = 0; k--; } } } } } - public void t書き出し( string iniファイル名 ) + public void t書き出し(string iniファイル名) { - StreamWriter sw = new StreamWriter( iniファイル名, false, Encoding.GetEncoding( "utf-16" ) ); - sw.WriteLine( ";-------------------" ); - + StreamWriter sw = new StreamWriter(iniファイル名, false, Encoding.GetEncoding("utf-16")); + sw.WriteLine(";-------------------"); + #region [ System ] - sw.WriteLine( "[System]" ); + sw.WriteLine("[System]"); sw.WriteLine(); #if false // #23625 2011.1.11 Config.iniからダメージ/回復値の定数変更を行う場合はここを有効にする 087リリースに合わせ機能無効化 @@ -1298,49 +1298,49 @@ namespace DTXMania //------------------------------ #endif #region [ Version ] - sw.WriteLine( "; リリースバージョン" ); - sw.WriteLine( "; Release Version." ); - sw.WriteLine( "Version={0}", CDTXMania.VERSION ); + sw.WriteLine("; リリースバージョン"); + sw.WriteLine("; Release Version."); + sw.WriteLine("Version={0}", CDTXMania.VERSION); sw.WriteLine(); #endregion #region [ DTXPath ] - sw.WriteLine( "; 演奏データの格納されているフォルダへのパス。" ); - sw.WriteLine( @"; セミコロン(;)で区切ることにより複数のパスを指定できます。(例: d:\DTXFiles1\;e:\DTXFiles2\)" ); - sw.WriteLine( "; Pathes for DTX data." ); - sw.WriteLine( @"; You can specify many pathes separated with semicolon(;). (e.g. d:\DTXFiles1\;e:\DTXFiles2\)" ); - sw.WriteLine( "DTXPath={0}", this.str曲データ検索パス ); + sw.WriteLine("; 演奏データの格納されているフォルダへのパス。"); + sw.WriteLine(@"; セミコロン(;)で区切ることにより複数のパスを指定できます。(例: d:\DTXFiles1\;e:\DTXFiles2\)"); + sw.WriteLine("; Pathes for DTX data."); + sw.WriteLine(@"; You can specify many pathes separated with semicolon(;). (e.g. d:\DTXFiles1\;e:\DTXFiles2\)"); + sw.WriteLine("DTXPath={0}", this.str曲データ検索パス); sw.WriteLine(); #endregion #region [ スキン関連 ] #region [ Skinパスの絶対パス→相対パス変換 ] - Uri uriRoot = new Uri( System.IO.Path.Combine( CDTXMania.app.strEXEのあるフォルダ, "System" + System.IO.Path.DirectorySeparatorChar ) ); - if ( strSystemSkinSubfolderFullName != null && strSystemSkinSubfolderFullName.Length == 0 ) + Uri uriRoot = new Uri(System.IO.Path.Combine(CDTXMania.app.strEXEのあるフォルダ, "System" + System.IO.Path.DirectorySeparatorChar)); + if (strSystemSkinSubfolderFullName != null && strSystemSkinSubfolderFullName.Length == 0) { // Config.iniが空の状態でDTXManiaをViewerとして起動・終了すると、strSystemSkinSubfolderFullName が空の状態でここに来る。 // → 初期値として Default/ を設定する。 - strSystemSkinSubfolderFullName = System.IO.Path.Combine( CDTXMania.app.strEXEのあるフォルダ, "System" + System.IO.Path.DirectorySeparatorChar + "Default" + System.IO.Path.DirectorySeparatorChar ); + strSystemSkinSubfolderFullName = System.IO.Path.Combine(CDTXMania.app.strEXEのあるフォルダ, "System" + System.IO.Path.DirectorySeparatorChar + "Default" + System.IO.Path.DirectorySeparatorChar); } - Uri uriPath = new Uri( System.IO.Path.Combine( this.strSystemSkinSubfolderFullName, "." + System.IO.Path.DirectorySeparatorChar ) ); - string relPath = uriRoot.MakeRelativeUri( uriPath ).ToString(); // 相対パスを取得 - relPath = System.Web.HttpUtility.UrlDecode( relPath ); // デコードする - relPath = relPath.Replace( '/', System.IO.Path.DirectorySeparatorChar ); // 区切り文字が\ではなく/なので置換する + Uri uriPath = new Uri(System.IO.Path.Combine(this.strSystemSkinSubfolderFullName, "." + System.IO.Path.DirectorySeparatorChar)); + string relPath = uriRoot.MakeRelativeUri(uriPath).ToString(); // 相対パスを取得 + relPath = System.Web.HttpUtility.UrlDecode(relPath); // デコードする + relPath = relPath.Replace('/', System.IO.Path.DirectorySeparatorChar); // 区切り文字が\ではなく/なので置換する #endregion - sw.WriteLine( "; 使用するSkinのフォルダ名。" ); - sw.WriteLine( "; 例えば System\\Default\\Graphics\\... などの場合は、SkinPath=.\\Default\\ を指定します。" ); - sw.WriteLine( "; Skin folder path." ); - sw.WriteLine( "; e.g. System\\Default\\Graphics\\... -> Set SkinPath=.\\Default\\" ); - sw.WriteLine( "SkinPath={0}", relPath ); + sw.WriteLine("; 使用するSkinのフォルダ名。"); + sw.WriteLine("; 例えば System\\Default\\Graphics\\... などの場合は、SkinPath=.\\Default\\ を指定します。"); + sw.WriteLine("; Skin folder path."); + sw.WriteLine("; e.g. System\\Default\\Graphics\\... -> Set SkinPath=.\\Default\\"); + sw.WriteLine("SkinPath={0}", relPath); sw.WriteLine(); - sw.WriteLine( "; box.defが指定するSkinに自動で切り替えるかどうか (0=切り替えない、1=切り替える)" ); - sw.WriteLine( "; Automatically change skin specified in box.def. (0=No 1=Yes)" ); - sw.WriteLine( "SkinChangeByBoxDef={0}", this.bUseBoxDefSkin? 1 : 0 ); + sw.WriteLine("; box.defが指定するSkinに自動で切り替えるかどうか (0=切り替えない、1=切り替える)"); + sw.WriteLine("; Automatically change skin specified in box.def. (0=No 1=Yes)"); + sw.WriteLine("SkinChangeByBoxDef={0}", this.bUseBoxDefSkin ? 1 : 0); sw.WriteLine(); #endregion #region [ Window関連 ] - sw.WriteLine( "; 画面モード(0:ウィンドウ, 1:全画面)" ); - sw.WriteLine( "; Screen mode. (0:Window, 1:Fullscreen)" ); - sw.WriteLine( "FullScreen={0}", this.b全画面モード ? 1 : 0 ); - sw.WriteLine(); + sw.WriteLine("; 画面モード(0:ウィンドウ, 1:全画面)"); + sw.WriteLine("; Screen mode. (0:Window, 1:Fullscreen)"); + sw.WriteLine("FullScreen={0}", this.b全画面モード ? 1 : 0); + sw.WriteLine(); sw.WriteLine("; ウインドウモード時の画面幅"); // #23510 2010.10.31 yyagi add sw.WriteLine("; A width size in the window mode."); // sw.WriteLine("WindowWidth={0}", this.nウインドウwidth); // @@ -1349,64 +1349,64 @@ namespace DTXMania sw.WriteLine("; A height size in the window mode."); // sw.WriteLine("WindowHeight={0}", this.nウインドウheight); // sw.WriteLine(); // - sw.WriteLine( "; ウィンドウモード時の位置X" ); // #30675 2013.02.04 ikanick add - sw.WriteLine( "; X position in the window mode." ); // - sw.WriteLine( "WindowX={0}", this.n初期ウィンドウ開始位置X ); // + sw.WriteLine("; ウィンドウモード時の位置X"); // #30675 2013.02.04 ikanick add + sw.WriteLine("; X position in the window mode."); // + sw.WriteLine("WindowX={0}", this.n初期ウィンドウ開始位置X); // sw.WriteLine(); // - sw.WriteLine( "; ウィンドウモード時の位置Y" ); // - sw.WriteLine( "; Y position in the window mode." ); // - sw.WriteLine( "WindowY={0}", this.n初期ウィンドウ開始位置Y ); // + sw.WriteLine("; ウィンドウモード時の位置Y"); // + sw.WriteLine("; Y position in the window mode."); // + sw.WriteLine("WindowY={0}", this.n初期ウィンドウ開始位置Y); // sw.WriteLine(); // - sw.WriteLine( "; ウインドウをダブルクリックした時にフルスクリーンに移行するか(0:移行しない,1:移行する)" ); // #26752 2011.11.27 yyagi - sw.WriteLine( "; Whether double click to go full screen mode or not.(0:No, 1:Yes)" ); // - sw.WriteLine( "DoubleClickFullScreen={0}", this.bIsAllowedDoubleClickFullscreen? 1 : 0); // + sw.WriteLine("; ウインドウをダブルクリックした時にフルスクリーンに移行するか(0:移行しない,1:移行する)"); // #26752 2011.11.27 yyagi + sw.WriteLine("; Whether double click to go full screen mode or not.(0:No, 1:Yes)"); // + sw.WriteLine("DoubleClickFullScreen={0}", this.bIsAllowedDoubleClickFullscreen ? 1 : 0); // sw.WriteLine(); // - sw.WriteLine( "; ALT+SPACEのメニュー表示を抑制するかどうか(0:抑制する 1:抑制しない)" ); // #28200 2012.5.1 yyagi - sw.WriteLine( "; Whether ALT+SPACE menu would be masked or not.(0=masked 1=not masked)" ); // - sw.WriteLine( "EnableSystemMenu={0}", this.bIsEnabledSystemMenu? 1 : 0 ); // + sw.WriteLine("; ALT+SPACEのメニュー表示を抑制するかどうか(0:抑制する 1:抑制しない)"); // #28200 2012.5.1 yyagi + sw.WriteLine("; Whether ALT+SPACE menu would be masked or not.(0=masked 1=not masked)"); // + sw.WriteLine("EnableSystemMenu={0}", this.bIsEnabledSystemMenu ? 1 : 0); // sw.WriteLine(); // - sw.WriteLine( "; 非フォーカス時のsleep値[ms]" ); // #23568 2011.11.04 ikanick add - sw.WriteLine( "; A sleep time[ms] while the window is inactive." ); // - sw.WriteLine( "BackSleep={0}", this.n非フォーカス時スリープms ); // そのまま引用(苦笑) + sw.WriteLine("; 非フォーカス時のsleep値[ms]"); // #23568 2011.11.04 ikanick add + sw.WriteLine("; A sleep time[ms] while the window is inactive."); // + sw.WriteLine("BackSleep={0}", this.n非フォーカス時スリープms); // そのまま引用(苦笑) sw.WriteLine(); // #endregion #region [ フレーム処理関連(VSync, フレーム毎のsleep) ] sw.WriteLine("; 垂直帰線同期(0:OFF,1:ON)"); - sw.WriteLine( "VSyncWait={0}", this.b垂直帰線待ちを行う ? 1 : 0 ); - sw.WriteLine(); - sw.WriteLine( "; フレーム毎のsleep値[ms] (-1でスリープ無し, 0以上で毎フレームスリープ。動画キャプチャ等で活用下さい)" ); // #xxxxx 2011.11.27 yyagi add - sw.WriteLine( "; A sleep time[ms] per frame." ); // - sw.WriteLine( "SleepTimePerFrame={0}", this.nフレーム毎スリープms ); // + sw.WriteLine("VSyncWait={0}", this.b垂直帰線待ちを行う ? 1 : 0); + sw.WriteLine(); + sw.WriteLine("; フレーム毎のsleep値[ms] (-1でスリープ無し, 0以上で毎フレームスリープ。動画キャプチャ等で活用下さい)"); // #xxxxx 2011.11.27 yyagi add + sw.WriteLine("; A sleep time[ms] per frame."); // + sw.WriteLine("SleepTimePerFrame={0}", this.nフレーム毎スリープms); // sw.WriteLine(); // #endregion #region [ WASAPI/ASIO関連 ] - sw.WriteLine( "; サウンド出力方式(0=ACM(って今はまだDirectSoundですが), 1=ASIO, 2=WASAPI)" ); - sw.WriteLine( "; WASAPIはVista以降のOSで使用可能。推奨方式はWASAPI。" ); - sw.WriteLine( "; なお、WASAPIが使用不可ならASIOを、ASIOが使用不可ならACMを使用します。" ); - sw.WriteLine( "; Sound device type(0=ACM, 1=ASIO, 2=WASAPI)" ); - sw.WriteLine( "; WASAPI can use on Vista or later OSs." ); - sw.WriteLine( "; If WASAPI is not available, DTXMania try to use ASIO. If ASIO can't be used, ACM is used." ); - sw.WriteLine( "SoundDeviceType={0}", (int) this.nSoundDeviceType ); - sw.WriteLine(); - - sw.WriteLine( "; WASAPI使用時のサウンドバッファサイズ" ); - sw.WriteLine( "; (0=デバイスに設定可能な最小値を自動設定, 1~9999=バッファサイズ(単位:ms)の手動指定" ); - sw.WriteLine( "; WASAPI Sound Buffer Size." ); - sw.WriteLine( "; (0=set minimum buffer size automaticcaly, 1-9999=specify the buffer size(ms) by yourself)" ); - sw.WriteLine( "WASAPIBufferSizeMs={0}", (int) this.nWASAPIBufferSizeMs ); - sw.WriteLine(); - - sw.WriteLine( "; ASIO使用時のサウンドデバイス" ); - sw.WriteLine( "; 存在しないデバイスを指定すると、DTXManiaが起動しないことがあります。" ); - sw.WriteLine( "; Sound device used by ASIO." ); - sw.WriteLine( "; Don't specify unconnected device, as the DTXMania may not bootup." ); + sw.WriteLine("; サウンド出力方式(0=ACM(って今はまだDirectSoundですが), 1=ASIO, 2=WASAPI)"); + sw.WriteLine("; WASAPIはVista以降のOSで使用可能。推奨方式はWASAPI。"); + sw.WriteLine("; なお、WASAPIが使用不可ならASIOを、ASIOが使用不可ならACMを使用します。"); + sw.WriteLine("; Sound device type(0=ACM, 1=ASIO, 2=WASAPI)"); + sw.WriteLine("; WASAPI can use on Vista or later OSs."); + sw.WriteLine("; If WASAPI is not available, DTXMania try to use ASIO. If ASIO can't be used, ACM is used."); + sw.WriteLine("SoundDeviceType={0}", (int)this.nSoundDeviceType); + sw.WriteLine(); + + sw.WriteLine("; WASAPI使用時のサウンドバッファサイズ"); + sw.WriteLine("; (0=デバイスに設定可能な最小値を自動設定, 1~9999=バッファサイズ(単位:ms)の手動指定"); + sw.WriteLine("; WASAPI Sound Buffer Size."); + sw.WriteLine("; (0=set minimum buffer size automaticcaly, 1-9999=specify the buffer size(ms) by yourself)"); + sw.WriteLine("WASAPIBufferSizeMs={0}", (int)this.nWASAPIBufferSizeMs); + sw.WriteLine(); + + sw.WriteLine("; ASIO使用時のサウンドデバイス"); + sw.WriteLine("; 存在しないデバイスを指定すると、DTXManiaが起動しないことがあります。"); + sw.WriteLine("; Sound device used by ASIO."); + sw.WriteLine("; Don't specify unconnected device, as the DTXMania may not bootup."); string[] asiodev = CEnumerateAllAsioDevices.GetAllASIODevices(); - for ( int i = 0; i < asiodev.Length; i++ ) + for (int i = 0; i < asiodev.Length; i++) { - sw.WriteLine( "; {0}: {1}", i, asiodev[ i ] ); + sw.WriteLine("; {0}: {1}", i, asiodev[i]); } - sw.WriteLine( "ASIODevice={0}", (int) this.nASIODevice ); + sw.WriteLine("ASIODevice={0}", (int)this.nASIODevice); sw.WriteLine(); //sw.WriteLine( "; ASIO使用時のサウンドバッファサイズ" ); @@ -1422,209 +1422,209 @@ namespace DTXMania //sw.WriteLine( "DynamicBassMixerManagement={0}", this.bDynamicBassMixerManagement ? 1 : 0 ); //sw.WriteLine(); - sw.WriteLine( "; WASAPI/ASIO時に使用する演奏タイマーの種類" ); - sw.WriteLine( "; Playback timer used for WASAPI/ASIO" ); - sw.WriteLine( "; (0=FDK Timer, 1=System Timer)" ); - sw.WriteLine( "SoundTimerType={0}", this.bUseOSTimer ? 1 : 0 ); + sw.WriteLine("; WASAPI/ASIO時に使用する演奏タイマーの種類"); + sw.WriteLine("; Playback timer used for WASAPI/ASIO"); + sw.WriteLine("; (0=FDK Timer, 1=System Timer)"); + sw.WriteLine("SoundTimerType={0}", this.bUseOSTimer ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; 全体ボリュームの設定" ); - sw.WriteLine( "; (0=無音 ~ 100=最大。WASAPI/ASIO時のみ有効)" ); - sw.WriteLine( "; Master volume settings" ); - sw.WriteLine( "; (0=Silent - 100=Max)" ); - sw.WriteLine( "MasterVolume={0}", this.nMasterVolume ); + sw.WriteLine("; 全体ボリュームの設定"); + sw.WriteLine("; (0=無音 ~ 100=最大。WASAPI/ASIO時のみ有効)"); + sw.WriteLine("; Master volume settings"); + sw.WriteLine("; (0=Silent - 100=Max)"); + sw.WriteLine("MasterVolume={0}", this.nMasterVolume); sw.WriteLine(); #endregion #region [ ギター/ベース/ドラム 有効/無効 ] - sw.WriteLine( "; ギター/ベース有効(0:OFF,1:ON)" ); - sw.WriteLine( "; Enable Guitar/Bass or not.(0:OFF,1:ON)" ); - sw.WriteLine( "Guitar={0}", this.bGuitar有効 ? 1 : 0 ); + sw.WriteLine("; ギター/ベース有効(0:OFF,1:ON)"); + sw.WriteLine("; Enable Guitar/Bass or not.(0:OFF,1:ON)"); + sw.WriteLine("Guitar={0}", this.bGuitar有効 ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; ドラム有効(0:OFF,1:ON)" ); - sw.WriteLine( "; Enable Drums or not.(0:OFF,1:ON)" ); - sw.WriteLine( "Drums={0}", this.bDrums有効 ? 1 : 0 ); + sw.WriteLine("; ドラム有効(0:OFF,1:ON)"); + sw.WriteLine("; Enable Drums or not.(0:OFF,1:ON)"); + sw.WriteLine("Drums={0}", this.bDrums有効 ? 1 : 0); sw.WriteLine(); #endregion - sw.WriteLine( "; 背景画像の半透明割合(0:不透明~255:透明)" ); - sw.WriteLine( "; Transparency for background image in playing screen.(0:no tranaparent - 255:transparent)" ); - sw.WriteLine( "BGAlpha={0}", this.nBGAlpha ); + sw.WriteLine("; 背景画像の半透明割合(0:不透明~255:透明)"); + sw.WriteLine("; Transparency for background image in playing screen.(0:no tranaparent - 255:transparent)"); + sw.WriteLine("BGAlpha={0}", this.nBGAlpha); sw.WriteLine(); - sw.WriteLine( "; Missヒット時のゲージ減少割合(0:少, 1:普通, 2:大)" ); - sw.WriteLine( "DamageLevel={0}", (int) this.eダメージレベル ); + sw.WriteLine("; Missヒット時のゲージ減少割合(0:少, 1:普通, 2:大)"); + sw.WriteLine("DamageLevel={0}", (int)this.eダメージレベル); sw.WriteLine(); - sw.WriteLine( "; ゲージゼロでSTAGE FAILED (0:OFF, 1:ON)" ); - sw.WriteLine( "StageFailed={0}", this.bSTAGEFAILED有効 ? 1 : 0 ); + sw.WriteLine("; ゲージゼロでSTAGE FAILED (0:OFF, 1:ON)"); + sw.WriteLine("StageFailed={0}", this.bSTAGEFAILED有効 ? 1 : 0); sw.WriteLine(); #region [ 打ち分け関連 ] - sw.WriteLine( "; LC/HHC/HHO 打ち分けモード (0:LC|HHC|HHO, 1:LC&(HHC|HHO), 2:LC|(HHC&HHO), 3:LC&HHC&HHO)" ); - sw.WriteLine( "; LC/HHC/HHO Grouping (0:LC|HHC|HHO, 1:LC&(HHC|HHO), 2:LC|(HHC&HHO), 3:LC&HHC&HHO)" ); - sw.WriteLine( "HHGroup={0}", (int) this.eHHGroup ); + sw.WriteLine("; LC/HHC/HHO 打ち分けモード (0:LC|HHC|HHO, 1:LC&(HHC|HHO), 2:LC|(HHC&HHO), 3:LC&HHC&HHO)"); + sw.WriteLine("; LC/HHC/HHO Grouping (0:LC|HHC|HHO, 1:LC&(HHC|HHO), 2:LC|(HHC&HHO), 3:LC&HHC&HHO)"); + sw.WriteLine("HHGroup={0}", (int)this.eHHGroup); sw.WriteLine(); - sw.WriteLine( "; LT/FT 打ち分けモード (0:LT|FT, 1:LT&FT)" ); - sw.WriteLine( "; LT/FT Grouping (0:LT|FT, 1:LT&FT)" ); - sw.WriteLine( "FTGroup={0}", (int) this.eFTGroup ); + sw.WriteLine("; LT/FT 打ち分けモード (0:LT|FT, 1:LT&FT)"); + sw.WriteLine("; LT/FT Grouping (0:LT|FT, 1:LT&FT)"); + sw.WriteLine("FTGroup={0}", (int)this.eFTGroup); sw.WriteLine(); - sw.WriteLine( "; CY/RD 打ち分けモード (0:CY|RD, 1:CY&RD)" ); - sw.WriteLine( "; CY/RD Grouping (0:CY|RD, 1:CY&RD)" ); - sw.WriteLine( "CYGroup={0}", (int) this.eCYGroup ); + sw.WriteLine("; CY/RD 打ち分けモード (0:CY|RD, 1:CY&RD)"); + sw.WriteLine("; CY/RD Grouping (0:CY|RD, 1:CY&RD)"); + sw.WriteLine("CYGroup={0}", (int)this.eCYGroup); sw.WriteLine(); - sw.WriteLine( "; HP/BD 打ち分けモード (0:HP|BD, 1:HP&BD)" ); // #27029 2012.1.4 from - sw.WriteLine( "; HP/BD Grouping (0:HP|BD, 1:HP&BD)" ); // - sw.WriteLine( "BDGroup={0}", (int) this.eBDGroup ); // + sw.WriteLine("; HP/BD 打ち分けモード (0:HP|BD, 1:HP&BD)"); // #27029 2012.1.4 from + sw.WriteLine("; HP/BD Grouping (0:HP|BD, 1:HP&BD)"); // + sw.WriteLine("BDGroup={0}", (int)this.eBDGroup); // sw.WriteLine(); // - sw.WriteLine( "; 打ち分け時の再生音の優先順位(HHGroup)(0:Chip>Pad, 1:Pad>Chip)" ); - sw.WriteLine( "; Grouping sound priority(HHGroup)(0:Chip>Pad, 1:Pad>Chip)" ); - sw.WriteLine( "HitSoundPriorityHH={0}", (int) this.eHitSoundPriorityHH ); + sw.WriteLine("; 打ち分け時の再生音の優先順位(HHGroup)(0:Chip>Pad, 1:Pad>Chip)"); + sw.WriteLine("; Grouping sound priority(HHGroup)(0:Chip>Pad, 1:Pad>Chip)"); + sw.WriteLine("HitSoundPriorityHH={0}", (int)this.eHitSoundPriorityHH); sw.WriteLine(); - sw.WriteLine( "; 打ち分け時の再生音の優先順位(FTGroup)(0:Chip>Pad, 1:Pad>Chip)" ); - sw.WriteLine( "; Grouping sound priority(FTGroup)(0:Chip>Pad, 1:Pad>Chip)" ); - sw.WriteLine( "HitSoundPriorityFT={0}", (int) this.eHitSoundPriorityFT ); + sw.WriteLine("; 打ち分け時の再生音の優先順位(FTGroup)(0:Chip>Pad, 1:Pad>Chip)"); + sw.WriteLine("; Grouping sound priority(FTGroup)(0:Chip>Pad, 1:Pad>Chip)"); + sw.WriteLine("HitSoundPriorityFT={0}", (int)this.eHitSoundPriorityFT); sw.WriteLine(); - sw.WriteLine( "; 打ち分け時の再生音の優先順位(CYGroup)(0:Chip>Pad, 1:Pad>Chip)" ); - sw.WriteLine( "; Grouping sound priority(CYGroup)(0:Chip>Pad, 1:Pad>Chip)" ); - sw.WriteLine( "HitSoundPriorityCY={0}", (int) this.eHitSoundPriorityCY ); + sw.WriteLine("; 打ち分け時の再生音の優先順位(CYGroup)(0:Chip>Pad, 1:Pad>Chip)"); + sw.WriteLine("; Grouping sound priority(CYGroup)(0:Chip>Pad, 1:Pad>Chip)"); + sw.WriteLine("HitSoundPriorityCY={0}", (int)this.eHitSoundPriorityCY); sw.WriteLine(); - sw.WriteLine( "; シンバルフリーモード(0:OFF, 1:ON)" ); - sw.WriteLine( "; Grouping CY and LC (0:OFF, 1:ON)" ); - sw.WriteLine( "CymbalFree={0}", this.bシンバルフリー ? 1 : 0 ); + sw.WriteLine("; シンバルフリーモード(0:OFF, 1:ON)"); + sw.WriteLine("; Grouping CY and LC (0:OFF, 1:ON)"); + sw.WriteLine("CymbalFree={0}", this.bシンバルフリー ? 1 : 0); sw.WriteLine(); #endregion #region [ AVI/BGA ] - sw.WriteLine( "; AVIの表示(0:OFF, 1:ON)" ); - sw.WriteLine( "AVI={0}", this.bAVI有効 ? 1 : 0 ); + sw.WriteLine("; AVIの表示(0:OFF, 1:ON)"); + sw.WriteLine("AVI={0}", this.bAVI有効 ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; 旧サイズのAVI表示を強制的に全画面化する(0:OFF, 1:ON)" ); - sw.WriteLine( "; Forcely show BGA-sized movie as Fullscreen." ); - sw.WriteLine( "ForceAVIFullscreen={0}", this.bForceAVIFullscreen ? 1 : 0 ); + sw.WriteLine("; 旧サイズのAVI表示を強制的に全画面化する(0:OFF, 1:ON)"); + sw.WriteLine("; Forcely show BGA-sized movie as Fullscreen."); + sw.WriteLine("ForceAVIFullscreen={0}", this.bForceAVIFullscreen ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; BGAの表示(0:OFF, 1:ON)" ); - sw.WriteLine( "BGA={0}", this.bBGA有効 ? 1 : 0 ); + sw.WriteLine("; BGAの表示(0:OFF, 1:ON)"); + sw.WriteLine("BGA={0}", this.bBGA有効 ? 1 : 0); sw.WriteLine(); #endregion #region [ フィルイン ] - sw.WriteLine( "; フィルイン効果(0:OFF, 1:ON)" ); - sw.WriteLine( "FillInEffect={0}", this.bフィルイン有効 ? 1 : 0 ); + sw.WriteLine("; フィルイン効果(0:OFF, 1:ON)"); + sw.WriteLine("FillInEffect={0}", this.bフィルイン有効 ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; フィルイン達成時の歓声の再生(0:OFF, 1:ON)" ); - sw.WriteLine( "AudienceSound={0}", this.b歓声を発声する ? 1 : 0 ); + sw.WriteLine("; フィルイン達成時の歓声の再生(0:OFF, 1:ON)"); + sw.WriteLine("AudienceSound={0}", this.b歓声を発声する ? 1 : 0); sw.WriteLine(); #endregion #region [ プレビュー音 ] - sw.WriteLine( "; 曲選択からプレビュー音の再生までのウェイト[ms]" ); - sw.WriteLine( "PreviewSoundWait={0}", this.n曲が選択されてからプレビュー音が鳴るまでのウェイトms ); + sw.WriteLine("; 曲選択からプレビュー音の再生までのウェイト[ms]"); + sw.WriteLine("PreviewSoundWait={0}", this.n曲が選択されてからプレビュー音が鳴るまでのウェイトms); sw.WriteLine(); - sw.WriteLine( "; 曲選択からプレビュー画像表示までのウェイト[ms]" ); - sw.WriteLine( "PreviewImageWait={0}", this.n曲が選択されてからプレビュー画像が表示開始されるまでのウェイトms ); + sw.WriteLine("; 曲選択からプレビュー画像表示までのウェイト[ms]"); + sw.WriteLine("PreviewImageWait={0}", this.n曲が選択されてからプレビュー画像が表示開始されるまでのウェイトms); sw.WriteLine(); #endregion - sw.WriteLine( "; Waveの再生位置自動補正(0:OFF, 1:ON)" ); - sw.WriteLine( "AdjustWaves={0}", this.bWave再生位置自動調整機能有効 ? 1 : 0 ); + sw.WriteLine("; Waveの再生位置自動補正(0:OFF, 1:ON)"); + sw.WriteLine("AdjustWaves={0}", this.bWave再生位置自動調整機能有効 ? 1 : 0); sw.WriteLine(); #region [ BGM/ドラムヒット音の再生 ] - sw.WriteLine( "; BGM の再生(0:OFF, 1:ON)" ); - sw.WriteLine( "BGMSound={0}", this.bBGM音を発声する ? 1 : 0 ); + sw.WriteLine("; BGM の再生(0:OFF, 1:ON)"); + sw.WriteLine("BGMSound={0}", this.bBGM音を発声する ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; ドラム打音の再生(0:OFF, 1:ON)" ); - sw.WriteLine( "HitSound={0}", this.bドラム打音を発声する ? 1 : 0 ); + sw.WriteLine("; ドラム打音の再生(0:OFF, 1:ON)"); + sw.WriteLine("HitSound={0}", this.bドラム打音を発声する ? 1 : 0); sw.WriteLine(); #endregion - sw.WriteLine( "; 演奏記録(~.score.ini)の出力 (0:OFF, 1:ON)" ); - sw.WriteLine( "SaveScoreIni={0}", this.bScoreIniを出力する ? 1 : 0 ); + sw.WriteLine("; 演奏記録(~.score.ini)の出力 (0:OFF, 1:ON)"); + sw.WriteLine("SaveScoreIni={0}", this.bScoreIniを出力する ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; RANDOM SELECT で子BOXを検索対象に含める (0:OFF, 1:ON)" ); - sw.WriteLine( "RandomFromSubBox={0}", this.bランダムセレクトで子BOXを検索対象とする ? 1 : 0 ); + sw.WriteLine("; RANDOM SELECT で子BOXを検索対象に含める (0:OFF, 1:ON)"); + sw.WriteLine("RandomFromSubBox={0}", this.bランダムセレクトで子BOXを検索対象とする ? 1 : 0); sw.WriteLine(); #region [ モニターサウンド(ヒット音の再生音量アップ) ] - sw.WriteLine( "; ドラム演奏時にドラム音を強調する (0:OFF, 1:ON)" ); - sw.WriteLine( "SoundMonitorDrums={0}", this.b演奏音を強調する.Drums ? 1 : 0 ); + sw.WriteLine("; ドラム演奏時にドラム音を強調する (0:OFF, 1:ON)"); + sw.WriteLine("SoundMonitorDrums={0}", this.b演奏音を強調する.Drums ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; ギター演奏時にギター音を強調する (0:OFF, 1:ON)" ); - sw.WriteLine( "SoundMonitorGuitar={0}", this.b演奏音を強調する.Guitar ? 1 : 0 ); + sw.WriteLine("; ギター演奏時にギター音を強調する (0:OFF, 1:ON)"); + sw.WriteLine("SoundMonitorGuitar={0}", this.b演奏音を強調する.Guitar ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; ベース演奏時にベース音を強調する (0:OFF, 1:ON)" ); - sw.WriteLine( "SoundMonitorBass={0}", this.b演奏音を強調する.Bass ? 1 : 0 ); + sw.WriteLine("; ベース演奏時にベース音を強調する (0:OFF, 1:ON)"); + sw.WriteLine("SoundMonitorBass={0}", this.b演奏音を強調する.Bass ? 1 : 0); sw.WriteLine(); #endregion #region [ コンボ表示数 ] - sw.WriteLine( "; ドラムの表示可能な最小コンボ数(1~99999)" ); - sw.WriteLine( "MinComboDrums={0}", this.n表示可能な最小コンボ数.Drums ); + sw.WriteLine("; ドラムの表示可能な最小コンボ数(1~99999)"); + sw.WriteLine("MinComboDrums={0}", this.n表示可能な最小コンボ数.Drums); sw.WriteLine(); - sw.WriteLine( "; ギターの表示可能な最小コンボ数(1~99999)" ); - sw.WriteLine( "MinComboGuitar={0}", this.n表示可能な最小コンボ数.Guitar ); + sw.WriteLine("; ギターの表示可能な最小コンボ数(1~99999)"); + sw.WriteLine("MinComboGuitar={0}", this.n表示可能な最小コンボ数.Guitar); sw.WriteLine(); - sw.WriteLine( "; ベースの表示可能な最小コンボ数(1~99999)" ); - sw.WriteLine( "MinComboBass={0}", this.n表示可能な最小コンボ数.Bass ); + sw.WriteLine("; ベースの表示可能な最小コンボ数(1~99999)"); + sw.WriteLine("MinComboBass={0}", this.n表示可能な最小コンボ数.Bass); sw.WriteLine(); #endregion - sw.WriteLine( "; 演奏情報を表示する (0:OFF, 1:ON)" ); - sw.WriteLine( "; Showing playing info on the playing screen. (0:OFF, 1:ON)" ); - sw.WriteLine( "ShowDebugStatus={0}", this.b演奏情報を表示する ? 1 : 0 ); + sw.WriteLine("; 演奏情報を表示する (0:OFF, 1:ON)"); + sw.WriteLine("; Showing playing info on the playing screen. (0:OFF, 1:ON)"); + sw.WriteLine("ShowDebugStatus={0}", this.b演奏情報を表示する ? 1 : 0); sw.WriteLine(); #region [ 選曲リストのフォント ] - sw.WriteLine( "; 選曲リストのフォント名" ); - sw.WriteLine( "; Font name for select song item." ); - sw.WriteLine( "SelectListFontName={0}", this.str選曲リストフォント ); + sw.WriteLine("; 選曲リストのフォント名"); + sw.WriteLine("; Font name for select song item."); + sw.WriteLine("SelectListFontName={0}", this.str選曲リストフォント); sw.WriteLine(); - sw.WriteLine( "; 選曲リストのフォントのサイズ[dot]" ); - sw.WriteLine( "; Font size[dot] for select song item." ); - sw.WriteLine( "SelectListFontSize={0}", this.n選曲リストフォントのサイズdot ); + sw.WriteLine("; 選曲リストのフォントのサイズ[dot]"); + sw.WriteLine("; Font size[dot] for select song item."); + sw.WriteLine("SelectListFontSize={0}", this.n選曲リストフォントのサイズdot); sw.WriteLine(); - sw.WriteLine( "; 選曲リストのフォントを斜体にする (0:OFF, 1:ON)" ); - sw.WriteLine( "; Using italic font style select song list. (0:OFF, 1:ON)" ); - sw.WriteLine( "SelectListFontItalic={0}", this.b選曲リストフォントを斜体にする ? 1 : 0 ); + sw.WriteLine("; 選曲リストのフォントを斜体にする (0:OFF, 1:ON)"); + sw.WriteLine("; Using italic font style select song list. (0:OFF, 1:ON)"); + sw.WriteLine("SelectListFontItalic={0}", this.b選曲リストフォントを斜体にする ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; 選曲リストのフォントを太字にする (0:OFF, 1:ON)" ); - sw.WriteLine( "; Using bold font style select song list. (0:OFF, 1:ON)" ); - sw.WriteLine( "SelectListFontBold={0}", this.b選曲リストフォントを太字にする ? 1 : 0 ); + sw.WriteLine("; 選曲リストのフォントを太字にする (0:OFF, 1:ON)"); + sw.WriteLine("; Using bold font style select song list. (0:OFF, 1:ON)"); + sw.WriteLine("SelectListFontBold={0}", this.b選曲リストフォントを太字にする ? 1 : 0); sw.WriteLine(); #endregion - sw.WriteLine( "; 打音の音量(0~100%)" ); - sw.WriteLine( "; Sound volume (you're playing) (0-100%)" ); - sw.WriteLine( "ChipVolume={0}", this.n手動再生音量 ); + sw.WriteLine("; 打音の音量(0~100%)"); + sw.WriteLine("; Sound volume (you're playing) (0-100%)"); + sw.WriteLine("ChipVolume={0}", this.n手動再生音量); sw.WriteLine(); - sw.WriteLine( "; 自動再生音の音量(0~100%)" ); - sw.WriteLine( "; Sound volume (auto playing) (0-100%)" ); - sw.WriteLine( "AutoChipVolume={0}", this.n自動再生音量 ); + sw.WriteLine("; 自動再生音の音量(0~100%)"); + sw.WriteLine("; Sound volume (auto playing) (0-100%)"); + sw.WriteLine("AutoChipVolume={0}", this.n自動再生音量); sw.WriteLine(); - sw.WriteLine( "; ストイックモード(0:OFF, 1:ON)" ); - sw.WriteLine( "; Stoic mode. (0:OFF, 1:ON)" ); - sw.WriteLine( "StoicMode={0}", this.bストイックモード ? 1 : 0 ); + sw.WriteLine("; ストイックモード(0:OFF, 1:ON)"); + sw.WriteLine("; Stoic mode. (0:OFF, 1:ON)"); + sw.WriteLine("StoicMode={0}", this.bストイックモード ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; バッファ入力モード(0:OFF, 1:ON)" ); - sw.WriteLine( "; Using Buffered input (0:OFF, 1:ON)" ); - sw.WriteLine( "BufferedInput={0}", this.bバッファ入力を行う ? 1 : 0 ); + sw.WriteLine("; バッファ入力モード(0:OFF, 1:ON)"); + sw.WriteLine("; Using Buffered input (0:OFF, 1:ON)"); + sw.WriteLine("BufferedInput={0}", this.bバッファ入力を行う ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; レーン毎の最大同時発音数(1~8)" ); - sw.WriteLine( "; Number of polyphonic sounds per lane. (1-8)" ); - sw.WriteLine( "PolyphonicSounds={0}", this.nPoliphonicSounds ); + sw.WriteLine("; レーン毎の最大同時発音数(1~8)"); + sw.WriteLine("; Number of polyphonic sounds per lane. (1-8)"); + sw.WriteLine("PolyphonicSounds={0}", this.nPoliphonicSounds); sw.WriteLine(); - sw.WriteLine( "; 判定ズレ時間表示(0:OFF, 1:ON, 2=GREAT-POOR)" ); // #25370 2011.6.3 yyagi - sw.WriteLine( "; Whether displaying the lag times from the just timing or not." ); // - sw.WriteLine( "ShowLagTime={0}", this.nShowLagType ); // + sw.WriteLine("; 判定ズレ時間表示(0:OFF, 1:ON, 2=GREAT-POOR)"); // #25370 2011.6.3 yyagi + sw.WriteLine("; Whether displaying the lag times from the just timing or not."); // + sw.WriteLine("ShowLagTime={0}", this.nShowLagType); // sw.WriteLine(); - sw.WriteLine( "; 判定・コンボ表示優先度(0:チップの下, 1:チップの上)" ); - sw.WriteLine( "; judgement/combo display priority (0:under chips, 1:over chips)" ); - sw.WriteLine( "JudgeDispPriority={0}" , (int) this.e判定表示優先度 ); + sw.WriteLine("; 判定・コンボ表示優先度(0:チップの下, 1:チップの上)"); + sw.WriteLine("; judgement/combo display priority (0:under chips, 1:over chips)"); + sw.WriteLine("JudgeDispPriority={0}", (int)this.e判定表示優先度); sw.WriteLine(); - sw.WriteLine( "; ドラムのレーン表示位置(0:左側, 1:中央)" ); // #2 - sw.WriteLine( "; drums lane position (0:LEFT, 1:CENTER)" ); - sw.WriteLine( "DrumsLanePosition={0}", (int) this.eドラムレーン表示位置 ); + sw.WriteLine("; ドラムのレーン表示位置(0:左側, 1:中央)"); // #2 + sw.WriteLine("; drums lane position (0:LEFT, 1:CENTER)"); + sw.WriteLine("DrumsLanePosition={0}", (int)this.eドラムレーン表示位置); sw.WriteLine(); - sw.WriteLine( "; リザルト画像自動保存機能(0:OFF, 1:ON)" ); // #25399 2011.6.9 yyagi - sw.WriteLine( "; Set \"1\" if you'd like to save result screen image automatically"); // - sw.WriteLine( "; when you get hiscore/hiskill."); // - sw.WriteLine( "AutoResultCapture={0}", this.bIsAutoResultCapture? 1 : 0 ); // + sw.WriteLine("; リザルト画像自動保存機能(0:OFF, 1:ON)"); // #25399 2011.6.9 yyagi + sw.WriteLine("; Set \"1\" if you'd like to save result screen image automatically"); // + sw.WriteLine("; when you get hiscore/hiskill."); // + sw.WriteLine("AutoResultCapture={0}", this.bIsAutoResultCapture ? 1 : 0); // sw.WriteLine(); - sw.WriteLine( "; 再生速度変更を、ピッチ変更で行うかどうか(0:ピッチ変更, 1:タイムストレッチ" ); // #23664 2013.2.24 yyagi - sw.WriteLine( "; (WASAPI/ASIO使用時のみ有効) " ); - sw.WriteLine( "; Set \"0\" if you'd like to use pitch shift with PlaySpeed." ); // - sw.WriteLine( "; Set \"1\" for time stretch." ); // - sw.WriteLine( "; (Only available when you're using using WASAPI or ASIO)" ); // - sw.WriteLine( "TimeStretch={0}", this.bTimeStretch ? 1 : 0 ); // + sw.WriteLine("; 再生速度変更を、ピッチ変更で行うかどうか(0:ピッチ変更, 1:タイムストレッチ"); // #23664 2013.2.24 yyagi + sw.WriteLine("; (WASAPI/ASIO使用時のみ有効) "); + sw.WriteLine("; Set \"0\" if you'd like to use pitch shift with PlaySpeed."); // + sw.WriteLine("; Set \"1\" for time stretch."); // + sw.WriteLine("; (Only available when you're using using WASAPI or ASIO)"); // + sw.WriteLine("TimeStretch={0}", this.bTimeStretch ? 1 : 0); // sw.WriteLine(); //sw.WriteLine( "; WASAPI/ASIO使用時に、MP3をストリーム再生するかどうか(0:ストリーム再生する, 1:しない)" ); // //sw.WriteLine( "; (mp3のシークがおかしくなる場合は、これを1にしてください) " ); // @@ -1634,111 +1634,111 @@ namespace DTXMania //sw.WriteLine( "NoMP3Streaming={0}", this.bNoMP3Streaming ? 1 : 0 ); // //sw.WriteLine(); #region [ Adjust ] - sw.WriteLine( "; 判定タイミング調整(ドラム, ギター, ベース)(-99~99)[ms]" ); // #23580 2011.1.3 yyagi + sw.WriteLine("; 判定タイミング調整(ドラム, ギター, ベース)(-99~99)[ms]"); // #23580 2011.1.3 yyagi sw.WriteLine("; Revision value to adjust judgement timing for the drums, guitar and bass."); // sw.WriteLine("InputAdjustTimeDrums={0}", this.nInputAdjustTimeMs.Drums); // sw.WriteLine("InputAdjustTimeGuitar={0}", this.nInputAdjustTimeMs.Guitar); // sw.WriteLine("InputAdjustTimeBass={0}", this.nInputAdjustTimeMs.Bass); // sw.WriteLine(); - sw.WriteLine( "; 判定ラインの表示位置調整(x0.5相当;ドラム, ギター, ベース)[px]" ); // #31602 2013.6.23 yyagi 判定ラインの表示位置オフセット - sw.WriteLine( "; Offset value to adjust displaying judgement line for the drums, guitar and bass." ); // - sw.WriteLine( "JudgeLinePosOffsetDrums={0}", (float) (this.nJudgeLinePosOffset.Drums / ( this.n譜面スクロール速度.Drums + 1 ) ) ); // - sw.WriteLine( "JudgeLinePosOffsetGuitar={0}", (float) (this.nJudgeLinePosOffset.Guitar / ( this.n譜面スクロール速度.Guitar + 1 ) ) ); // - sw.WriteLine( "JudgeLinePosOffsetBass={0}", (float) (this.nJudgeLinePosOffset.Bass / ( this.n譜面スクロール速度.Bass + 1 ) ) ); // + sw.WriteLine("; 判定ラインの表示位置調整(x0.5相当;ドラム, ギター, ベース)[px]"); // #31602 2013.6.23 yyagi 判定ラインの表示位置オフセット + sw.WriteLine("; Offset value to adjust displaying judgement line for the drums, guitar and bass."); // + sw.WriteLine("JudgeLinePosOffsetDrums={0}", (float)(this.nJudgeLinePosOffset.Drums / (this.n譜面スクロール速度.Drums + 1))); // + sw.WriteLine("JudgeLinePosOffsetGuitar={0}", (float)(this.nJudgeLinePosOffset.Guitar / (this.n譜面スクロール速度.Guitar + 1))); // + sw.WriteLine("JudgeLinePosOffsetBass={0}", (float)(this.nJudgeLinePosOffset.Bass / (this.n譜面スクロール速度.Bass + 1))); // - sw.WriteLine( "; 判定ラインの表示位置(ギター, ベース)" ); // #33891 2014.6.26 yyagi - sw.WriteLine( "; 0=Normal, 1=Lower" ); - sw.WriteLine( "; Position of the Judgement line and RGB button; Vseries compatible(1) or not(0)." ); // - sw.WriteLine( "JudgeLinePosModeGuitar={0}", (int) this.e判定位置.Guitar ); // - sw.WriteLine( "JudgeLinePosModeBass={0} ", (int) this.e判定位置.Bass ); // + sw.WriteLine("; 判定ラインの表示位置(ギター, ベース)"); // #33891 2014.6.26 yyagi + sw.WriteLine("; 0=Normal, 1=Lower"); + sw.WriteLine("; Position of the Judgement line and RGB button; Vseries compatible(1) or not(0)."); // + sw.WriteLine("JudgeLinePosModeGuitar={0}", (int)this.e判定位置.Guitar); // + sw.WriteLine("JudgeLinePosModeBass={0} ", (int)this.e判定位置.Bass); // sw.WriteLine(); #endregion #region [ VelocityMin ] - sw.WriteLine( "; LC, HH, SD,...の入力切り捨て下限Velocity値(0~127)" ); // #23857 2011.1.31 yyagi - sw.WriteLine( "; Minimum velocity value for LC, HH, SD, ... to accept." ); // - sw.WriteLine( "LCVelocityMin={0}", this.nVelocityMin.LC ); // - sw.WriteLine("HHVelocityMin={0}", this.nVelocityMin.HH ); // -// sw.WriteLine("; ハイハット以外の入力切り捨て下限Velocity値(0~127)"); // #23857 2010.12.12 yyagi -// sw.WriteLine("; Minimum velocity value to accept. (except HiHat)"); // -// sw.WriteLine("VelocityMin={0}", this.n切り捨て下限Velocity); // -// sw.WriteLine(); // - sw.WriteLine( "SDVelocityMin={0}", this.nVelocityMin.SD ); // - sw.WriteLine( "BDVelocityMin={0}", this.nVelocityMin.BD ); // - sw.WriteLine( "HTVelocityMin={0}", this.nVelocityMin.HT ); // - sw.WriteLine( "LTVelocityMin={0}", this.nVelocityMin.LT ); // - sw.WriteLine( "FTVelocityMin={0}", this.nVelocityMin.FT ); // - sw.WriteLine( "CYVelocityMin={0}", this.nVelocityMin.CY ); // - sw.WriteLine( "RDVelocityMin={0}", this.nVelocityMin.RD ); // + sw.WriteLine("; LC, HH, SD,...の入力切り捨て下限Velocity値(0~127)"); // #23857 2011.1.31 yyagi + sw.WriteLine("; Minimum velocity value for LC, HH, SD, ... to accept."); // + sw.WriteLine("LCVelocityMin={0}", this.nVelocityMin.LC); // + sw.WriteLine("HHVelocityMin={0}", this.nVelocityMin.HH); // + // sw.WriteLine("; ハイハット以外の入力切り捨て下限Velocity値(0~127)"); // #23857 2010.12.12 yyagi + // sw.WriteLine("; Minimum velocity value to accept. (except HiHat)"); // + // sw.WriteLine("VelocityMin={0}", this.n切り捨て下限Velocity); // + // sw.WriteLine(); // + sw.WriteLine("SDVelocityMin={0}", this.nVelocityMin.SD); // + sw.WriteLine("BDVelocityMin={0}", this.nVelocityMin.BD); // + sw.WriteLine("HTVelocityMin={0}", this.nVelocityMin.HT); // + sw.WriteLine("LTVelocityMin={0}", this.nVelocityMin.LT); // + sw.WriteLine("FTVelocityMin={0}", this.nVelocityMin.FT); // + sw.WriteLine("CYVelocityMin={0}", this.nVelocityMin.CY); // + sw.WriteLine("RDVelocityMin={0}", this.nVelocityMin.RD); // sw.WriteLine(); // #endregion - - sw.WriteLine( "; 曲の読み込み速度を変更(0:低速, 1:高速)" ); // #36046 2016.2.21 add ikanick - sw.WriteLine( "; Load sounds speed (0:Low, 1:High)" ); - sw.WriteLine( "Loadsoundspeed={0}", this.b曲読み込みを高速化する ? 1 : 0 ); + + sw.WriteLine("; 曲の読み込み速度を変更(0:低速, 1:高速)"); // #36046 2016.2.21 add ikanick + sw.WriteLine("; Load sounds speed (0:Low, 1:High)"); + sw.WriteLine("Loadsoundspeed={0}", this.b曲読み込みを高速化する ? 1 : 0); sw.WriteLine(); - sw.WriteLine( ";-------------------" ); + sw.WriteLine(";-------------------"); #endregion #region [ Log ] - sw.WriteLine( "[Log]" ); + sw.WriteLine("[Log]"); sw.WriteLine(); - sw.WriteLine( "; Log出力(0:OFF, 1:ON)" ); - sw.WriteLine( "OutputLog={0}", this.bログ出力 ? 1 : 0 ); + sw.WriteLine("; Log出力(0:OFF, 1:ON)"); + sw.WriteLine("OutputLog={0}", this.bログ出力 ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; 曲データ検索に関するLog出力(0:OFF, 1:ON)" ); - sw.WriteLine( "TraceSongSearch={0}", this.bLog曲検索ログ出力 ? 1 : 0 ); + sw.WriteLine("; 曲データ検索に関するLog出力(0:OFF, 1:ON)"); + sw.WriteLine("TraceSongSearch={0}", this.bLog曲検索ログ出力 ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; 画像やサウンドの作成・解放に関するLog出力(0:OFF, 1:ON)" ); - sw.WriteLine( "TraceCreatedDisposed={0}", this.bLog作成解放ログ出力 ? 1 : 0 ); + sw.WriteLine("; 画像やサウンドの作成・解放に関するLog出力(0:OFF, 1:ON)"); + sw.WriteLine("TraceCreatedDisposed={0}", this.bLog作成解放ログ出力 ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; DTX読み込み詳細に関するLog出力(0:OFF, 1:ON)" ); - sw.WriteLine( "TraceDTXDetails={0}", this.bLogDTX詳細ログ出力 ? 1 : 0 ); + sw.WriteLine("; DTX読み込み詳細に関するLog出力(0:OFF, 1:ON)"); + sw.WriteLine("TraceDTXDetails={0}", this.bLogDTX詳細ログ出力 ? 1 : 0); sw.WriteLine(); - sw.WriteLine( ";-------------------" ); + sw.WriteLine(";-------------------"); #endregion #region [ PlayOption ] - sw.WriteLine( "[PlayOption]" ); + sw.WriteLine("[PlayOption]"); sw.WriteLine(); - sw.WriteLine( "; DARKモード(0:OFF, 1:HALF, 2:FULL)" ); - sw.WriteLine( "Dark={0}", (int) this.eDark ); + sw.WriteLine("; DARKモード(0:OFF, 1:HALF, 2:FULL)"); + sw.WriteLine("Dark={0}", (int)this.eDark); sw.WriteLine(); #region [ SUDDEN ] - sw.WriteLine( "; ドラムSUDDENモード(0:OFF, 1:ON)" ); - sw.WriteLine( "DrumsSudden={0}", this.bSudden.Drums ? 1 : 0 ); + sw.WriteLine("; ドラムSUDDENモード(0:OFF, 1:ON)"); + sw.WriteLine("DrumsSudden={0}", this.bSudden.Drums ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; ギターSUDDENモード(0:OFF, 1:ON)" ); - sw.WriteLine( "GuitarSudden={0}", this.bSudden.Guitar ? 1 : 0 ); + sw.WriteLine("; ギターSUDDENモード(0:OFF, 1:ON)"); + sw.WriteLine("GuitarSudden={0}", this.bSudden.Guitar ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; ベースSUDDENモード(0:OFF, 1:ON)" ); - sw.WriteLine( "BassSudden={0}", this.bSudden.Bass ? 1 : 0 ); + sw.WriteLine("; ベースSUDDENモード(0:OFF, 1:ON)"); + sw.WriteLine("BassSudden={0}", this.bSudden.Bass ? 1 : 0); sw.WriteLine(); #endregion #region [ HIDDEN ] - sw.WriteLine( "; ドラムHIDDENモード(0:OFF, 1:ON)" ); - sw.WriteLine( "DrumsHidden={0}", this.bHidden.Drums ? 1 : 0 ); + sw.WriteLine("; ドラムHIDDENモード(0:OFF, 1:ON)"); + sw.WriteLine("DrumsHidden={0}", this.bHidden.Drums ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; ギターHIDDENモード(0:OFF, 1:ON)" ); - sw.WriteLine( "GuitarHidden={0}", this.bHidden.Guitar ? 1 : 0 ); + sw.WriteLine("; ギターHIDDENモード(0:OFF, 1:ON)"); + sw.WriteLine("GuitarHidden={0}", this.bHidden.Guitar ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; ベースHIDDENモード(0:OFF, 1:ON)" ); - sw.WriteLine( "BassHidden={0}", this.bHidden.Bass ? 1 : 0 ); + sw.WriteLine("; ベースHIDDENモード(0:OFF, 1:ON)"); + sw.WriteLine("BassHidden={0}", this.bHidden.Bass ? 1 : 0); sw.WriteLine(); #endregion #region [ Invisible ] - sw.WriteLine( "; ドラムチップ非表示モード (0:OFF, 1=SEMI, 2:FULL)" ); - sw.WriteLine( "; Drums chip invisible mode" ); - sw.WriteLine( "DrumsInvisible={0}", (int) this.eInvisible.Drums ); + sw.WriteLine("; ドラムチップ非表示モード (0:OFF, 1=SEMI, 2:FULL)"); + sw.WriteLine("; Drums chip invisible mode"); + sw.WriteLine("DrumsInvisible={0}", (int)this.eInvisible.Drums); sw.WriteLine(); - sw.WriteLine( "; ギターチップ非表示モード (0:OFF, 1=SEMI, 2:FULL)" ); - sw.WriteLine( "; Guitar chip invisible mode" ); - sw.WriteLine( "GuitarInvisible={0}", (int) this.eInvisible.Guitar ); + sw.WriteLine("; ギターチップ非表示モード (0:OFF, 1=SEMI, 2:FULL)"); + sw.WriteLine("; Guitar chip invisible mode"); + sw.WriteLine("GuitarInvisible={0}", (int)this.eInvisible.Guitar); sw.WriteLine(); - sw.WriteLine( "; ベースチップ非表示モード (0:OFF, 1=SEMI, 2:FULL)" ); - sw.WriteLine( "; Bbass chip invisible mode" ); - sw.WriteLine( "BassInvisible={0}", (int) this.eInvisible.Bass ); + sw.WriteLine("; ベースチップ非表示モード (0:OFF, 1=SEMI, 2:FULL)"); + sw.WriteLine("; Bbass chip invisible mode"); + sw.WriteLine("BassInvisible={0}", (int)this.eInvisible.Bass); sw.WriteLine(); //sw.WriteLine( "; Semi-InvisibleでMissった時のチップ再表示時間(ms)" ); //sw.WriteLine( "InvisibleDisplayTimeMs={0}", (int) this.nDisplayTimesMs ); @@ -1747,67 +1747,67 @@ namespace DTXMania //sw.WriteLine( "InvisibleFadeoutTimeMs={0}", (int) this.nFadeoutTimeMs ); //sw.WriteLine(); #endregion - sw.WriteLine( "; ドラムREVERSEモード(0:OFF, 1:ON)" ); - sw.WriteLine( "DrumsReverse={0}", this.bReverse.Drums ? 1 : 0 ); + sw.WriteLine("; ドラムREVERSEモード(0:OFF, 1:ON)"); + sw.WriteLine("DrumsReverse={0}", this.bReverse.Drums ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; ギターREVERSEモード(0:OFF, 1:ON)" ); - sw.WriteLine( "GuitarReverse={0}", this.bReverse.Guitar ? 1 : 0 ); + sw.WriteLine("; ギターREVERSEモード(0:OFF, 1:ON)"); + sw.WriteLine("GuitarReverse={0}", this.bReverse.Guitar ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; ベースREVERSEモード(0:OFF, 1:ON)" ); - sw.WriteLine( "BassReverse={0}", this.bReverse.Bass ? 1 : 0 ); + sw.WriteLine("; ベースREVERSEモード(0:OFF, 1:ON)"); + sw.WriteLine("BassReverse={0}", this.bReverse.Bass ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; ギターRANDOMモード(0:OFF, 1:Random, 2:SuperRandom, 3:HyperRandom)" ); - sw.WriteLine( "GuitarRandom={0}", (int) this.eRandom.Guitar ); + sw.WriteLine("; ギターRANDOMモード(0:OFF, 1:Random, 2:SuperRandom, 3:HyperRandom)"); + sw.WriteLine("GuitarRandom={0}", (int)this.eRandom.Guitar); sw.WriteLine(); - sw.WriteLine( "; ベースRANDOMモード(0:OFF, 1:Random, 2:SuperRandom, 3:HyperRandom)" ); - sw.WriteLine( "BassRandom={0}", (int) this.eRandom.Bass ); + sw.WriteLine("; ベースRANDOMモード(0:OFF, 1:Random, 2:SuperRandom, 3:HyperRandom)"); + sw.WriteLine("BassRandom={0}", (int)this.eRandom.Bass); sw.WriteLine(); - sw.WriteLine( "; ギターLIGHTモード(0:OFF, 1:ON)" ); - sw.WriteLine( "GuitarLight={0}", this.bLight.Guitar ? 1 : 0 ); + sw.WriteLine("; ギターLIGHTモード(0:OFF, 1:ON)"); + sw.WriteLine("GuitarLight={0}", this.bLight.Guitar ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; ベースLIGHTモード(0:OFF, 1:ON)" ); - sw.WriteLine( "BassLight={0}", this.bLight.Bass ? 1 : 0 ); + sw.WriteLine("; ベースLIGHTモード(0:OFF, 1:ON)"); + sw.WriteLine("BassLight={0}", this.bLight.Bass ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; ギターLEFTモード(0:OFF, 1:ON)" ); - sw.WriteLine( "GuitarLeft={0}", this.bLeft.Guitar ? 1 : 0 ); + sw.WriteLine("; ギターLEFTモード(0:OFF, 1:ON)"); + sw.WriteLine("GuitarLeft={0}", this.bLeft.Guitar ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; ベースLEFTモード(0:OFF, 1:ON)" ); - sw.WriteLine( "BassLeft={0}", this.bLeft.Bass ? 1 : 0 ); + sw.WriteLine("; ベースLEFTモード(0:OFF, 1:ON)"); + sw.WriteLine("BassLeft={0}", this.bLeft.Bass ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; RISKYモード(0:OFF, 1-10)" ); // #23559 2011.6.23 yyagi - sw.WriteLine( "; RISKY mode. 0=OFF, 1-10 is the times of misses to be Failed." ); // - sw.WriteLine( "Risky={0}", this.nRisky ); // + sw.WriteLine("; RISKYモード(0:OFF, 1-10)"); // #23559 2011.6.23 yyagi + sw.WriteLine("; RISKY mode. 0=OFF, 1-10 is the times of misses to be Failed."); // + sw.WriteLine("Risky={0}", this.nRisky); // sw.WriteLine(); - sw.WriteLine( "; TIGHTモード(0:OFF, 1:ON)" ); // #29500 2012.9.11 kairera0467 - sw.WriteLine( "; TIGHT mode. 0=OFF, 1=ON " ); - sw.WriteLine( "DrumsTight={0}", this.bTight ? 1 : 0 ); + sw.WriteLine("; TIGHTモード(0:OFF, 1:ON)"); // #29500 2012.9.11 kairera0467 + sw.WriteLine("; TIGHT mode. 0=OFF, 1=ON "); + sw.WriteLine("DrumsTight={0}", this.bTight ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; ドラム判定文字表示位置(0:表示OFF, 1:レーン上, 2:判定ライン上)" ); - sw.WriteLine( "; Drums Judgement display position (0:OFF, 1:on the lane, 2:over the judge line)" ); - sw.WriteLine( "DrumsPosition={0}", (int) this.判定文字表示位置.Drums ); + sw.WriteLine("; ドラム判定文字表示位置(0:表示OFF, 1:レーン上, 2:判定ライン上)"); + sw.WriteLine("; Drums Judgement display position (0:OFF, 1:on the lane, 2:over the judge line)"); + sw.WriteLine("DrumsPosition={0}", (int)this.判定文字表示位置.Drums); sw.WriteLine(); - sw.WriteLine( "; ギター判定文字表示位置(0:表示IFF, 1:レーン上, 2:判定ライン上, 3:コンボ下)" ); - sw.WriteLine( "; Guitar Judgement display position (0:OFF, 1:on the lane, 2:over the judge line, 3:under combo)" ); - sw.WriteLine( "GuitarPosition={0}", (int) this.判定文字表示位置.Guitar ); + sw.WriteLine("; ギター判定文字表示位置(0:表示IFF, 1:レーン上, 2:判定ライン上, 3:コンボ下)"); + sw.WriteLine("; Guitar Judgement display position (0:OFF, 1:on the lane, 2:over the judge line, 3:under combo)"); + sw.WriteLine("GuitarPosition={0}", (int)this.判定文字表示位置.Guitar); sw.WriteLine(); - sw.WriteLine( "; ベース判定文字表示位置(0:表示OFF, 1:レーン上, 2:判定ライン上, 3:コンボ下)" ); - sw.WriteLine( "; Bass Judgement display position (0:OFF, 1:on the lane, 2:over the judge line, 3:under combo)" ); - sw.WriteLine( "BassPosition={0}", (int) this.判定文字表示位置.Bass ); + sw.WriteLine("; ベース判定文字表示位置(0:表示OFF, 1:レーン上, 2:判定ライン上, 3:コンボ下)"); + sw.WriteLine("; Bass Judgement display position (0:OFF, 1:on the lane, 2:over the judge line, 3:under combo)"); + sw.WriteLine("BassPosition={0}", (int)this.判定文字表示位置.Bass); sw.WriteLine(); - sw.WriteLine( "; ドラム譜面スクロール速度(0:x0.5, 1:x1.0, 2:x1.5,…,1999:x1000.0)" ); - sw.WriteLine( "DrumsScrollSpeed={0}", this.n譜面スクロール速度.Drums ); + sw.WriteLine("; ドラム譜面スクロール速度(0:x0.5, 1:x1.0, 2:x1.5,…,1999:x1000.0)"); + sw.WriteLine("DrumsScrollSpeed={0}", this.n譜面スクロール速度.Drums); sw.WriteLine(); - sw.WriteLine( "; ギター譜面スクロール速度(0:x0.5, 1:x1.0, 2:x1.5,…,1999:x1000.0)" ); - sw.WriteLine( "GuitarScrollSpeed={0}", this.n譜面スクロール速度.Guitar ); + sw.WriteLine("; ギター譜面スクロール速度(0:x0.5, 1:x1.0, 2:x1.5,…,1999:x1000.0)"); + sw.WriteLine("GuitarScrollSpeed={0}", this.n譜面スクロール速度.Guitar); sw.WriteLine(); - sw.WriteLine( "; ベース譜面スクロール速度(0:x0.5, 1:x1.0, 2:x1.5,…,1999:x1000.0)" ); - sw.WriteLine( "BassScrollSpeed={0}", this.n譜面スクロール速度.Bass ); + sw.WriteLine("; ベース譜面スクロール速度(0:x0.5, 1:x1.0, 2:x1.5,…,1999:x1000.0)"); + sw.WriteLine("BassScrollSpeed={0}", this.n譜面スクロール速度.Bass); sw.WriteLine(); - sw.WriteLine( "; 演奏速度(5~40)(→x5/20~x40/20)" ); - sw.WriteLine( "PlaySpeed={0}", this.n演奏速度 ); + sw.WriteLine("; 演奏速度(5~40)(→x5/20~x40/20)"); + sw.WriteLine("PlaySpeed={0}", this.n演奏速度); sw.WriteLine(); - sw.WriteLine( "; ドラムCOMBO文字表示位置(0:å·¦, 1:中, 2:右, 3:OFF)" ); - sw.WriteLine( "ComboPosition={0}", (int) this.ドラムコンボ文字の表示位置 ); + sw.WriteLine("; ドラムCOMBO文字表示位置(0:å·¦, 1:中, 2:右, 3:OFF)"); + sw.WriteLine("ComboPosition={0}", (int)this.ドラムコンボ文字の表示位置); sw.WriteLine(); //sw.WriteLine( "; 判定・コンボ表示優先度(0:チップの下, 1:チップの上)" ); //sw.WriteLine( "JudgeDispPriorityDrums={0}" , (int) this.e判定表示優先度.Drums ); @@ -1815,297 +1815,297 @@ namespace DTXMania //sw.WriteLine( "JudgeDispPriorityBass={0}" , (int) this.e判定表示優先度.Bass ); //sw.WriteLine(); - // #24074 2011.01.23 add ikanick - sw.WriteLine( "; ドラムグラフ表示(0:OFF, 1:ON)" ); - sw.WriteLine( "DrumsGraph={0}", this.bGraph.Drums ? 1 : 0 ); + // #24074 2011.01.23 add ikanick + sw.WriteLine("; ドラムグラフ表示(0:OFF, 1:ON)"); + sw.WriteLine("DrumsGraph={0}", this.bGraph.Drums ? 1 : 0); sw.WriteLine(); - // #35411 2015.8.18 chnmr0 add - sw.WriteLine("; AUTOゴースト種別 (0:PERFECT, 1:LAST_PLAY, 2:HI_SKILL, 3:HI_SCORE, 4:ONLINE)" ); - sw.WriteLine("DrumAutoGhost={0}", (int)eAutoGhost.Drums); - sw.WriteLine("GuitarAutoGhost={0}", (int)eAutoGhost.Guitar); - sw.WriteLine("BassAutoGhost={0}", (int)eAutoGhost.Bass); - sw.WriteLine(); - sw.WriteLine("; ターゲットゴースト種別 (0:NONE, 1:PERFECT, 2:LAST_PLAY, 3:HI_SKILL, 4:HI_SCORE, 5:ONLINE)"); - sw.WriteLine("DrumTargetGhost={0}", (int)eTargetGhost.Drums); - sw.WriteLine("GuitarTargetGhost={0}", (int)eTargetGhost.Guitar); - sw.WriteLine("BassTargetGhost={0}", (int)eTargetGhost.Bass); - sw.WriteLine(); + // #35411 2015.8.18 chnmr0 add + sw.WriteLine("; AUTOゴースト種別 (0:PERFECT, 1:LAST_PLAY, 2:HI_SKILL, 3:HI_SCORE, 4:ONLINE)"); + sw.WriteLine("DrumAutoGhost={0}", (int)eAutoGhost.Drums); + sw.WriteLine("GuitarAutoGhost={0}", (int)eAutoGhost.Guitar); + sw.WriteLine("BassAutoGhost={0}", (int)eAutoGhost.Bass); + sw.WriteLine(); + sw.WriteLine("; ターゲットゴースト種別 (0:NONE, 1:PERFECT, 2:LAST_PLAY, 3:HI_SKILL, 4:HI_SCORE, 5:ONLINE)"); + sw.WriteLine("DrumTargetGhost={0}", (int)eTargetGhost.Drums); + sw.WriteLine("GuitarTargetGhost={0}", (int)eTargetGhost.Guitar); + sw.WriteLine("BassTargetGhost={0}", (int)eTargetGhost.Bass); + sw.WriteLine(); - sw.WriteLine( ";-------------------" ); + sw.WriteLine(";-------------------"); #endregion #region [ ViewerOption ] - sw.WriteLine( "[ViewerOption]" ); + sw.WriteLine("[ViewerOption]"); sw.WriteLine(); - sw.WriteLine( "; Viewerモード時専用 ドラム譜面スクロール速度(0:x0.5, 1:x1.0, 2:x1.5,…,1999:x1000.0)" ); - sw.WriteLine( "; for viewer mode; Drums Scroll Speed" ); - sw.WriteLine( "ViewerDrumsScrollSpeed={0}", this.nViewerScrollSpeed.Drums ); + sw.WriteLine("; Viewerモード時専用 ドラム譜面スクロール速度(0:x0.5, 1:x1.0, 2:x1.5,…,1999:x1000.0)"); + sw.WriteLine("; for viewer mode; Drums Scroll Speed"); + sw.WriteLine("ViewerDrumsScrollSpeed={0}", this.nViewerScrollSpeed.Drums); sw.WriteLine(); - sw.WriteLine( "; Viewerモード時専用 ギター譜面スクロール速度(0:x0.5, 1:x1.0, 2:x1.5,…,1999:x1000.0)"); - sw.WriteLine( "; for viewer mode; Guitar Scroll Speed" ); - sw.WriteLine( "ViewerGuitarScrollSpeed={0}", this.nViewerScrollSpeed.Guitar ); + sw.WriteLine("; Viewerモード時専用 ギター譜面スクロール速度(0:x0.5, 1:x1.0, 2:x1.5,…,1999:x1000.0)"); + sw.WriteLine("; for viewer mode; Guitar Scroll Speed"); + sw.WriteLine("ViewerGuitarScrollSpeed={0}", this.nViewerScrollSpeed.Guitar); sw.WriteLine(); - sw.WriteLine( "; Viewerモード時専用 ベース譜面スクロール速度(0:x0.5, 1:x1.0, 2:x1.5,…,1999:x1000.0)"); - sw.WriteLine( "; for viewer mode; Bass Scroll Speed" ); - sw.WriteLine( "ViewerBassScrollSpeed={0}", this.nViewerScrollSpeed.Bass ); + sw.WriteLine("; Viewerモード時専用 ベース譜面スクロール速度(0:x0.5, 1:x1.0, 2:x1.5,…,1999:x1000.0)"); + sw.WriteLine("; for viewer mode; Bass Scroll Speed"); + sw.WriteLine("ViewerBassScrollSpeed={0}", this.nViewerScrollSpeed.Bass); sw.WriteLine(); - sw.WriteLine( "; Viewerモード時専用 垂直帰線同期(0:OFF,1:ON)" ); - sw.WriteLine( "; for viewer mode; Use whether Vertical Sync or not." ); - sw.WriteLine( "ViewerVSyncWait={0}", this.bViewerVSyncWait ? 1 : 0 ); + sw.WriteLine("; Viewerモード時専用 垂直帰線同期(0:OFF,1:ON)"); + sw.WriteLine("; for viewer mode; Use whether Vertical Sync or not."); + sw.WriteLine("ViewerVSyncWait={0}", this.bViewerVSyncWait ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; Viewerモード時専用 演奏情報を表示する (0:OFF, 1:ON) "); - sw.WriteLine( "; for viewer mode;" ); - sw.WriteLine( "; Showing playing info on the playing screen. (0:OFF, 1:ON) " ); - sw.WriteLine( "ViewerShowDebugStatus={0}", this.bViewerShowDebugStatus? 1 : 0 ); + sw.WriteLine("; Viewerモード時専用 演奏情報を表示する (0:OFF, 1:ON) "); + sw.WriteLine("; for viewer mode;"); + sw.WriteLine("; Showing playing info on the playing screen. (0:OFF, 1:ON) "); + sw.WriteLine("ViewerShowDebugStatus={0}", this.bViewerShowDebugStatus ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; Viewerモード時専用 再生速度変更を、ピッチ変更で行うかどうか(0:ピッチ変更, 1:タイムストレッチ "); - sw.WriteLine( "; (WASAPI/ASIO使用時のみ有効) "); - sw.WriteLine( "; for viewer mode;" ); - sw.WriteLine( "; Set \"0\" if you'd like to use pitch shift with PlaySpeed. " ); - sw.WriteLine( "; Set \"1\" for time stretch. " ); - sw.WriteLine( "; (Only available when you're using using WASAPI or ASIO) "); - sw.WriteLine( "ViewerTimeStretch={0}", this.bViewerTimeStretch? 1 : 0 ); + sw.WriteLine("; Viewerモード時専用 再生速度変更を、ピッチ変更で行うかどうか(0:ピッチ変更, 1:タイムストレッチ "); + sw.WriteLine("; (WASAPI/ASIO使用時のみ有効) "); + sw.WriteLine("; for viewer mode;"); + sw.WriteLine("; Set \"0\" if you'd like to use pitch shift with PlaySpeed. "); + sw.WriteLine("; Set \"1\" for time stretch. "); + sw.WriteLine("; (Only available when you're using using WASAPI or ASIO) "); + sw.WriteLine("ViewerTimeStretch={0}", this.bViewerTimeStretch ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; Viewerモード時専用 ギター/ベース有効(0:OFF,1:ON) "); - sw.WriteLine( "; for viewer mode;" ); - sw.WriteLine( "; Enable Guitar/Bass or not.(0:OFF,1:ON) " ); - sw.WriteLine( "ViewerGuitar={0}", this.bViewerGuitar有効? 1 : 0 ); + sw.WriteLine("; Viewerモード時専用 ギター/ベース有効(0:OFF,1:ON) "); + sw.WriteLine("; for viewer mode;"); + sw.WriteLine("; Enable Guitar/Bass or not.(0:OFF,1:ON) "); + sw.WriteLine("ViewerGuitar={0}", this.bViewerGuitar有効 ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; Viewerモード時専用 ドラム有効(0:OFF,1:ON) "); - sw.WriteLine( "; for viewer mode;" ); - sw.WriteLine( "; Enable Drums or not.(0:OFF,1:ON) " ); - sw.WriteLine( "ViewerDrums={0}", this.bViewerDrums有効? 1 : 0 ); + sw.WriteLine("; Viewerモード時専用 ドラム有効(0:OFF,1:ON) "); + sw.WriteLine("; for viewer mode;"); + sw.WriteLine("; Enable Drums or not.(0:OFF,1:ON) "); + sw.WriteLine("ViewerDrums={0}", this.bViewerDrums有効 ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; Viewerモード専用 ウインドウモード時の画面幅" ); - sw.WriteLine( "; A width size in the window mode, for viewer mode." ); - sw.WriteLine( "ViewerWindowWidth={0}", this.nViewerウインドウwidth ); + sw.WriteLine("; Viewerモード専用 ウインドウモード時の画面幅"); + sw.WriteLine("; A width size in the window mode, for viewer mode."); + sw.WriteLine("ViewerWindowWidth={0}", this.nViewerウインドウwidth); sw.WriteLine(); - sw.WriteLine( "; Viewerモード専用 ウインドウモード時の画面高さ" ); - sw.WriteLine( "; A height size in the window mode, for viewer mode." ); - sw.WriteLine( "ViewerWindowHeight={0}", this.nViewerウインドウheight ); + sw.WriteLine("; Viewerモード専用 ウインドウモード時の画面高さ"); + sw.WriteLine("; A height size in the window mode, for viewer mode."); + sw.WriteLine("ViewerWindowHeight={0}", this.nViewerウインドウheight); sw.WriteLine(); - sw.WriteLine( "; Viewerモード専用 ウィンドウモード時の位置X" ); - sw.WriteLine( "; X position in the window mode, for viewer mode." ); - sw.WriteLine( "ViewerWindowX={0}", this.nViewer初期ウィンドウ開始位置X ); + sw.WriteLine("; Viewerモード専用 ウィンドウモード時の位置X"); + sw.WriteLine("; X position in the window mode, for viewer mode."); + sw.WriteLine("ViewerWindowX={0}", this.nViewer初期ウィンドウ開始位置X); sw.WriteLine(); - sw.WriteLine( "; Viewerモード専用 ウィンドウモード時の位置Y" ); - sw.WriteLine( "; Y position in the window mode, for viewer mode." ); - sw.WriteLine( "ViewerWindowY={0}", this.nViewer初期ウィンドウ開始位置Y ); + sw.WriteLine("; Viewerモード専用 ウィンドウモード時の位置Y"); + sw.WriteLine("; Y position in the window mode, for viewer mode."); + sw.WriteLine("ViewerWindowY={0}", this.nViewer初期ウィンドウ開始位置Y); sw.WriteLine(); - sw.WriteLine( ";-------------------" ); + sw.WriteLine(";-------------------"); #endregion #region [ AutoPlay ] - sw.WriteLine( "[AutoPlay]" ); + sw.WriteLine("[AutoPlay]"); sw.WriteLine(); - sw.WriteLine( "; 自動演奏(0:OFF, 1:ON)" ); + sw.WriteLine("; 自動演奏(0:OFF, 1:ON)"); sw.WriteLine(); - sw.WriteLine( "; Drums" ); - sw.WriteLine( "LC={0}", this.bAutoPlay.LC ? 1 : 0 ); - sw.WriteLine( "HH={0}", this.bAutoPlay.HH ? 1 : 0 ); - sw.WriteLine( "SD={0}", this.bAutoPlay.SD ? 1 : 0 ); - sw.WriteLine( "BD={0}", this.bAutoPlay.BD ? 1 : 0 ); - sw.WriteLine( "HT={0}", this.bAutoPlay.HT ? 1 : 0 ); - sw.WriteLine( "LT={0}", this.bAutoPlay.LT ? 1 : 0 ); - sw.WriteLine( "FT={0}", this.bAutoPlay.FT ? 1 : 0 ); - sw.WriteLine( "CY={0}", this.bAutoPlay.CY ? 1 : 0 ); + sw.WriteLine("; Drums"); + sw.WriteLine("LC={0}", this.bAutoPlay.LC ? 1 : 0); + sw.WriteLine("HH={0}", this.bAutoPlay.HH ? 1 : 0); + sw.WriteLine("SD={0}", this.bAutoPlay.SD ? 1 : 0); + sw.WriteLine("BD={0}", this.bAutoPlay.BD ? 1 : 0); + sw.WriteLine("HT={0}", this.bAutoPlay.HT ? 1 : 0); + sw.WriteLine("LT={0}", this.bAutoPlay.LT ? 1 : 0); + sw.WriteLine("FT={0}", this.bAutoPlay.FT ? 1 : 0); + sw.WriteLine("CY={0}", this.bAutoPlay.CY ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; Guitar" ); + sw.WriteLine("; Guitar"); //sw.WriteLine( "Guitar={0}", this.bAutoPlay.Guitar ? 1 : 0 ); - sw.WriteLine( "GuitarR={0}", this.bAutoPlay.GtR ? 1 : 0 ); - sw.WriteLine( "GuitarG={0}", this.bAutoPlay.GtG ? 1 : 0 ); - sw.WriteLine( "GuitarB={0}", this.bAutoPlay.GtB ? 1 : 0 ); - sw.WriteLine( "GuitarPick={0}", this.bAutoPlay.GtPick ? 1 : 0 ); - sw.WriteLine( "GuitarWailing={0}", this.bAutoPlay.GtW ? 1 : 0 ); + sw.WriteLine("GuitarR={0}", this.bAutoPlay.GtR ? 1 : 0); + sw.WriteLine("GuitarG={0}", this.bAutoPlay.GtG ? 1 : 0); + sw.WriteLine("GuitarB={0}", this.bAutoPlay.GtB ? 1 : 0); + sw.WriteLine("GuitarPick={0}", this.bAutoPlay.GtPick ? 1 : 0); + sw.WriteLine("GuitarWailing={0}", this.bAutoPlay.GtW ? 1 : 0); sw.WriteLine(); - sw.WriteLine( "; Bass" ); + sw.WriteLine("; Bass"); // sw.WriteLine( "Bass={0}", this.bAutoPlay.Bass ? 1 : 0 ); - sw.WriteLine( "BassR={0}", this.bAutoPlay.BsR ? 1 : 0 ); - sw.WriteLine( "BassG={0}", this.bAutoPlay.BsG ? 1 : 0 ); - sw.WriteLine( "BassB={0}", this.bAutoPlay.BsB ? 1 : 0 ); - sw.WriteLine( "BassPick={0}", this.bAutoPlay.BsPick ? 1 : 0 ); - sw.WriteLine( "BassWailing={0}", this.bAutoPlay.BsW ? 1 : 0 ); + sw.WriteLine("BassR={0}", this.bAutoPlay.BsR ? 1 : 0); + sw.WriteLine("BassG={0}", this.bAutoPlay.BsG ? 1 : 0); + sw.WriteLine("BassB={0}", this.bAutoPlay.BsB ? 1 : 0); + sw.WriteLine("BassPick={0}", this.bAutoPlay.BsPick ? 1 : 0); + sw.WriteLine("BassWailing={0}", this.bAutoPlay.BsW ? 1 : 0); sw.WriteLine(); - sw.WriteLine( ";-------------------" ); + sw.WriteLine(";-------------------"); #endregion #region [ HitRange ] - sw.WriteLine( "[HitRange]" ); + sw.WriteLine("[HitRange]"); sw.WriteLine(); - sw.WriteLine( "; Perfect~Poor とみなされる範囲[ms]" ); - sw.WriteLine( "Perfect={0}", this.nヒット範囲ms.Perfect ); - sw.WriteLine( "Great={0}", this.nヒット範囲ms.Great ); - sw.WriteLine( "Good={0}", this.nヒット範囲ms.Good ); - sw.WriteLine( "Poor={0}", this.nヒット範囲ms.Poor ); + sw.WriteLine("; Perfect~Poor とみなされる範囲[ms]"); + sw.WriteLine("Perfect={0}", this.nヒット範囲ms.Perfect); + sw.WriteLine("Great={0}", this.nヒット範囲ms.Great); + sw.WriteLine("Good={0}", this.nヒット範囲ms.Good); + sw.WriteLine("Poor={0}", this.nヒット範囲ms.Poor); sw.WriteLine(); - sw.WriteLine( ";-------------------" ); + sw.WriteLine(";-------------------"); #endregion #region [ GUID ] - sw.WriteLine( "[GUID]" ); + sw.WriteLine("[GUID]"); sw.WriteLine(); - foreach( KeyValuePair pair in this.dicJoystick ) + foreach (KeyValuePair pair in this.dicJoystick) { - sw.WriteLine( "JoystickID={0},{1}", pair.Key, pair.Value ); + sw.WriteLine("JoystickID={0},{1}", pair.Key, pair.Value); } #endregion #region [ DrumsKeyAssign ] sw.WriteLine(); - sw.WriteLine( ";-------------------" ); - sw.WriteLine( "; キーアサイン" ); - sw.WriteLine( "; 項 目:Keyboard → 'K'+'0'+キーコード(10進数)" ); - sw.WriteLine( "; Mouse → 'N'+'0'+ボタン番号(0~7)" ); - sw.WriteLine( "; MIDI In → 'M'+デバイス番号1桁(0~9,A~Z)+ノート番号(10進数)" ); - sw.WriteLine( "; Joystick → 'J'+デバイス番号1桁(0~9,A~Z)+ 0 ...... X減少(å·¦)ボタン" ); - sw.WriteLine( "; 1 ...... X増加(右)ボタン" ); - sw.WriteLine( "; 2 ...... Y減少(上)ボタン" ); - sw.WriteLine( "; 3 ...... Y増加(下)ボタン" ); - sw.WriteLine( "; 4 ...... Z減少(前)ボタン" ); - sw.WriteLine( "; 5 ...... Z増加(後)ボタン" ); - sw.WriteLine( "; 6~133.. ボタン1~128" ); - sw.WriteLine( "; これらの項目を 16 個まで指定可能(',' で区切って記述)。" ); - sw.WriteLine( ";" ); - sw.WriteLine( "; 表記例:HH=K044,M042,J16" ); - sw.WriteLine( "; → HiHat を Keyboard の 44 ('Z'), MidiIn#0 の 42, JoyPad#1 の 6(ボタン1) に割当て" ); - sw.WriteLine( ";" ); - sw.WriteLine( "; ※Joystick のデバイス番号とデバイスとの関係は [GUID] セクションに記してあるものが有効。" ); - sw.WriteLine( ";" ); + sw.WriteLine(";-------------------"); + sw.WriteLine("; キーアサイン"); + sw.WriteLine("; 項 目:Keyboard → 'K'+'0'+キーコード(10進数)"); + sw.WriteLine("; Mouse → 'N'+'0'+ボタン番号(0~7)"); + sw.WriteLine("; MIDI In → 'M'+デバイス番号1桁(0~9,A~Z)+ノート番号(10進数)"); + sw.WriteLine("; Joystick → 'J'+デバイス番号1桁(0~9,A~Z)+ 0 ...... X減少(å·¦)ボタン"); + sw.WriteLine("; 1 ...... X増加(右)ボタン"); + sw.WriteLine("; 2 ...... Y減少(上)ボタン"); + sw.WriteLine("; 3 ...... Y増加(下)ボタン"); + sw.WriteLine("; 4 ...... Z減少(前)ボタン"); + sw.WriteLine("; 5 ...... Z増加(後)ボタン"); + sw.WriteLine("; 6~133.. ボタン1~128"); + sw.WriteLine("; これらの項目を 16 個まで指定可能(',' で区切って記述)。"); + sw.WriteLine(";"); + sw.WriteLine("; 表記例:HH=K044,M042,J16"); + sw.WriteLine("; → HiHat を Keyboard の 44 ('Z'), MidiIn#0 の 42, JoyPad#1 の 6(ボタン1) に割当て"); + sw.WriteLine(";"); + sw.WriteLine("; ※Joystick のデバイス番号とデバイスとの関係は [GUID] セクションに記してあるものが有効。"); + sw.WriteLine(";"); sw.WriteLine(); - sw.WriteLine( "[DrumsKeyAssign]" ); + sw.WriteLine("[DrumsKeyAssign]"); sw.WriteLine(); - sw.Write( "HH=" ); - this.tキーの書き出し( sw, this.KeyAssign.Drums.HH ); + sw.Write("HH="); + this.tキーの書き出し(sw, this.KeyAssign.Drums.HH); sw.WriteLine(); - sw.Write( "SD=" ); - this.tキーの書き出し( sw, this.KeyAssign.Drums.SD ); + sw.Write("SD="); + this.tキーの書き出し(sw, this.KeyAssign.Drums.SD); sw.WriteLine(); - sw.Write( "BD=" ); - this.tキーの書き出し( sw, this.KeyAssign.Drums.BD ); + sw.Write("BD="); + this.tキーの書き出し(sw, this.KeyAssign.Drums.BD); sw.WriteLine(); - sw.Write( "HT=" ); - this.tキーの書き出し( sw, this.KeyAssign.Drums.HT ); + sw.Write("HT="); + this.tキーの書き出し(sw, this.KeyAssign.Drums.HT); sw.WriteLine(); - sw.Write( "LT=" ); - this.tキーの書き出し( sw, this.KeyAssign.Drums.LT ); + sw.Write("LT="); + this.tキーの書き出し(sw, this.KeyAssign.Drums.LT); sw.WriteLine(); - sw.Write( "FT=" ); - this.tキーの書き出し( sw, this.KeyAssign.Drums.FT ); + sw.Write("FT="); + this.tキーの書き出し(sw, this.KeyAssign.Drums.FT); sw.WriteLine(); - sw.Write( "CY=" ); - this.tキーの書き出し( sw, this.KeyAssign.Drums.CY ); + sw.Write("CY="); + this.tキーの書き出し(sw, this.KeyAssign.Drums.CY); sw.WriteLine(); - sw.Write( "HO=" ); - this.tキーの書き出し( sw, this.KeyAssign.Drums.HHO ); + sw.Write("HO="); + this.tキーの書き出し(sw, this.KeyAssign.Drums.HHO); sw.WriteLine(); - sw.Write( "RD=" ); - this.tキーの書き出し( sw, this.KeyAssign.Drums.RD ); + sw.Write("RD="); + this.tキーの書き出し(sw, this.KeyAssign.Drums.RD); sw.WriteLine(); - sw.Write( "LC=" ); - this.tキーの書き出し( sw, this.KeyAssign.Drums.LC ); + sw.Write("LC="); + this.tキーの書き出し(sw, this.KeyAssign.Drums.LC); sw.WriteLine(); - sw.Write( "HP=" ); // #27029 2012.1.4 from - this.tキーの書き出し( sw, this.KeyAssign.Drums.HP ); // + sw.Write("HP="); // #27029 2012.1.4 from + this.tキーの書き出し(sw, this.KeyAssign.Drums.HP); // sw.WriteLine(); // sw.WriteLine(); #endregion #region [ GuitarKeyAssign ] - sw.WriteLine( "[GuitarKeyAssign]" ); + sw.WriteLine("[GuitarKeyAssign]"); sw.WriteLine(); - sw.Write( "R=" ); - this.tキーの書き出し( sw, this.KeyAssign.Guitar.R ); + sw.Write("R="); + this.tキーの書き出し(sw, this.KeyAssign.Guitar.R); sw.WriteLine(); - sw.Write( "G=" ); - this.tキーの書き出し( sw, this.KeyAssign.Guitar.G ); + sw.Write("G="); + this.tキーの書き出し(sw, this.KeyAssign.Guitar.G); sw.WriteLine(); - sw.Write( "B=" ); - this.tキーの書き出し( sw, this.KeyAssign.Guitar.B ); + sw.Write("B="); + this.tキーの書き出し(sw, this.KeyAssign.Guitar.B); sw.WriteLine(); - sw.Write( "Pick=" ); - this.tキーの書き出し( sw, this.KeyAssign.Guitar.Pick ); + sw.Write("Pick="); + this.tキーの書き出し(sw, this.KeyAssign.Guitar.Pick); sw.WriteLine(); - sw.Write( "Wail=" ); - this.tキーの書き出し( sw, this.KeyAssign.Guitar.Wail ); + sw.Write("Wail="); + this.tキーの書き出し(sw, this.KeyAssign.Guitar.Wail); sw.WriteLine(); - sw.Write( "Decide=" ); - this.tキーの書き出し( sw, this.KeyAssign.Guitar.Decide ); + sw.Write("Decide="); + this.tキーの書き出し(sw, this.KeyAssign.Guitar.Decide); sw.WriteLine(); - sw.Write( "Cancel=" ); - this.tキーの書き出し( sw, this.KeyAssign.Guitar.Cancel ); + sw.Write("Cancel="); + this.tキーの書き出し(sw, this.KeyAssign.Guitar.Cancel); sw.WriteLine(); sw.WriteLine(); #endregion #region [ BassKeyAssign ] - sw.WriteLine( "[BassKeyAssign]" ); + sw.WriteLine("[BassKeyAssign]"); sw.WriteLine(); - sw.Write( "R=" ); - this.tキーの書き出し( sw, this.KeyAssign.Bass.R ); + sw.Write("R="); + this.tキーの書き出し(sw, this.KeyAssign.Bass.R); sw.WriteLine(); - sw.Write( "G=" ); - this.tキーの書き出し( sw, this.KeyAssign.Bass.G ); + sw.Write("G="); + this.tキーの書き出し(sw, this.KeyAssign.Bass.G); sw.WriteLine(); - sw.Write( "B=" ); - this.tキーの書き出し( sw, this.KeyAssign.Bass.B ); + sw.Write("B="); + this.tキーの書き出し(sw, this.KeyAssign.Bass.B); sw.WriteLine(); - sw.Write( "Pick=" ); - this.tキーの書き出し( sw, this.KeyAssign.Bass.Pick ); + sw.Write("Pick="); + this.tキーの書き出し(sw, this.KeyAssign.Bass.Pick); sw.WriteLine(); - sw.Write( "Wail=" ); - this.tキーの書き出し( sw, this.KeyAssign.Bass.Wail ); + sw.Write("Wail="); + this.tキーの書き出し(sw, this.KeyAssign.Bass.Wail); sw.WriteLine(); - sw.Write( "Decide=" ); - this.tキーの書き出し( sw, this.KeyAssign.Bass.Decide ); + sw.Write("Decide="); + this.tキーの書き出し(sw, this.KeyAssign.Bass.Decide); sw.WriteLine(); - sw.Write( "Cancel=" ); - this.tキーの書き出し( sw, this.KeyAssign.Bass.Cancel ); + sw.Write("Cancel="); + this.tキーの書き出し(sw, this.KeyAssign.Bass.Cancel); sw.WriteLine(); sw.WriteLine(); #endregion #region [ SystemkeyAssign ] - sw.WriteLine( "[SystemKeyAssign]" ); + sw.WriteLine("[SystemKeyAssign]"); sw.WriteLine(); - sw.Write( "Capture=" ); - this.tキーの書き出し( sw, this.KeyAssign.System.Capture ); + sw.Write("Capture="); + this.tキーの書き出し(sw, this.KeyAssign.System.Capture); sw.WriteLine(); sw.WriteLine(); #endregion #region [ Temp ] - 2012.1.5 from add - sw.WriteLine( "[Temp]" ); + sw.WriteLine("[Temp]"); sw.WriteLine(); - if( ( this.eBDGroup == EBDGroup.どっちもBD ) && ( this.BackupOf1BD != null ) ) // #27029 2012.1.5 from: 有効な場合にのみ出力する。 + if ((this.eBDGroup == EBDGroup.どっちもBD) && (this.BackupOf1BD != null)) // #27029 2012.1.5 from: 有効な場合にのみ出力する。 { - sw.WriteLine( "; BDGroup が FP|BD→FP&BD に変わった時の LC/HHC/HHO 打ち分けモード(0:LC|HHC|HHO, 1:LC&(HHC|HHO), 2:LC&HHC&HHO)" ); - sw.WriteLine( "BackupOf1BD_HHGroup={0}", (int) this.BackupOf1BD.eHHGroup ); + sw.WriteLine("; BDGroup が FP|BD→FP&BD に変わった時の LC/HHC/HHO 打ち分けモード(0:LC|HHC|HHO, 1:LC&(HHC|HHO), 2:LC&HHC&HHO)"); + sw.WriteLine("BackupOf1BD_HHGroup={0}", (int)this.BackupOf1BD.eHHGroup); sw.WriteLine(); - sw.WriteLine( ";BDGropu が FP|BD→FP&BD に変わった時の打ち分け時の再生音の優先順位(HHGroup)(0:Chip>Pad, 1:Pad>Chip)" ); - sw.WriteLine( "BackupOf1BD_HitSoundPriorityHH={0}", (int) this.BackupOf1BD.eHitSoundPriorityHH ); + sw.WriteLine(";BDGropu が FP|BD→FP&BD に変わった時の打ち分け時の再生音の優先順位(HHGroup)(0:Chip>Pad, 1:Pad>Chip)"); + sw.WriteLine("BackupOf1BD_HitSoundPriorityHH={0}", (int)this.BackupOf1BD.eHitSoundPriorityHH); sw.WriteLine(); } - sw.WriteLine( ";-------------------" ); + sw.WriteLine(";-------------------"); #endregion - + sw.Close(); } - public void tファイルから読み込み( string iniファイル名 ) + public void tファイルから読み込み(string iniファイル名) { this.ConfigIniファイル名 = iniファイル名; - this.bConfigIniが存在している = File.Exists( this.ConfigIniファイル名 ); - if( this.bConfigIniが存在している ) + this.bConfigIniが存在している = File.Exists(this.ConfigIniファイル名); + if (this.bConfigIniが存在している) { string str; this.tキーアサインを全部クリアする(); - using ( StreamReader reader = new StreamReader( this.ConfigIniファイル名, Encoding.GetEncoding( "Shift_JIS" ) ) ) + using (StreamReader reader = new StreamReader(this.ConfigIniファイル名, Encoding.GetEncoding("Shift_JIS"))) { str = reader.ReadToEnd(); } - t文字列から読み込み( str ); - CDTXVersion version = new CDTXVersion( this.strDTXManiaのバージョン ); - if( version.n整数部 <= 69 ) + t文字列から読み込み(str); + CDTXVersion version = new CDTXVersion(this.strDTXManiaのバージョン); + if (version.n整数部 <= 69) { this.tデフォルトのキーアサインに設定する(); } - if ( version.n整数部 < 100 ) // 99以下 → 100の時は、ウインドウサイズをVGA→HDに変更。縦横比変更のため、ウインドウサイズを初期化する。 + if (version.n整数部 < 100) // 99以下 → 100の時は、ウインドウサイズをVGA→HDに変更。縦横比変更のため、ウインドウサイズを初期化する。 { this.nウインドウwidth = 1280; this.nウインドウheight = 720; @@ -2113,76 +2113,76 @@ namespace DTXMania } } - private void t文字列から読み込み( string strAllSettings ) // 2011.4.13 yyagi; refactored to make initial KeyConfig easier. + private void t文字列から読み込み(string strAllSettings) // 2011.4.13 yyagi; refactored to make initial KeyConfig easier. { Eセクション種別 unknown = Eセクション種別.Unknown; string[] delimiter = { "\n" }; - string[] strSingleLine = strAllSettings.Split( delimiter, StringSplitOptions.RemoveEmptyEntries ); - foreach ( string s in strSingleLine ) + string[] strSingleLine = strAllSettings.Split(delimiter, StringSplitOptions.RemoveEmptyEntries); + foreach (string s in strSingleLine) { - string str = s.Replace( '\t', ' ' ).TrimStart( new char[] { '\t', ' ' } ); - if ( ( str.Length != 0 ) && ( str[ 0 ] != ';' ) ) + string str = s.Replace('\t', ' ').TrimStart(new char[] { '\t', ' ' }); + if ((str.Length != 0) && (str[0] != ';')) { try { string str3; string str4; - if ( str[ 0 ] == '[' ) + if (str[0] == '[') { #region [ セクションの変更 ] //----------------------------- - StringBuilder builder = new StringBuilder( 0x20 ); + StringBuilder builder = new StringBuilder(0x20); int num = 1; - while ( ( num < str.Length ) && ( str[ num ] != ']' ) ) + while ((num < str.Length) && (str[num] != ']')) { - builder.Append( str[ num++ ] ); + builder.Append(str[num++]); } string str2 = builder.ToString(); - if ( str2.Equals( "System" ) ) + if (str2.Equals("System")) { unknown = Eセクション種別.System; } - else if ( str2.Equals( "Log" ) ) + else if (str2.Equals("Log")) { unknown = Eセクション種別.Log; } - else if ( str2.Equals( "PlayOption" ) ) + else if (str2.Equals("PlayOption")) { unknown = Eセクション種別.PlayOption; } - else if ( str2.Equals( "ViewerOption" ) ) + else if (str2.Equals("ViewerOption")) { unknown = Eセクション種別.ViewerOption; } - else if ( str2.Equals( "AutoPlay" ) ) + else if (str2.Equals("AutoPlay")) { unknown = Eセクション種別.AutoPlay; } - else if ( str2.Equals( "HitRange" ) ) + else if (str2.Equals("HitRange")) { unknown = Eセクション種別.HitRange; } - else if ( str2.Equals( "GUID" ) ) + else if (str2.Equals("GUID")) { unknown = Eセクション種別.GUID; } - else if ( str2.Equals( "DrumsKeyAssign" ) ) + else if (str2.Equals("DrumsKeyAssign")) { unknown = Eセクション種別.DrumsKeyAssign; } - else if ( str2.Equals( "GuitarKeyAssign" ) ) + else if (str2.Equals("GuitarKeyAssign")) { unknown = Eセクション種別.GuitarKeyAssign; } - else if ( str2.Equals( "BassKeyAssign" ) ) + else if (str2.Equals("BassKeyAssign")) { unknown = Eセクション種別.BassKeyAssign; } - else if ( str2.Equals( "SystemKeyAssign" ) ) + else if (str2.Equals("SystemKeyAssign")) { unknown = Eセクション種別.SystemKeyAssign; } - else if( str2.Equals( "Temp" ) ) + else if (str2.Equals("Temp")) { unknown = Eセクション種別.Temp; } @@ -2195,12 +2195,12 @@ namespace DTXMania } else { - string[] strArray = str.Split( new char[] { '=' } ); - if( strArray.Length == 2 ) + string[] strArray = str.Split(new char[] { '=' }); + if (strArray.Length == 2) { - str3 = strArray[ 0 ].Trim(); - str4 = strArray[ 1 ].Trim(); - switch( unknown ) + str3 = strArray[0].Trim(); + str4 = strArray[1].Trim(); + switch (unknown) { #region [ [System] ] //----------------------------- @@ -2239,98 +2239,98 @@ namespace DTXMania //---------------------------------------- #endif #region [ Version ] - if ( str3.Equals( "Version" ) ) + if (str3.Equals("Version")) { this.strDTXManiaのバージョン = str4; } #endregion #region [ DTXPath ] - else if( str3.Equals( "DTXPath" ) ) + else if (str3.Equals("DTXPath")) { this.str曲データ検索パス = str4; } #endregion #region [ skin関係 ] - else if ( str3.Equals( "SkinPath" ) ) + else if (str3.Equals("SkinPath")) { string absSkinPath = str4; - if ( !System.IO.Path.IsPathRooted( str4 ) ) + if (!System.IO.Path.IsPathRooted(str4)) { - absSkinPath = System.IO.Path.Combine( CDTXMania.app.strEXEのあるフォルダ, "System" ); - absSkinPath = System.IO.Path.Combine( absSkinPath, str4 ); - Uri u = new Uri( absSkinPath ); + absSkinPath = System.IO.Path.Combine(CDTXMania.app.strEXEのあるフォルダ, "System"); + absSkinPath = System.IO.Path.Combine(absSkinPath, str4); + Uri u = new Uri(absSkinPath); absSkinPath = u.AbsolutePath.ToString(); // str4内に相対パスがある場合に備える - absSkinPath = System.Web.HttpUtility.UrlDecode( absSkinPath ); // デコードする - absSkinPath = absSkinPath.Replace( '/', System.IO.Path.DirectorySeparatorChar ); // 区切り文字が\ではなく/なので置換する + absSkinPath = System.Web.HttpUtility.UrlDecode(absSkinPath); // デコードする + absSkinPath = absSkinPath.Replace('/', System.IO.Path.DirectorySeparatorChar); // 区切り文字が\ではなく/なので置換する } - if ( absSkinPath[ absSkinPath.Length - 1 ] != System.IO.Path.DirectorySeparatorChar ) // フォルダ名末尾に\を必ずつけて、CSkin側と表記を統一する + if (absSkinPath[absSkinPath.Length - 1] != System.IO.Path.DirectorySeparatorChar) // フォルダ名末尾に\を必ずつけて、CSkin側と表記を統一する { absSkinPath += System.IO.Path.DirectorySeparatorChar; } this.strSystemSkinSubfolderFullName = absSkinPath; } - else if ( str3.Equals( "SkinChangeByBoxDef" ) ) + else if (str3.Equals("SkinChangeByBoxDef")) { - this.bUseBoxDefSkin = C変換.bONorOFF( str4[ 0 ] ); + this.bUseBoxDefSkin = C変換.bONorOFF(str4[0]); } #endregion #region [ Window関係 ] - else if ( str3.Equals( "FullScreen" ) ) + else if (str3.Equals("FullScreen")) { - this.b全画面モード = C変換.bONorOFF( str4[ 0 ] ); + this.b全画面モード = C変換.bONorOFF(str4[0]); } - else if ( str3.Equals( "WindowX" ) ) // #30675 2013.02.04 ikanick add + else if (str3.Equals("WindowX")) // #30675 2013.02.04 ikanick add { this.n初期ウィンドウ開始位置X = C変換.n値を文字列から取得して範囲内に丸めて返す( - str4, 0, System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width - 1 , this.n初期ウィンドウ開始位置X ); + str4, 0, System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width - 1, this.n初期ウィンドウ開始位置X); } - else if ( str3.Equals( "WindowY" ) ) // #30675 2013.02.04 ikanick add + else if (str3.Equals("WindowY")) // #30675 2013.02.04 ikanick add { this.n初期ウィンドウ開始位置Y = C変換.n値を文字列から取得して範囲内に丸めて返す( - str4, 0, System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height - 1 , this.n初期ウィンドウ開始位置Y ); + str4, 0, System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height - 1, this.n初期ウィンドウ開始位置Y); } - else if ( str3.Equals( "WindowWidth" ) ) // #23510 2010.10.31 yyagi add + else if (str3.Equals("WindowWidth")) // #23510 2010.10.31 yyagi add { - this.nウインドウwidth = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 1, 65535, this.nウインドウwidth ); - if( this.nウインドウwidth <= 0 ) + this.nウインドウwidth = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 1, 65535, this.nウインドウwidth); + if (this.nウインドウwidth <= 0) { this.nウインドウwidth = SampleFramework.GameWindowSize.Width; } } - else if( str3.Equals( "WindowHeight" ) ) // #23510 2010.10.31 yyagi add + else if (str3.Equals("WindowHeight")) // #23510 2010.10.31 yyagi add { - this.nウインドウheight = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 1, 65535, this.nウインドウheight ); - if( this.nウインドウheight <= 0 ) + this.nウインドウheight = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 1, 65535, this.nウインドウheight); + if (this.nウインドウheight <= 0) { this.nウインドウheight = SampleFramework.GameWindowSize.Height; } } - else if ( str3.Equals( "DoubleClickFullScreen" ) ) // #26752 2011.11.27 yyagi + else if (str3.Equals("DoubleClickFullScreen")) // #26752 2011.11.27 yyagi { - this.bIsAllowedDoubleClickFullscreen = C変換.bONorOFF( str4[ 0 ] ); + this.bIsAllowedDoubleClickFullscreen = C変換.bONorOFF(str4[0]); } - else if ( str3.Equals( "EnableSystemMenu" ) ) // #28200 2012.5.1 yyagi + else if (str3.Equals("EnableSystemMenu")) // #28200 2012.5.1 yyagi { - this.bIsEnabledSystemMenu = C変換.bONorOFF( str4[ 0 ] ); + this.bIsEnabledSystemMenu = C変換.bONorOFF(str4[0]); } - else if ( str3.Equals( "BackSleep" ) ) // #23568 2010.11.04 ikanick add + else if (str3.Equals("BackSleep")) // #23568 2010.11.04 ikanick add { - this.n非フォーカス時スリープms = C変換.n値を文字列から取得して範囲内にちゃんと丸めて返す( str4, 0, 50, this.n非フォーカス時スリープms ); + this.n非フォーカス時スリープms = C変換.n値を文字列から取得して範囲内にちゃんと丸めて返す(str4, 0, 50, this.n非フォーカス時スリープms); } #endregion #region [ WASAPI/ASIO関係 ] - else if ( str3.Equals( "SoundDeviceType" ) ) + else if (str3.Equals("SoundDeviceType")) { - this.nSoundDeviceType = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 2, this.nSoundDeviceType ); + this.nSoundDeviceType = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 2, this.nSoundDeviceType); } - else if ( str3.Equals( "WASAPIBufferSizeMs" ) ) + else if (str3.Equals("WASAPIBufferSizeMs")) { - this.nWASAPIBufferSizeMs = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 9999, this.nWASAPIBufferSizeMs ); + this.nWASAPIBufferSizeMs = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 9999, this.nWASAPIBufferSizeMs); } - else if ( str3.Equals( "ASIODevice" ) ) + else if (str3.Equals("ASIODevice")) { string[] asiodev = CEnumerateAllAsioDevices.GetAllASIODevices(); - this.nASIODevice = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, asiodev.Length - 1, this.nASIODevice ); + this.nASIODevice = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, asiodev.Length - 1, this.nASIODevice); } //else if ( str3.Equals( "ASIOBufferSizeMs" ) ) //{ @@ -2340,300 +2340,300 @@ namespace DTXMania //{ // this.bDynamicBassMixerManagement = C変換.bONorOFF( str4[ 0 ] ); //} - else if ( str3.Equals( "SoundTimerType" ) ) // #33689 2014.6.6 yyagi + else if (str3.Equals("SoundTimerType")) // #33689 2014.6.6 yyagi { - this.bUseOSTimer = C変換.bONorOFF( str4[ 0 ] ); + this.bUseOSTimer = C変換.bONorOFF(str4[0]); } - else if ( str3.Equals( "MasterVolume" ) ) + else if (str3.Equals("MasterVolume")) { - this.nMasterVolume = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 100, this.nMasterVolume ); + this.nMasterVolume = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 100, this.nMasterVolume); } #endregion - else if ( str3.Equals( "VSyncWait" ) ) + else if (str3.Equals("VSyncWait")) { - this.b垂直帰線待ちを行う = C変換.bONorOFF( str4[ 0 ] ); + this.b垂直帰線待ちを行う = C変換.bONorOFF(str4[0]); } - else if( str3.Equals( "SleepTimePerFrame" ) ) // #23568 2011.11.27 yyagi + else if (str3.Equals("SleepTimePerFrame")) // #23568 2011.11.27 yyagi { - this.nフレーム毎スリープms = C変換.n値を文字列から取得して範囲内にちゃんと丸めて返す( str4, -1, 50, this.nフレーム毎スリープms ); + this.nフレーム毎スリープms = C変換.n値を文字列から取得して範囲内にちゃんと丸めて返す(str4, -1, 50, this.nフレーム毎スリープms); } #region [ ギター/ベース/ドラム 有効/無効 ] - else if( str3.Equals( "Guitar" ) ) + else if (str3.Equals("Guitar")) { - this.bGuitar有効 = C変換.bONorOFF( str4[ 0 ] ); + this.bGuitar有効 = C変換.bONorOFF(str4[0]); } - else if( str3.Equals( "Drums" ) ) + else if (str3.Equals("Drums")) { - this.bDrums有効 = C変換.bONorOFF( str4[ 0 ] ); + this.bDrums有効 = C変換.bONorOFF(str4[0]); } #endregion - else if( str3.Equals( "BGAlpha" ) ) + else if (str3.Equals("BGAlpha")) { - this.n背景の透過度 = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 0xff, this.n背景の透過度 ); + this.n背景の透過度 = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 0xff, this.n背景の透過度); } - else if( str3.Equals( "DamageLevel" ) ) + else if (str3.Equals("DamageLevel")) { - this.eダメージレベル = (Eダメージレベル) C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 2, (int) this.eダメージレベル ); + this.eダメージレベル = (Eダメージレベル)C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 2, (int)this.eダメージレベル); } - else if ( str3.Equals( "StageFailed" ) ) + else if (str3.Equals("StageFailed")) { - this.bSTAGEFAILED有効 = C変換.bONorOFF( str4[ 0 ] ); + this.bSTAGEFAILED有効 = C変換.bONorOFF(str4[0]); } #region [ 打ち分け関連 ] - else if( str3.Equals( "HHGroup" ) ) + else if (str3.Equals("HHGroup")) { - this.eHHGroup = (EHHGroup) C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 3, (int) this.eHHGroup ); + this.eHHGroup = (EHHGroup)C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 3, (int)this.eHHGroup); } - else if( str3.Equals( "FTGroup" ) ) + else if (str3.Equals("FTGroup")) { - this.eFTGroup = (EFTGroup) C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 2, (int) this.eFTGroup ); + this.eFTGroup = (EFTGroup)C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 2, (int)this.eFTGroup); } - else if( str3.Equals( "CYGroup" ) ) + else if (str3.Equals("CYGroup")) { - this.eCYGroup = (ECYGroup) C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 2, (int) this.eCYGroup ); + this.eCYGroup = (ECYGroup)C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 2, (int)this.eCYGroup); } - else if( str3.Equals( "BDGroup" ) ) // #27029 2012.1.4 from + else if (str3.Equals("BDGroup")) // #27029 2012.1.4 from { - this.eBDGroup = (EBDGroup) C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 2, (int) this.eBDGroup ); + this.eBDGroup = (EBDGroup)C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 2, (int)this.eBDGroup); } - else if( str3.Equals( "HitSoundPriorityHH" ) ) + else if (str3.Equals("HitSoundPriorityHH")) { - this.eHitSoundPriorityHH = (E打ち分け時の再生の優先順位) C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 1, (int) this.eHitSoundPriorityHH ); + this.eHitSoundPriorityHH = (E打ち分け時の再生の優先順位)C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 1, (int)this.eHitSoundPriorityHH); } - else if( str3.Equals( "HitSoundPriorityFT" ) ) + else if (str3.Equals("HitSoundPriorityFT")) { - this.eHitSoundPriorityFT = (E打ち分け時の再生の優先順位) C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 1, (int) this.eHitSoundPriorityFT ); + this.eHitSoundPriorityFT = (E打ち分け時の再生の優先順位)C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 1, (int)this.eHitSoundPriorityFT); } - else if( str3.Equals( "HitSoundPriorityCY" ) ) + else if (str3.Equals("HitSoundPriorityCY")) { - this.eHitSoundPriorityCY = (E打ち分け時の再生の優先順位) C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 1, (int) this.eHitSoundPriorityCY ); + this.eHitSoundPriorityCY = (E打ち分け時の再生の優先順位)C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 1, (int)this.eHitSoundPriorityCY); } - else if ( str3.Equals( "CymbalFree" ) ) + else if (str3.Equals("CymbalFree")) { - this.bシンバルフリー = C変換.bONorOFF( str4[ 0 ] ); + this.bシンバルフリー = C変換.bONorOFF(str4[0]); } #endregion #region [ AVI/BGA ] - else if( str3.Equals( "AVI" ) ) + else if (str3.Equals("AVI")) { - this.bAVI有効 = C変換.bONorOFF( str4[ 0 ] ); + this.bAVI有効 = C変換.bONorOFF(str4[0]); } - else if ( str3.Equals( "ForceAVIFullscreen" ) ) + else if (str3.Equals("ForceAVIFullscreen")) { - this.bForceAVIFullscreen = C変換.bONorOFF( str4[ 0 ] ); + this.bForceAVIFullscreen = C変換.bONorOFF(str4[0]); } - else if ( str3.Equals( "BGA" ) ) + else if (str3.Equals("BGA")) { - this.bBGA有効 = C変換.bONorOFF( str4[ 0 ] ); + this.bBGA有効 = C変換.bONorOFF(str4[0]); } #endregion #region [ フィルイン関係 ] - else if ( str3.Equals( "FillInEffect" ) ) + else if (str3.Equals("FillInEffect")) { - this.bフィルイン有効 = C変換.bONorOFF( str4[ 0 ] ); + this.bフィルイン有効 = C変換.bONorOFF(str4[0]); } - else if ( str3.Equals( "AudienceSound" ) ) + else if (str3.Equals("AudienceSound")) { - this.b歓声を発声する = C変換.bONorOFF( str4[ 0 ] ); + this.b歓声を発声する = C変換.bONorOFF(str4[0]); } #endregion #region [ プレビュー音 ] - else if( str3.Equals( "PreviewSoundWait" ) ) + else if (str3.Equals("PreviewSoundWait")) { - this.n曲が選択されてからプレビュー音が鳴るまでのウェイトms = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 0x5f5e0ff, this.n曲が選択されてからプレビュー音が鳴るまでのウェイトms ); + this.n曲が選択されてからプレビュー音が鳴るまでのウェイトms = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 0x5f5e0ff, this.n曲が選択されてからプレビュー音が鳴るまでのウェイトms); } - else if( str3.Equals( "PreviewImageWait" ) ) + else if (str3.Equals("PreviewImageWait")) { - this.n曲が選択されてからプレビュー画像が表示開始されるまでのウェイトms = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 0x5f5e0ff, this.n曲が選択されてからプレビュー画像が表示開始されるまでのウェイトms ); + this.n曲が選択されてからプレビュー画像が表示開始されるまでのウェイトms = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 0x5f5e0ff, this.n曲が選択されてからプレビュー画像が表示開始されるまでのウェイトms); } #endregion - else if( str3.Equals( "AdjustWaves" ) ) + else if (str3.Equals("AdjustWaves")) { - this.bWave再生位置自動調整機能有効 = C変換.bONorOFF( str4[ 0 ] ); + this.bWave再生位置自動調整機能有効 = C変換.bONorOFF(str4[0]); } #region [ BGM/ドラムのヒット音 ] - else if( str3.Equals( "BGMSound" ) ) + else if (str3.Equals("BGMSound")) { - this.bBGM音を発声する = C変換.bONorOFF( str4[ 0 ] ); + this.bBGM音を発声する = C変換.bONorOFF(str4[0]); } - else if( str3.Equals( "HitSound" ) ) + else if (str3.Equals("HitSound")) { - this.bドラム打音を発声する = C変換.bONorOFF( str4[ 0 ] ); + this.bドラム打音を発声する = C変換.bONorOFF(str4[0]); } #endregion - else if( str3.Equals( "SaveScoreIni" ) ) + else if (str3.Equals("SaveScoreIni")) { - this.bScoreIniを出力する = C変換.bONorOFF( str4[ 0 ] ); + this.bScoreIniを出力する = C変換.bONorOFF(str4[0]); } - else if( str3.Equals( "RandomFromSubBox" ) ) + else if (str3.Equals("RandomFromSubBox")) { - this.bランダムセレクトで子BOXを検索対象とする = C変換.bONorOFF( str4[ 0 ] ); + this.bランダムセレクトで子BOXを検索対象とする = C変換.bONorOFF(str4[0]); } #region [ SoundMonitor ] - else if( str3.Equals( "SoundMonitorDrums" ) ) + else if (str3.Equals("SoundMonitorDrums")) { - this.b演奏音を強調する.Drums = C変換.bONorOFF( str4[ 0 ] ); + this.b演奏音を強調する.Drums = C変換.bONorOFF(str4[0]); } - else if( str3.Equals( "SoundMonitorGuitar" ) ) + else if (str3.Equals("SoundMonitorGuitar")) { - this.b演奏音を強調する.Guitar = C変換.bONorOFF( str4[ 0 ] ); + this.b演奏音を強調する.Guitar = C変換.bONorOFF(str4[0]); } - else if( str3.Equals( "SoundMonitorBass" ) ) + else if (str3.Equals("SoundMonitorBass")) { - this.b演奏音を強調する.Bass = C変換.bONorOFF( str4[ 0 ] ); + this.b演奏音を強調する.Bass = C変換.bONorOFF(str4[0]); } #endregion #region [ コンボ数 ] - else if( str3.Equals( "MinComboDrums" ) ) + else if (str3.Equals("MinComboDrums")) { - this.n表示可能な最小コンボ数.Drums = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 1, 0x1869f, this.n表示可能な最小コンボ数.Drums ); + this.n表示可能な最小コンボ数.Drums = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 1, 0x1869f, this.n表示可能な最小コンボ数.Drums); } - else if( str3.Equals( "MinComboGuitar" ) ) + else if (str3.Equals("MinComboGuitar")) { - this.n表示可能な最小コンボ数.Guitar = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 1, 0x1869f, this.n表示可能な最小コンボ数.Guitar ); + this.n表示可能な最小コンボ数.Guitar = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 1, 0x1869f, this.n表示可能な最小コンボ数.Guitar); } - else if( str3.Equals( "MinComboBass" ) ) + else if (str3.Equals("MinComboBass")) { - this.n表示可能な最小コンボ数.Bass = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 1, 0x1869f, this.n表示可能な最小コンボ数.Bass ); + this.n表示可能な最小コンボ数.Bass = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 1, 0x1869f, this.n表示可能な最小コンボ数.Bass); } #endregion - else if( str3.Equals( "ShowDebugStatus" ) ) + else if (str3.Equals("ShowDebugStatus")) { - this.b演奏情報を表示する = C変換.bONorOFF( str4[ 0 ] ); + this.b演奏情報を表示する = C変換.bONorOFF(str4[0]); } #region [ 選曲リストフォント ] - else if( str3.Equals( "SelectListFontName" ) ) + else if (str3.Equals("SelectListFontName")) { this.str選曲リストフォント = str4; } - else if( str3.Equals( "SelectListFontSize" ) ) + else if (str3.Equals("SelectListFontSize")) { - this.n選曲リストフォントのサイズdot = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 1, 0x3e7, this.n選曲リストフォントのサイズdot ); + this.n選曲リストフォントのサイズdot = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 1, 0x3e7, this.n選曲リストフォントのサイズdot); } - else if( str3.Equals( "SelectListFontItalic" ) ) + else if (str3.Equals("SelectListFontItalic")) { - this.b選曲リストフォントを斜体にする = C変換.bONorOFF( str4[ 0 ] ); + this.b選曲リストフォントを斜体にする = C変換.bONorOFF(str4[0]); } - else if( str3.Equals( "SelectListFontBold" ) ) + else if (str3.Equals("SelectListFontBold")) { - this.b選曲リストフォントを太字にする = C変換.bONorOFF( str4[ 0 ] ); + this.b選曲リストフォントを太字にする = C変換.bONorOFF(str4[0]); } #endregion - else if( str3.Equals( "ChipVolume" ) ) + else if (str3.Equals("ChipVolume")) { - this.n手動再生音量 = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 100, this.n手動再生音量 ); + this.n手動再生音量 = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 100, this.n手動再生音量); } - else if( str3.Equals( "AutoChipVolume" ) ) + else if (str3.Equals("AutoChipVolume")) { - this.n自動再生音量 = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 100, this.n自動再生音量 ); + this.n自動再生音量 = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 100, this.n自動再生音量); } - else if( str3.Equals( "StoicMode" ) ) + else if (str3.Equals("StoicMode")) { - this.bストイックモード = C変換.bONorOFF( str4[ 0 ] ); + this.bストイックモード = C変換.bONorOFF(str4[0]); } - else if( str3.Equals( "ShowLagTime" ) ) // #25370 2011.6.3 yyagi + else if (str3.Equals("ShowLagTime")) // #25370 2011.6.3 yyagi { - this.nShowLagType = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 2, this.nShowLagType ); + this.nShowLagType = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 2, this.nShowLagType); } - else if ( str3.Equals( "JudgeDispPriority" ) ) + else if (str3.Equals("JudgeDispPriority")) { - this.e判定表示優先度 = (E判定表示優先度) C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 1, (int) this.e判定表示優先度 ); + this.e判定表示優先度 = (E判定表示優先度)C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 1, (int)this.e判定表示優先度); } - else if ( str3.Equals( "DrumsLanePosition" ) ) + else if (str3.Equals("DrumsLanePosition")) { - this.eドラムレーン表示位置 = (Eドラムレーン表示位置) C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 1, (int) this.eドラムレーン表示位置 ); + this.eドラムレーン表示位置 = (Eドラムレーン表示位置)C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 1, (int)this.eドラムレーン表示位置); } - else if ( str3.Equals( "AutoResultCapture" ) ) // #25399 2011.6.9 yyagi + else if (str3.Equals("AutoResultCapture")) // #25399 2011.6.9 yyagi { - this.bIsAutoResultCapture = C変換.bONorOFF( str4[ 0 ] ); + this.bIsAutoResultCapture = C変換.bONorOFF(str4[0]); } - else if ( str3.Equals( "TimeStretch" ) ) // #23664 2013.2.24 yyagi + else if (str3.Equals("TimeStretch")) // #23664 2013.2.24 yyagi { - this.bTimeStretch = C変換.bONorOFF( str4[ 0 ] ); + this.bTimeStretch = C変換.bONorOFF(str4[0]); } #region [ AdjustTime ] - else if ( str3.Equals( "InputAdjustTimeDrums" ) ) // #23580 2011.1.3 yyagi + else if (str3.Equals("InputAdjustTimeDrums")) // #23580 2011.1.3 yyagi { - this.nInputAdjustTimeMs.Drums = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, -99, 99, this.nInputAdjustTimeMs.Drums ); + this.nInputAdjustTimeMs.Drums = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, -99, 99, this.nInputAdjustTimeMs.Drums); } - else if ( str3.Equals( "InputAdjustTimeGuitar" ) ) // #23580 2011.1.3 yyagi + else if (str3.Equals("InputAdjustTimeGuitar")) // #23580 2011.1.3 yyagi { - this.nInputAdjustTimeMs.Guitar = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, -99, 99, this.nInputAdjustTimeMs.Guitar ); + this.nInputAdjustTimeMs.Guitar = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, -99, 99, this.nInputAdjustTimeMs.Guitar); } - else if ( str3.Equals( "InputAdjustTimeBass" ) ) // #23580 2011.1.3 yyagi + else if (str3.Equals("InputAdjustTimeBass")) // #23580 2011.1.3 yyagi { - this.nInputAdjustTimeMs.Bass = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, -99, 99, this.nInputAdjustTimeMs.Bass ); + this.nInputAdjustTimeMs.Bass = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, -99, 99, this.nInputAdjustTimeMs.Bass); } - else if ( str3.Equals( "JudgeLinePosOffsetDrums" ) ) // #31602 2013.6.23 yyagi + else if (str3.Equals("JudgeLinePosOffsetDrums")) // #31602 2013.6.23 yyagi { - this.fJudgeLinePosOffsetBase.Drums = C変換.n値を文字列から取得して範囲内にちゃんと丸めて返す( str4, -99, 99, this.nJudgeLinePosOffset.Drums ); + this.fJudgeLinePosOffsetBase.Drums = C変換.n値を文字列から取得して範囲内にちゃんと丸めて返す(str4, -99, 99, this.nJudgeLinePosOffset.Drums); } - else if ( str3.Equals( "JudgeLinePosOffsetGuitar" ) ) // #31602 2013.6.23 yyagi + else if (str3.Equals("JudgeLinePosOffsetGuitar")) // #31602 2013.6.23 yyagi { - this.fJudgeLinePosOffsetBase.Guitar = C変換.n値を文字列から取得して範囲内にちゃんと丸めて返す( str4, -99, 99, this.nJudgeLinePosOffset.Guitar ); + this.fJudgeLinePosOffsetBase.Guitar = C変換.n値を文字列から取得して範囲内にちゃんと丸めて返す(str4, -99, 99, this.nJudgeLinePosOffset.Guitar); } - else if ( str3.Equals( "JudgeLinePosOffsetBass" ) ) // #31602 2013.6.23 yyagi + else if (str3.Equals("JudgeLinePosOffsetBass")) // #31602 2013.6.23 yyagi { - this.fJudgeLinePosOffsetBase.Bass = C変換.n値を文字列から取得して範囲内にちゃんと丸めて返す( str4, -99, 99, this.nJudgeLinePosOffset.Bass ); + this.fJudgeLinePosOffsetBase.Bass = C変換.n値を文字列から取得して範囲内にちゃんと丸めて返す(str4, -99, 99, this.nJudgeLinePosOffset.Bass); } - else if ( str3.Equals( "JudgeLinePosModeGuitar" ) ) // #33891 2014.6.26 yyagi + else if (str3.Equals("JudgeLinePosModeGuitar")) // #33891 2014.6.26 yyagi { - this.e判定位置.Guitar = (E判定位置) C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 2, (int) this.e判定位置.Guitar ); + this.e判定位置.Guitar = (E判定位置)C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 2, (int)this.e判定位置.Guitar); } - else if ( str3.Equals( "JudgeLinePosModeBass" ) ) // #33891 2014.6.26 yyagi + else if (str3.Equals("JudgeLinePosModeBass")) // #33891 2014.6.26 yyagi { - this.e判定位置.Bass = (E判定位置) C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 2, (int) this.e判定位置.Bass ); + this.e判定位置.Bass = (E判定位置)C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 2, (int)this.e判定位置.Bass); } #endregion - else if ( str3.Equals( "BufferedInput" ) ) + else if (str3.Equals("BufferedInput")) { - this.bバッファ入力を行う = C変換.bONorOFF( str4[ 0 ] ); + this.bバッファ入力を行う = C変換.bONorOFF(str4[0]); } - else if ( str3.Equals( "PolyphonicSounds" ) ) // #28228 2012.5.1 yyagi + else if (str3.Equals("PolyphonicSounds")) // #28228 2012.5.1 yyagi { - this.nPoliphonicSounds = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 1, 8, this.nPoliphonicSounds ); + this.nPoliphonicSounds = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 1, 8, this.nPoliphonicSounds); } #region [ VelocityMin ] - else if ( str3.Equals( "LCVelocityMin" ) ) // #23857 2010.12.12 yyagi + else if (str3.Equals("LCVelocityMin")) // #23857 2010.12.12 yyagi { - this.nVelocityMin.LC = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 127, this.nVelocityMin.LC ); + this.nVelocityMin.LC = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 127, this.nVelocityMin.LC); } - else if ( str3.Equals( "HHVelocityMin" ) ) + else if (str3.Equals("HHVelocityMin")) { - this.nVelocityMin.HH = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 127, this.nVelocityMin.HH ); + this.nVelocityMin.HH = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 127, this.nVelocityMin.HH); } - else if ( str3.Equals( "SDVelocityMin" ) ) // #23857 2011.1.31 yyagi + else if (str3.Equals("SDVelocityMin")) // #23857 2011.1.31 yyagi { - this.nVelocityMin.SD = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 127, this.nVelocityMin.SD ); + this.nVelocityMin.SD = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 127, this.nVelocityMin.SD); } - else if ( str3.Equals( "BDVelocityMin" ) ) // #23857 2011.1.31 yyagi + else if (str3.Equals("BDVelocityMin")) // #23857 2011.1.31 yyagi { - this.nVelocityMin.BD = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 127, this.nVelocityMin.BD ); + this.nVelocityMin.BD = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 127, this.nVelocityMin.BD); } - else if ( str3.Equals( "HTVelocityMin" ) ) // #23857 2011.1.31 yyagi + else if (str3.Equals("HTVelocityMin")) // #23857 2011.1.31 yyagi { - this.nVelocityMin.HT = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 127, this.nVelocityMin.HT ); + this.nVelocityMin.HT = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 127, this.nVelocityMin.HT); } - else if ( str3.Equals( "LTVelocityMin" ) ) // #23857 2011.1.31 yyagi + else if (str3.Equals("LTVelocityMin")) // #23857 2011.1.31 yyagi { - this.nVelocityMin.LT = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 127, this.nVelocityMin.LT ); + this.nVelocityMin.LT = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 127, this.nVelocityMin.LT); } - else if ( str3.Equals( "FTVelocityMin" ) ) // #23857 2011.1.31 yyagi + else if (str3.Equals("FTVelocityMin")) // #23857 2011.1.31 yyagi { - this.nVelocityMin.FT = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 127, this.nVelocityMin.FT ); + this.nVelocityMin.FT = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 127, this.nVelocityMin.FT); } - else if ( str3.Equals( "CYVelocityMin" ) ) // #23857 2011.1.31 yyagi + else if (str3.Equals("CYVelocityMin")) // #23857 2011.1.31 yyagi { - this.nVelocityMin.CY = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 127, this.nVelocityMin.CY ); + this.nVelocityMin.CY = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 127, this.nVelocityMin.CY); } - else if ( str3.Equals( "RDVelocityMin" ) ) // #23857 2011.1.31 yyagi + else if (str3.Equals("RDVelocityMin")) // #23857 2011.1.31 yyagi { - this.nVelocityMin.RD = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 127, this.nVelocityMin.RD ); + this.nVelocityMin.RD = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 127, this.nVelocityMin.RD); } #endregion - else if ( str3.Equals( "Loadsoundspeed" ) ) + else if (str3.Equals("Loadsoundspeed")) { - this.b曲読み込みを高速化する = C変換.bONorOFF( str4[ 0 ] ); + this.b曲読み込みを高速化する = C変換.bONorOFF(str4[0]); } //else if ( str3.Equals( "NoMP3Streaming" ) ) //{ @@ -2648,21 +2648,21 @@ namespace DTXMania //----------------------------- case Eセクション種別.Log: { - if( str3.Equals( "OutputLog" ) ) + if (str3.Equals("OutputLog")) { - this.bログ出力 = C変換.bONorOFF( str4[ 0 ] ); + this.bログ出力 = C変換.bONorOFF(str4[0]); } - else if( str3.Equals( "TraceCreatedDisposed" ) ) + else if (str3.Equals("TraceCreatedDisposed")) { - this.bLog作成解放ログ出力 = C変換.bONorOFF( str4[ 0 ] ); + this.bLog作成解放ログ出力 = C変換.bONorOFF(str4[0]); } - else if( str3.Equals( "TraceDTXDetails" ) ) + else if (str3.Equals("TraceDTXDetails")) { - this.bLogDTX詳細ログ出力 = C変換.bONorOFF( str4[ 0 ] ); + this.bLogDTX詳細ログ出力 = C変換.bONorOFF(str4[0]); } - else if( str3.Equals( "TraceSongSearch" ) ) + else if (str3.Equals("TraceSongSearch")) { - this.bLog曲検索ログ出力 = C変換.bONorOFF( str4[ 0 ] ); + this.bLog曲検索ログ出力 = C変換.bONorOFF(str4[0]); } continue; } @@ -2673,79 +2673,79 @@ namespace DTXMania //----------------------------- case Eセクション種別.PlayOption: { - if( str3.Equals( "Dark" ) ) - { - this.eDark = (Eダークモード) C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 2, (int) this.eDark ); - } - else if( str3.Equals( "DrumsGraph" ) ) // #24074 2011.01.23 addikanick - { - this.bGraph.Drums = C変換.bONorOFF( str4[ 0 ] ); - } - else if (str3.Equals("DrumAutoGhost")) // #35411 2015.08.18 chnmr0 add - { - this.eAutoGhost.Drums = (EAutoGhostData)C変換.n値を文字列から取得して返す(str4, 0); - } - else if (str3.Equals("GuitarAutoGhost")) // #35411 2015.08.18 chnmr0 add - { - this.eAutoGhost.Guitar = (EAutoGhostData)C変換.n値を文字列から取得して返す(str4, 0); - } - else if (str3.Equals("BassAutoGhost")) // #35411 2015.08.18 chnmr0 add - { - this.eAutoGhost.Bass = (EAutoGhostData)C変換.n値を文字列から取得して返す(str4, 0); - } - else if (str3.Equals("DrumTargetGhost")) // #35411 2015.08.18 chnmr0 add - { - this.eTargetGhost.Drums = (ETargetGhostData)C変換.n値を文字列から取得して返す(str4, 0); - } - else if (str3.Equals("GuitarTargetGhost")) // #35411 2015.08.18 chnmr0 add - { - this.eTargetGhost.Guitar = (ETargetGhostData)C変換.n値を文字列から取得して返す(str4, 0); - } - else if (str3.Equals("BassTargetGhost")) // #35411 2015.08.18 chnmr0 add - { - this.eTargetGhost.Bass = (ETargetGhostData)C変換.n値を文字列から取得して返す(str4, 0); - } + if (str3.Equals("Dark")) + { + this.eDark = (Eダークモード)C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 2, (int)this.eDark); + } + else if (str3.Equals("DrumsGraph")) // #24074 2011.01.23 addikanick + { + this.bGraph.Drums = C変換.bONorOFF(str4[0]); + } + else if (str3.Equals("DrumAutoGhost")) // #35411 2015.08.18 chnmr0 add + { + this.eAutoGhost.Drums = (EAutoGhostData)C変換.n値を文字列から取得して返す(str4, 0); + } + else if (str3.Equals("GuitarAutoGhost")) // #35411 2015.08.18 chnmr0 add + { + this.eAutoGhost.Guitar = (EAutoGhostData)C変換.n値を文字列から取得して返す(str4, 0); + } + else if (str3.Equals("BassAutoGhost")) // #35411 2015.08.18 chnmr0 add + { + this.eAutoGhost.Bass = (EAutoGhostData)C変換.n値を文字列から取得して返す(str4, 0); + } + else if (str3.Equals("DrumTargetGhost")) // #35411 2015.08.18 chnmr0 add + { + this.eTargetGhost.Drums = (ETargetGhostData)C変換.n値を文字列から取得して返す(str4, 0); + } + else if (str3.Equals("GuitarTargetGhost")) // #35411 2015.08.18 chnmr0 add + { + this.eTargetGhost.Guitar = (ETargetGhostData)C変換.n値を文字列から取得して返す(str4, 0); + } + else if (str3.Equals("BassTargetGhost")) // #35411 2015.08.18 chnmr0 add + { + this.eTargetGhost.Bass = (ETargetGhostData)C変換.n値を文字列から取得して返す(str4, 0); + } #region [ Sudden ] - else if( str3.Equals( "DrumsSudden" ) ) + else if (str3.Equals("DrumsSudden")) { - this.bSudden.Drums = C変換.bONorOFF( str4[ 0 ] ); + this.bSudden.Drums = C変換.bONorOFF(str4[0]); } - else if( str3.Equals( "GuitarSudden" ) ) + else if (str3.Equals("GuitarSudden")) { - this.bSudden.Guitar = C変換.bONorOFF( str4[ 0 ] ); + this.bSudden.Guitar = C変換.bONorOFF(str4[0]); } - else if( str3.Equals( "BassSudden" ) ) + else if (str3.Equals("BassSudden")) { - this.bSudden.Bass = C変換.bONorOFF( str4[ 0 ] ); + this.bSudden.Bass = C変換.bONorOFF(str4[0]); } #endregion #region [ Hidden ] - else if( str3.Equals( "DrumsHidden" ) ) + else if (str3.Equals("DrumsHidden")) { - this.bHidden.Drums = C変換.bONorOFF( str4[ 0 ] ); + this.bHidden.Drums = C変換.bONorOFF(str4[0]); } - else if( str3.Equals( "GuitarHidden" ) ) + else if (str3.Equals("GuitarHidden")) { - this.bHidden.Guitar = C変換.bONorOFF( str4[ 0 ] ); + this.bHidden.Guitar = C変換.bONorOFF(str4[0]); } - else if( str3.Equals( "BassHidden" ) ) + else if (str3.Equals("BassHidden")) { - this.bHidden.Bass = C変換.bONorOFF( str4[ 0 ] ); + this.bHidden.Bass = C変換.bONorOFF(str4[0]); } #endregion #region [ Invisible ] - else if ( str3.Equals( "DrumsInvisible" ) ) + else if (str3.Equals("DrumsInvisible")) { - this.eInvisible.Drums = (EInvisible) C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 2, (int) this.eInvisible.Drums ); + this.eInvisible.Drums = (EInvisible)C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 2, (int)this.eInvisible.Drums); } - else if ( str3.Equals( "GuitarInvisible" ) ) + else if (str3.Equals("GuitarInvisible")) { - this.eInvisible.Guitar = (EInvisible) C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 2, (int) this.eInvisible.Guitar ); + this.eInvisible.Guitar = (EInvisible)C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 2, (int)this.eInvisible.Guitar); } - else if ( str3.Equals( "BassInvisible" ) ) + else if (str3.Equals("BassInvisible")) { - this.eInvisible.Bass = (EInvisible) C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 2, (int) this.eInvisible.Bass ); + this.eInvisible.Bass = (EInvisible)C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 2, (int)this.eInvisible.Bass); } //else if ( str3.Equals( "InvisibleDisplayTimeMs" ) ) //{ @@ -2756,73 +2756,73 @@ namespace DTXMania // this.nFadeoutTimeMs = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 9999999, (int) this.nFadeoutTimeMs ); //} #endregion - else if ( str3.Equals( "DrumsReverse" ) ) + else if (str3.Equals("DrumsReverse")) { - this.bReverse.Drums = C変換.bONorOFF( str4[ 0 ] ); + this.bReverse.Drums = C変換.bONorOFF(str4[0]); } - else if( str3.Equals( "GuitarReverse" ) ) + else if (str3.Equals("GuitarReverse")) { - this.bReverse.Guitar = C変換.bONorOFF( str4[ 0 ] ); + this.bReverse.Guitar = C変換.bONorOFF(str4[0]); } - else if( str3.Equals( "BassReverse" ) ) + else if (str3.Equals("BassReverse")) { - this.bReverse.Bass = C変換.bONorOFF( str4[ 0 ] ); + this.bReverse.Bass = C変換.bONorOFF(str4[0]); } - else if( str3.Equals( "GuitarRandom" ) ) + else if (str3.Equals("GuitarRandom")) { - this.eRandom.Guitar = (Eランダムモード) C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 3, (int) this.eRandom.Guitar ); + this.eRandom.Guitar = (Eランダムモード)C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 3, (int)this.eRandom.Guitar); } - else if( str3.Equals( "BassRandom" ) ) + else if (str3.Equals("BassRandom")) { - this.eRandom.Bass = (Eランダムモード) C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 3, (int) this.eRandom.Bass ); + this.eRandom.Bass = (Eランダムモード)C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 3, (int)this.eRandom.Bass); } - else if( str3.Equals( "GuitarLight" ) ) + else if (str3.Equals("GuitarLight")) { - this.bLight.Guitar = C変換.bONorOFF( str4[ 0 ] ); + this.bLight.Guitar = C変換.bONorOFF(str4[0]); } - else if( str3.Equals( "BassLight" ) ) + else if (str3.Equals("BassLight")) { - this.bLight.Bass = C変換.bONorOFF( str4[ 0 ] ); + this.bLight.Bass = C変換.bONorOFF(str4[0]); } - else if( str3.Equals( "GuitarLeft" ) ) + else if (str3.Equals("GuitarLeft")) { - this.bLeft.Guitar = C変換.bONorOFF( str4[ 0 ] ); + this.bLeft.Guitar = C変換.bONorOFF(str4[0]); } - else if( str3.Equals( "BassLeft" ) ) + else if (str3.Equals("BassLeft")) { - this.bLeft.Bass = C変換.bONorOFF( str4[ 0 ] ); + this.bLeft.Bass = C変換.bONorOFF(str4[0]); } - else if( str3.Equals( "DrumsPosition" ) ) + else if (str3.Equals("DrumsPosition")) { - this.判定文字表示位置.Drums = (E判定文字表示位置) C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 2, (int) this.判定文字表示位置.Drums ); + this.判定文字表示位置.Drums = (E判定文字表示位置)C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 2, (int)this.判定文字表示位置.Drums); } - else if( str3.Equals( "GuitarPosition" ) ) + else if (str3.Equals("GuitarPosition")) { - this.判定文字表示位置.Guitar = (E判定文字表示位置) C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 3, (int) this.判定文字表示位置.Guitar ); + this.判定文字表示位置.Guitar = (E判定文字表示位置)C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 3, (int)this.判定文字表示位置.Guitar); } - else if( str3.Equals( "BassPosition" ) ) + else if (str3.Equals("BassPosition")) { - this.判定文字表示位置.Bass = (E判定文字表示位置) C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 3, (int) this.判定文字表示位置.Bass ); + this.判定文字表示位置.Bass = (E判定文字表示位置)C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 3, (int)this.判定文字表示位置.Bass); } - else if( str3.Equals( "DrumsScrollSpeed" ) ) + else if (str3.Equals("DrumsScrollSpeed")) { - this.n譜面スクロール速度.Drums = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 0x7cf, this.n譜面スクロール速度.Drums ); + this.n譜面スクロール速度.Drums = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 0x7cf, this.n譜面スクロール速度.Drums); } - else if( str3.Equals( "GuitarScrollSpeed" ) ) + else if (str3.Equals("GuitarScrollSpeed")) { - this.n譜面スクロール速度.Guitar = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 0x7cf, this.n譜面スクロール速度.Guitar ); + this.n譜面スクロール速度.Guitar = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 0x7cf, this.n譜面スクロール速度.Guitar); } - else if( str3.Equals( "BassScrollSpeed" ) ) + else if (str3.Equals("BassScrollSpeed")) { - this.n譜面スクロール速度.Bass = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 0x7cf, this.n譜面スクロール速度.Bass ); + this.n譜面スクロール速度.Bass = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 0x7cf, this.n譜面スクロール速度.Bass); } - else if( str3.Equals( "PlaySpeed" ) ) + else if (str3.Equals("PlaySpeed")) { - this.n演奏速度 = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 5, 40, this.n演奏速度 ); + this.n演奏速度 = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 5, 40, this.n演奏速度); } - else if( str3.Equals( "ComboPosition" ) ) + else if (str3.Equals("ComboPosition")) { - this.ドラムコンボ文字の表示位置 = (Eドラムコンボ文字の表示位置) C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 3, (int) this.ドラムコンボ文字の表示位置 ); + this.ドラムコンボ文字の表示位置 = (Eドラムコンボ文字の表示位置)C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 3, (int)this.ドラムコンボ文字の表示位置); } //else if ( str3.Equals( "JudgeDispPriorityDrums" ) ) //{ @@ -2836,13 +2836,13 @@ namespace DTXMania //{ // this.e判定表示優先度.Bass = (E判定表示優先度) C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 1, (int) this.e判定表示優先度.Bass ); //} - else if ( str3.Equals( "Risky" ) ) // #23559 2011.6.23 yyagi + else if (str3.Equals("Risky")) // #23559 2011.6.23 yyagi { - this.nRisky = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 10, this.nRisky ); + this.nRisky = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 10, this.nRisky); } - else if ( str3.Equals( "DrumsTight" ) ) // #29500 2012.9.11 kairera0467 + else if (str3.Equals("DrumsTight")) // #29500 2012.9.11 kairera0467 { - this.bTight = C変換.bONorOFF( str4[ 0 ] ); + this.bTight = C変換.bONorOFF(str4[0]); } continue; } @@ -2853,54 +2853,54 @@ namespace DTXMania //----------------------------- case Eセクション種別.ViewerOption: { - if ( str3.Equals( "ViewerDrumsScrollSpeed" ) ) + if (str3.Equals("ViewerDrumsScrollSpeed")) { - this.nViewerScrollSpeed.Drums = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 1999, this.nViewerScrollSpeed.Drums ); + this.nViewerScrollSpeed.Drums = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 1999, this.nViewerScrollSpeed.Drums); } - else if ( str3.Equals( "ViewerGuitarScrollSpeed" ) ) + else if (str3.Equals("ViewerGuitarScrollSpeed")) { - this.nViewerScrollSpeed.Guitar = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 1999, this.nViewerScrollSpeed.Guitar ); + this.nViewerScrollSpeed.Guitar = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 1999, this.nViewerScrollSpeed.Guitar); } - else if ( str3.Equals( "ViewerBassScrollSpeed" ) ) + else if (str3.Equals("ViewerBassScrollSpeed")) { - this.nViewerScrollSpeed.Bass = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 1999, this.nViewerScrollSpeed.Bass ); + this.nViewerScrollSpeed.Bass = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 1999, this.nViewerScrollSpeed.Bass); } - else if ( str3.Equals( "ViewerVSyncWait" ) ) + else if (str3.Equals("ViewerVSyncWait")) { - this.bViewerVSyncWait = C変換.bONorOFF( str4[ 0 ] ); + this.bViewerVSyncWait = C変換.bONorOFF(str4[0]); } - else if ( str3.Equals( "ViewerShowDebugStatus" ) ) + else if (str3.Equals("ViewerShowDebugStatus")) { - this.bViewerShowDebugStatus = C変換.bONorOFF( str4[ 0 ] ); + this.bViewerShowDebugStatus = C変換.bONorOFF(str4[0]); } - else if ( str3.Equals( "ViewerTimeStretch" ) ) + else if (str3.Equals("ViewerTimeStretch")) { - this.bViewerTimeStretch = C変換.bONorOFF( str4[ 0 ] ); + this.bViewerTimeStretch = C変換.bONorOFF(str4[0]); } - else if ( str3.Equals( "ViewerGuitar" ) ) + else if (str3.Equals("ViewerGuitar")) { - this.bViewerGuitar有効 = C変換.bONorOFF( str4[ 0 ] ); + this.bViewerGuitar有効 = C変換.bONorOFF(str4[0]); } - else if ( str3.Equals( "ViewerDrums" ) ) + else if (str3.Equals("ViewerDrums")) { - this.bViewerDrums有効 = C変換.bONorOFF( str4[ 0 ] ); + this.bViewerDrums有効 = C変換.bONorOFF(str4[0]); } - else if ( str3.Equals( "ViewerWindowWidth" ) ) + else if (str3.Equals("ViewerWindowWidth")) { - this.nViewerウインドウwidth = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 65535, this.nViewerウインドウwidth ); + this.nViewerウインドウwidth = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 65535, this.nViewerウインドウwidth); } - else if ( str3.Equals( "ViewerWindowHeight" ) ) + else if (str3.Equals("ViewerWindowHeight")) { - this.nViewerウインドウheight = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 65535, this.nViewerウインドウheight ); + this.nViewerウインドウheight = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 65535, this.nViewerウインドウheight); } - else if ( str3.Equals( "ViewerWindowX" ) ) + else if (str3.Equals("ViewerWindowX")) { - this.nViewer初期ウィンドウ開始位置X = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 65535, this.nViewer初期ウィンドウ開始位置X ); + this.nViewer初期ウィンドウ開始位置X = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 65535, this.nViewer初期ウィンドウ開始位置X); } - else if ( str3.Equals( "ViewerWindowY" ) ) + else if (str3.Equals("ViewerWindowY")) { - this.nViewer初期ウィンドウ開始位置Y = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 65535, this.nViewer初期ウィンドウ開始位置Y ); + this.nViewer初期ウィンドウ開始位置Y = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 65535, this.nViewer初期ウィンドウ開始位置Y); } continue; } @@ -2910,85 +2910,85 @@ namespace DTXMania #region [ [AutoPlay] ] //----------------------------- case Eセクション種別.AutoPlay: - if( str3.Equals( "LC" ) ) + if (str3.Equals("LC")) { - this.bAutoPlay.LC = C変換.bONorOFF( str4[ 0 ] ); + this.bAutoPlay.LC = C変換.bONorOFF(str4[0]); } - if( str3.Equals( "HH" ) ) + if (str3.Equals("HH")) { - this.bAutoPlay.HH = C変換.bONorOFF( str4[ 0 ] ); + this.bAutoPlay.HH = C変換.bONorOFF(str4[0]); } - else if( str3.Equals( "SD" ) ) + else if (str3.Equals("SD")) { - this.bAutoPlay.SD = C変換.bONorOFF( str4[ 0 ] ); + this.bAutoPlay.SD = C変換.bONorOFF(str4[0]); } - else if( str3.Equals( "BD" ) ) + else if (str3.Equals("BD")) { - this.bAutoPlay.BD = C変換.bONorOFF( str4[ 0 ] ); + this.bAutoPlay.BD = C変換.bONorOFF(str4[0]); } - else if( str3.Equals( "HT" ) ) + else if (str3.Equals("HT")) { - this.bAutoPlay.HT = C変換.bONorOFF( str4[ 0 ] ); + this.bAutoPlay.HT = C変換.bONorOFF(str4[0]); } - else if( str3.Equals( "LT" ) ) + else if (str3.Equals("LT")) { - this.bAutoPlay.LT = C変換.bONorOFF( str4[ 0 ] ); + this.bAutoPlay.LT = C変換.bONorOFF(str4[0]); } - else if( str3.Equals( "FT" ) ) + else if (str3.Equals("FT")) { - this.bAutoPlay.FT = C変換.bONorOFF( str4[ 0 ] ); + this.bAutoPlay.FT = C変換.bONorOFF(str4[0]); } - else if( str3.Equals( "CY" ) ) + else if (str3.Equals("CY")) { - this.bAutoPlay.CY = C変換.bONorOFF( str4[ 0 ] ); + this.bAutoPlay.CY = C変換.bONorOFF(str4[0]); } //else if( str3.Equals( "Guitar" ) ) //{ // this.bAutoPlay.Guitar = C変換.bONorOFF( str4[ 0 ] ); //} - else if ( str3.Equals( "GuitarR" ) ) + else if (str3.Equals("GuitarR")) { - this.bAutoPlay.GtR = C変換.bONorOFF( str4[ 0 ] ); + this.bAutoPlay.GtR = C変換.bONorOFF(str4[0]); } - else if ( str3.Equals( "GuitarG" ) ) + else if (str3.Equals("GuitarG")) { - this.bAutoPlay.GtG = C変換.bONorOFF( str4[ 0 ] ); + this.bAutoPlay.GtG = C変換.bONorOFF(str4[0]); } - else if ( str3.Equals( "GuitarB" ) ) + else if (str3.Equals("GuitarB")) { - this.bAutoPlay.GtB = C変換.bONorOFF( str4[ 0 ] ); + this.bAutoPlay.GtB = C変換.bONorOFF(str4[0]); } - else if ( str3.Equals( "GuitarPick" ) ) + else if (str3.Equals("GuitarPick")) { - this.bAutoPlay.GtPick = C変換.bONorOFF( str4[ 0 ] ); + this.bAutoPlay.GtPick = C変換.bONorOFF(str4[0]); } - else if ( str3.Equals( "GuitarWailing" ) ) + else if (str3.Equals("GuitarWailing")) { - this.bAutoPlay.GtW = C変換.bONorOFF( str4[ 0 ] ); + this.bAutoPlay.GtW = C変換.bONorOFF(str4[0]); } //else if ( str3.Equals( "Bass" ) ) //{ // this.bAutoPlay.Bass = C変換.bONorOFF( str4[ 0 ] ); //} - else if ( str3.Equals( "BassR" ) ) + else if (str3.Equals("BassR")) { - this.bAutoPlay.BsR = C変換.bONorOFF( str4[ 0 ] ); + this.bAutoPlay.BsR = C変換.bONorOFF(str4[0]); } - else if ( str3.Equals( "BassG" ) ) + else if (str3.Equals("BassG")) { - this.bAutoPlay.BsG = C変換.bONorOFF( str4[ 0 ] ); + this.bAutoPlay.BsG = C変換.bONorOFF(str4[0]); } - else if ( str3.Equals( "BassB" ) ) + else if (str3.Equals("BassB")) { - this.bAutoPlay.BsB = C変換.bONorOFF( str4[ 0 ] ); + this.bAutoPlay.BsB = C変換.bONorOFF(str4[0]); } - else if ( str3.Equals( "BassPick" ) ) + else if (str3.Equals("BassPick")) { - this.bAutoPlay.BsPick = C変換.bONorOFF( str4[ 0 ] ); + this.bAutoPlay.BsPick = C変換.bONorOFF(str4[0]); } - else if ( str3.Equals( "BassWailing" ) ) + else if (str3.Equals("BassWailing")) { - this.bAutoPlay.BsW = C変換.bONorOFF( str4[ 0 ] ); + this.bAutoPlay.BsW = C変換.bONorOFF(str4[0]); } continue; //----------------------------- @@ -2997,21 +2997,21 @@ namespace DTXMania #region [ [HitRange] ] //----------------------------- case Eセクション種別.HitRange: - if( str3.Equals( "Perfect" ) ) + if (str3.Equals("Perfect")) { - this.nヒット範囲ms.Perfect = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 0x3e7, this.nヒット範囲ms.Perfect ); - } - else if( str3.Equals( "Great" ) ) + this.nヒット範囲ms.Perfect = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 0x3e7, this.nヒット範囲ms.Perfect); + } + else if (str3.Equals("Great")) { - this.nヒット範囲ms.Great = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 0x3e7, this.nヒット範囲ms.Great ); + this.nヒット範囲ms.Great = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 0x3e7, this.nヒット範囲ms.Great); } - else if( str3.Equals( "Good" ) ) + else if (str3.Equals("Good")) { - this.nヒット範囲ms.Good = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 0x3e7, this.nヒット範囲ms.Good ); + this.nヒット範囲ms.Good = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 0x3e7, this.nヒット範囲ms.Good); } - else if( str3.Equals( "Poor" ) ) + else if (str3.Equals("Poor")) { - this.nヒット範囲ms.Poor = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 0x3e7, this.nヒット範囲ms.Poor ); + this.nヒット範囲ms.Poor = C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 0x3e7, this.nヒット範囲ms.Poor); } continue; //----------------------------- @@ -3020,9 +3020,9 @@ namespace DTXMania #region [ [GUID] ] //----------------------------- case Eセクション種別.GUID: - if( str3.Equals( "JoystickID" ) ) + if (str3.Equals("JoystickID")) { - this.tJoystickIDの取得( str4 ); + this.tJoystickIDの取得(str4); } continue; //----------------------------- @@ -3032,49 +3032,49 @@ namespace DTXMania //----------------------------- case Eセクション種別.DrumsKeyAssign: { - if( str3.Equals( "HH" ) ) + if (str3.Equals("HH")) { - this.tキーの読み出しと設定( str4, this.KeyAssign.Drums.HH ); + this.tキーの読み出しと設定(str4, this.KeyAssign.Drums.HH); } - else if( str3.Equals( "SD" ) ) + else if (str3.Equals("SD")) { - this.tキーの読み出しと設定( str4, this.KeyAssign.Drums.SD ); + this.tキーの読み出しと設定(str4, this.KeyAssign.Drums.SD); } - else if( str3.Equals( "BD" ) ) + else if (str3.Equals("BD")) { - this.tキーの読み出しと設定( str4, this.KeyAssign.Drums.BD ); + this.tキーの読み出しと設定(str4, this.KeyAssign.Drums.BD); } - else if( str3.Equals( "HT" ) ) + else if (str3.Equals("HT")) { - this.tキーの読み出しと設定( str4, this.KeyAssign.Drums.HT ); + this.tキーの読み出しと設定(str4, this.KeyAssign.Drums.HT); } - else if( str3.Equals( "LT" ) ) + else if (str3.Equals("LT")) { - this.tキーの読み出しと設定( str4, this.KeyAssign.Drums.LT ); + this.tキーの読み出しと設定(str4, this.KeyAssign.Drums.LT); } - else if( str3.Equals( "FT" ) ) + else if (str3.Equals("FT")) { - this.tキーの読み出しと設定( str4, this.KeyAssign.Drums.FT ); + this.tキーの読み出しと設定(str4, this.KeyAssign.Drums.FT); } - else if( str3.Equals( "CY" ) ) + else if (str3.Equals("CY")) { - this.tキーの読み出しと設定( str4, this.KeyAssign.Drums.CY ); + this.tキーの読み出しと設定(str4, this.KeyAssign.Drums.CY); } - else if( str3.Equals( "HO" ) ) + else if (str3.Equals("HO")) { - this.tキーの読み出しと設定( str4, this.KeyAssign.Drums.HHO ); + this.tキーの読み出しと設定(str4, this.KeyAssign.Drums.HHO); } - else if( str3.Equals( "RD" ) ) + else if (str3.Equals("RD")) { - this.tキーの読み出しと設定( str4, this.KeyAssign.Drums.RD ); + this.tキーの読み出しと設定(str4, this.KeyAssign.Drums.RD); } - else if( str3.Equals( "LC" ) ) + else if (str3.Equals("LC")) { - this.tキーの読み出しと設定( str4, this.KeyAssign.Drums.LC ); + this.tキーの読み出しと設定(str4, this.KeyAssign.Drums.LC); } - else if( str3.Equals( "HP" ) ) // #27029 2012.1.4 from + else if (str3.Equals("HP")) // #27029 2012.1.4 from { // - this.tキーの読み出しと設定( str4, this.KeyAssign.Drums.HP ); // + this.tキーの読み出しと設定(str4, this.KeyAssign.Drums.HP); // } // continue; } @@ -3085,33 +3085,33 @@ namespace DTXMania //----------------------------- case Eセクション種別.GuitarKeyAssign: { - if( str3.Equals( "R" ) ) + if (str3.Equals("R")) { - this.tキーの読み出しと設定( str4, this.KeyAssign.Guitar.R ); + this.tキーの読み出しと設定(str4, this.KeyAssign.Guitar.R); } - else if( str3.Equals( "G" ) ) + else if (str3.Equals("G")) { - this.tキーの読み出しと設定( str4, this.KeyAssign.Guitar.G ); + this.tキーの読み出しと設定(str4, this.KeyAssign.Guitar.G); } - else if( str3.Equals( "B" ) ) + else if (str3.Equals("B")) { - this.tキーの読み出しと設定( str4, this.KeyAssign.Guitar.B ); + this.tキーの読み出しと設定(str4, this.KeyAssign.Guitar.B); } - else if( str3.Equals( "Pick" ) ) + else if (str3.Equals("Pick")) { - this.tキーの読み出しと設定( str4, this.KeyAssign.Guitar.Pick ); + this.tキーの読み出しと設定(str4, this.KeyAssign.Guitar.Pick); } - else if( str3.Equals( "Wail" ) ) + else if (str3.Equals("Wail")) { - this.tキーの読み出しと設定( str4, this.KeyAssign.Guitar.Wail ); + this.tキーの読み出しと設定(str4, this.KeyAssign.Guitar.Wail); } - else if( str3.Equals( "Decide" ) ) + else if (str3.Equals("Decide")) { - this.tキーの読み出しと設定( str4, this.KeyAssign.Guitar.Decide ); + this.tキーの読み出しと設定(str4, this.KeyAssign.Guitar.Decide); } - else if( str3.Equals( "Cancel" ) ) + else if (str3.Equals("Cancel")) { - this.tキーの読み出しと設定( str4, this.KeyAssign.Guitar.Cancel ); + this.tキーの読み出しと設定(str4, this.KeyAssign.Guitar.Cancel); } continue; } @@ -3121,33 +3121,33 @@ namespace DTXMania #region [ [BassKeyAssign] ] //----------------------------- case Eセクション種別.BassKeyAssign: - if( str3.Equals( "R" ) ) + if (str3.Equals("R")) { - this.tキーの読み出しと設定( str4, this.KeyAssign.Bass.R ); + this.tキーの読み出しと設定(str4, this.KeyAssign.Bass.R); } - else if( str3.Equals( "G" ) ) + else if (str3.Equals("G")) { - this.tキーの読み出しと設定( str4, this.KeyAssign.Bass.G ); + this.tキーの読み出しと設定(str4, this.KeyAssign.Bass.G); } - else if( str3.Equals( "B" ) ) + else if (str3.Equals("B")) { - this.tキーの読み出しと設定( str4, this.KeyAssign.Bass.B ); + this.tキーの読み出しと設定(str4, this.KeyAssign.Bass.B); } - else if( str3.Equals( "Pick" ) ) + else if (str3.Equals("Pick")) { - this.tキーの読み出しと設定( str4, this.KeyAssign.Bass.Pick ); + this.tキーの読み出しと設定(str4, this.KeyAssign.Bass.Pick); } - else if( str3.Equals( "Wail" ) ) + else if (str3.Equals("Wail")) { - this.tキーの読み出しと設定( str4, this.KeyAssign.Bass.Wail ); + this.tキーの読み出しと設定(str4, this.KeyAssign.Bass.Wail); } - else if( str3.Equals( "Decide" ) ) + else if (str3.Equals("Decide")) { - this.tキーの読み出しと設定( str4, this.KeyAssign.Bass.Decide ); + this.tキーの読み出しと設定(str4, this.KeyAssign.Bass.Decide); } - else if( str3.Equals( "Cancel" ) ) + else if (str3.Equals("Cancel")) { - this.tキーの読み出しと設定( str4, this.KeyAssign.Bass.Cancel ); + this.tキーの読み出しと設定(str4, this.KeyAssign.Bass.Cancel); } continue; //----------------------------- @@ -3156,9 +3156,9 @@ namespace DTXMania #region [ [SystemKeyAssign] ] //----------------------------- case Eセクション種別.SystemKeyAssign: - if( str3.Equals( "Capture" ) ) + if (str3.Equals("Capture")) { - this.tキーの読み出しと設定( str4, this.KeyAssign.System.Capture ); + this.tキーの読み出しと設定(str4, this.KeyAssign.System.Capture); } continue; //----------------------------- @@ -3167,15 +3167,15 @@ namespace DTXMania #region [ [Temp] ] //----------------------------- case Eセクション種別.Temp: // #27029 2012.1.5 from - if( str3.Equals( "BackupOf1BD_HHGroup" ) ) + if (str3.Equals("BackupOf1BD_HHGroup")) { - if( this.BackupOf1BD == null ) this.BackupOf1BD = new CBackupOf1BD(); - this.BackupOf1BD.eHHGroup = (EHHGroup) C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 3, (int) this.BackupOf1BD.eHHGroup ); + if (this.BackupOf1BD == null) this.BackupOf1BD = new CBackupOf1BD(); + this.BackupOf1BD.eHHGroup = (EHHGroup)C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 3, (int)this.BackupOf1BD.eHHGroup); } - else if( str3.Equals( "BackupOf1BD_HitSoundPriorityHH" ) ) + else if (str3.Equals("BackupOf1BD_HitSoundPriorityHH")) { - if( this.BackupOf1BD == null ) this.BackupOf1BD = new CBackupOf1BD(); - this.BackupOf1BD.eHitSoundPriorityHH = (E打ち分け時の再生の優先順位) C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 3, (int) this.BackupOf1BD.eHitSoundPriorityHH ); + if (this.BackupOf1BD == null) this.BackupOf1BD = new CBackupOf1BD(); + this.BackupOf1BD.eHitSoundPriorityHH = (E打ち分け時の再生の優先順位)C変換.n値を文字列から取得して範囲内に丸めて返す(str4, 0, 3, (int)this.BackupOf1BD.eHitSoundPriorityHH); } continue; //----------------------------- @@ -3185,17 +3185,17 @@ namespace DTXMania } continue; } - catch ( Exception exception ) + catch (Exception exception) { - Trace.TraceError( exception.Message ); + Trace.TraceError(exception.Message); continue; } } } - for (int i = 0; i < 3; i++ ) + for (int i = 0; i < 3; i++) { - nJudgeLinePosOffset[ i ] = (int) ( fJudgeLinePosOffsetBase[ i ] * ( this.n譜面スクロール速度[ i ] + 1 ) ); + nJudgeLinePosOffset[i] = (int)(fJudgeLinePosOffsetBase[i] * (this.n譜面スクロール速度[i] + 1)); } } @@ -3244,85 +3244,85 @@ namespace DTXMania private bool bConfigIniが存在している; private string ConfigIniファイル名; - private void tJoystickIDの取得( string strキー記述 ) + private void tJoystickIDの取得(string strキー記述) { - string[] strArray = strキー記述.Split( new char[] { ',' } ); - if( strArray.Length >= 2 ) + string[] strArray = strキー記述.Split(new char[] { ',' }); + if (strArray.Length >= 2) { int result = 0; - if( ( int.TryParse( strArray[ 0 ], out result ) && ( result >= 0 ) ) && ( result <= 9 ) ) + if ((int.TryParse(strArray[0], out result) && (result >= 0)) && (result <= 9)) { - if( this.dicJoystick.ContainsKey( result ) ) + if (this.dicJoystick.ContainsKey(result)) { - this.dicJoystick.Remove( result ); + this.dicJoystick.Remove(result); } - this.dicJoystick.Add( result, strArray[ 1 ] ); + this.dicJoystick.Add(result, strArray[1]); } } } private void tキーアサインを全部クリアする() { this.KeyAssign = new CKeyAssign(); - for( int i = 0; i <= (int)EKeyConfigPart.SYSTEM; i++ ) + for (int i = 0; i <= (int)EKeyConfigPart.SYSTEM; i++) { - for( int j = 0; j <= (int)EKeyConfigPad.Capture; j++ ) + for (int j = 0; j <= (int)EKeyConfigPad.Capture; j++) { - this.KeyAssign[ i ][ j ] = new CKeyAssign.STKEYASSIGN[ 16 ]; - for( int k = 0; k < 16; k++ ) + this.KeyAssign[i][j] = new CKeyAssign.STKEYASSIGN[16]; + for (int k = 0; k < 16; k++) { - this.KeyAssign[ i ][ j ][ k ] = new CKeyAssign.STKEYASSIGN( E入力デバイス.不明, 0, 0 ); + this.KeyAssign[i][j][k] = new CKeyAssign.STKEYASSIGN(E入力デバイス.不明, 0, 0); } } } } - private void tキーの書き出し( StreamWriter sw, CKeyAssign.STKEYASSIGN[] assign ) + private void tキーの書き出し(StreamWriter sw, CKeyAssign.STKEYASSIGN[] assign) { bool flag = true; - for( int i = 0; i < 0x10; i++ ) + for (int i = 0; i < 0x10; i++) { - if( assign[ i ].入力デバイス == E入力デバイス.不明 ) + if (assign[i].入力デバイス == E入力デバイス.不明) { continue; } - if( !flag ) + if (!flag) { - sw.Write( ',' ); + sw.Write(','); } flag = false; - switch( assign[ i ].入力デバイス ) + switch (assign[i].入力デバイス) { case E入力デバイス.キーボード: - sw.Write( 'K' ); + sw.Write('K'); break; case E入力デバイス.MIDI入力: - sw.Write( 'M' ); + sw.Write('M'); break; case E入力デバイス.ジョイパッド: - sw.Write( 'J' ); + sw.Write('J'); break; case E入力デバイス.マウス: - sw.Write( 'N' ); + sw.Write('N'); break; } - sw.Write( "{0}{1}", "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".Substring( assign[ i ].ID, 1 ), assign[ i ].コード ); // #24166 2011.1.15 yyagi: to support ID > 10, change 2nd character from Decimal to 36-numeral system. (e.g. J1023 -> JA23) + sw.Write("{0}{1}", "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".Substring(assign[i].ID, 1), assign[i].コード); // #24166 2011.1.15 yyagi: to support ID > 10, change 2nd character from Decimal to 36-numeral system. (e.g. J1023 -> JA23) } } - private void tキーの読み出しと設定( string strキー記述, CKeyAssign.STKEYASSIGN[] assign ) + private void tキーの読み出しと設定(string strキー記述, CKeyAssign.STKEYASSIGN[] assign) { - string[] strArray = strキー記述.Split( new char[] { ',' } ); - for( int i = 0; ( i < strArray.Length ) && ( i < 0x10 ); i++ ) + string[] strArray = strキー記述.Split(new char[] { ',' }); + for (int i = 0; (i < strArray.Length) && (i < 0x10); i++) { E入力デバイス e入力デバイス; int id; int code; - string str = strArray[ i ].Trim().ToUpper(); - if ( str.Length >= 3 ) + string str = strArray[i].Trim().ToUpper(); + if (str.Length >= 3) { e入力デバイス = E入力デバイス.不明; - switch ( str[ 0 ] ) + switch (str[0]) { case 'J': e入力デバイス = E入力デバイス.ジョイパッド; @@ -3348,13 +3348,13 @@ namespace DTXMania { continue; } - id = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".IndexOf( str[ 1 ] ); // #24166 2011.1.15 yyagi: to support ID > 10, change 2nd character from Decimal to 36-numeral system. (e.g. J1023 -> JA23) - if( ( ( id >= 0 ) && int.TryParse( str.Substring( 2 ), out code ) ) && ( ( code >= 0 ) && ( code <= 0xff ) ) ) + id = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".IndexOf(str[1]); // #24166 2011.1.15 yyagi: to support ID > 10, change 2nd character from Decimal to 36-numeral system. (e.g. J1023 -> JA23) + if (((id >= 0) && int.TryParse(str.Substring(2), out code)) && ((code >= 0) && (code <= 0xff))) { - this.t指定した入力が既にアサイン済みである場合はそれを全削除する( e入力デバイス, id, code ); - assign[ i ].入力デバイス = e入力デバイス; - assign[ i ].ID = id; - assign[ i ].コード = code; + this.t指定した入力が既にアサイン済みである場合はそれを全削除する(e入力デバイス, id, code); + assign[i].入力デバイス = e入力デバイス; + assign[i].ID = id; + assign[i].コード = code; } } } @@ -3400,9 +3400,9 @@ Cancel=K097 [SystemKeyAssign] Capture=K065 "; - t文字列から読み込み( strDefaultKeyAssign ); + t文字列から読み込み(strDefaultKeyAssign); } //----------------- #endregion - } + } } diff --git a/DTXManiaプロジェクト/コード/全体/CDTXVersion.cs b/DTXManiaプロジェクト/コード/全体/CDTXVersion.cs index 4d8fc953..e7a22922 100644 --- a/DTXManiaプロジェクト/コード/全体/CDTXVersion.cs +++ b/DTXManiaプロジェクト/コード/全体/CDTXVersion.cs @@ -9,7 +9,7 @@ namespace DTXMania /// 例1:"078b" → 整数部=078, 小数部=2000000 ('英字'+'yymmdd') /// 例2:"078a(100124)" → 整数部=078, 小数部=1100124 ('英字'+'yymmdd') /// - public class CDTXVersion + public class CDTXVersion { // プロパティ @@ -46,19 +46,19 @@ namespace DTXMania this.n小数部 = 0; this.Unknown = true; } - public CDTXVersion( int n整数部 ) + public CDTXVersion(int n整数部) { this.n整数部 = n整数部; this.n小数部 = 0; this.Unknown = false; } - public CDTXVersion( string Version ) + public CDTXVersion(string Version) { this.n整数部 = 0; this.n小数部 = 0; this.Unknown = true; - - if( Version.ToLower().Equals( "unknown" ) ) + + if (Version.ToLower().Equals("unknown")) { this.Unknown = true; } @@ -66,23 +66,23 @@ namespace DTXMania { int num = 0; int length = Version.Length; - if( ( num < length ) && char.IsDigit( Version[ num ] ) ) + if ((num < length) && char.IsDigit(Version[num])) { // 整数部 取得 - while( ( num < length ) && char.IsDigit( Version[ num ] ) ) + while ((num < length) && char.IsDigit(Version[num])) { - this.n整数部 = ( this.n整数部 * 10 ) + CDTXVersion.DIG10.IndexOf( Version[ num++ ] ); + this.n整数部 = (this.n整数部 * 10) + CDTXVersion.DIG10.IndexOf(Version[num++]); } // 小数部(1)英字部分 取得 - while( ( num < length ) && ( ( Version[ num ] == ' ' ) || ( Version[ num ] == '(' ) ) ) + while ((num < length) && ((Version[num] == ' ') || (Version[num] == '('))) { num++; } - if( ( num < length ) && ( CDTXVersion.DIG36.IndexOf( Version[ num ] ) >= 10 ) ) + if ((num < length) && (CDTXVersion.DIG36.IndexOf(Version[num]) >= 10)) { - this.n小数部 = CDTXVersion.DIG36.IndexOf( Version[ num++ ] ) - 10; - if( this.n小数部 >= 0x1a ) + this.n小数部 = CDTXVersion.DIG36.IndexOf(Version[num++]) - 10; + if (this.n小数部 >= 0x1a) { this.n小数部 -= 0x1a; } @@ -90,16 +90,16 @@ namespace DTXMania } // 小数部(2)日付部分(yymmdd) 取得 - while( ( num < length ) && ( ( Version[ num ] == ' ' ) || ( Version[ num ] == '(' ) ) ) + while ((num < length) && ((Version[num] == ' ') || (Version[num] == '('))) { num++; } - for( int i = 0; i < 6; i++ ) + for (int i = 0; i < 6; i++) { this.n小数部 *= 10; - if( ( num < length ) && char.IsDigit( Version[ num ] ) ) + if ((num < length) && char.IsDigit(Version[num])) { - this.n小数部 += CDTXVersion.DIG10.IndexOf( Version[ num ] ); + this.n小数部 += CDTXVersion.DIG10.IndexOf(Version[num]); } num++; } @@ -111,69 +111,69 @@ namespace DTXMania } } } - public CDTXVersion( int n整数部, int n小数部 ) + public CDTXVersion(int n整数部, int n小数部) { this.n整数部 = n整数部; this.n小数部 = n小数部; this.Unknown = false; } - + // メソッド - + public string toString() { - var result = new StringBuilder( 32 ); + var result = new StringBuilder(32); // 整数部 - result.Append( this.n整数部.ToString( "000" ) ); + result.Append(this.n整数部.ToString("000")); // 英字部分(あれば) - if( this.n小数部 >= 1000000 ) + if (this.n小数部 >= 1000000) { - int n英字 = Math.Min( this.n小数部 / 1000000, 26 ); // 1~26 - result.Append( CDTXVersion.DIG36[ 10 + ( n英字 - 1 ) ] ); + int n英字 = Math.Min(this.n小数部 / 1000000, 26); // 1~26 + result.Append(CDTXVersion.DIG36[10 + (n英字 - 1)]); } // 日付部分(あれば) int n日付 = this.n小数部 % 1000000; - if( n日付 > 0 ) + if (n日付 > 0) { - result.Append( '(' ); - result.Append( n日付.ToString( "000000" ) ); - result.Append( ')' ); + result.Append('('); + result.Append(n日付.ToString("000000")); + result.Append(')'); } return result.ToString(); } - public static bool operator ==( CDTXVersion x, CDTXVersion y ) + public static bool operator ==(CDTXVersion x, CDTXVersion y) { - return ( ( ( x.n整数部 == y.n整数部 ) && ( x.n小数部 == y.n小数部 ) ) && ( x.Unknown == y.Unknown ) ); + return (((x.n整数部 == y.n整数部) && (x.n小数部 == y.n小数部)) && (x.Unknown == y.Unknown)); } - public static bool operator >( CDTXVersion x, CDTXVersion y ) + public static bool operator >(CDTXVersion x, CDTXVersion y) { - return ( ( x.n整数部 > y.n整数部 ) || ( ( x.n整数部 == y.n整数部 ) && ( x.n小数部 > y.n小数部 ) ) ); + return ((x.n整数部 > y.n整数部) || ((x.n整数部 == y.n整数部) && (x.n小数部 > y.n小数部))); } - public static bool operator >=( CDTXVersion x, CDTXVersion y ) + public static bool operator >=(CDTXVersion x, CDTXVersion y) { - return ( ( x.n整数部 > y.n整数部 ) || ( ( x.n整数部 == y.n整数部 ) && ( x.n小数部 >= y.n小数部 ) ) ); + return ((x.n整数部 > y.n整数部) || ((x.n整数部 == y.n整数部) && (x.n小数部 >= y.n小数部))); } - public static bool operator !=( CDTXVersion x, CDTXVersion y ) + public static bool operator !=(CDTXVersion x, CDTXVersion y) { - if( ( x.n整数部 == y.n整数部 ) && ( x.n小数部 == y.n小数部 ) ) + if ((x.n整数部 == y.n整数部) && (x.n小数部 == y.n小数部)) { - return ( x.Unknown != y.Unknown ); + return (x.Unknown != y.Unknown); } return true; } - public static bool operator <( CDTXVersion x, CDTXVersion y ) + public static bool operator <(CDTXVersion x, CDTXVersion y) { - return ( ( x.n整数部 < y.n整数部 ) || ( ( x.n整数部 == y.n整数部 ) && ( x.n小数部 < y.n小数部 ) ) ); + return ((x.n整数部 < y.n整数部) || ((x.n整数部 == y.n整数部) && (x.n小数部 < y.n小数部))); } - public static bool operator <=( CDTXVersion x, CDTXVersion y ) + public static bool operator <=(CDTXVersion x, CDTXVersion y) { - return ( ( x.n整数部 < y.n整数部 ) || ( ( x.n整数部 == y.n整数部 ) && ( x.n小数部 <= y.n小数部 ) ) ); + return ((x.n整数部 < y.n整数部) || ((x.n整数部 == y.n整数部) && (x.n小数部 <= y.n小数部))); } public override bool Equals(object obj) // 2011.1.3 yyagi: warningを無くすために追加 { diff --git a/DTXManiaプロジェクト/コード/全体/CPad.cs b/DTXManiaプロジェクト/コード/全体/CPad.cs index d5ebeecb..57ad093c 100644 --- a/DTXManiaプロジェクト/コード/全体/CPad.cs +++ b/DTXManiaプロジェクト/コード/全体/CPad.cs @@ -6,12 +6,12 @@ using FDK; namespace DTXMania { - public class CPad + public class CPad { // プロパティ internal STHIT st検知したデバイス; - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] internal struct STHIT { public bool Keyboard; @@ -30,7 +30,7 @@ namespace DTXMania // コンストラクタ - internal CPad( CConfigIni configIni, CInput管理 mgrInput ) + internal CPad(CConfigIni configIni, CInput管理 mgrInput) { this.rConfigIni = configIni; this.rInput管理 = mgrInput; @@ -40,50 +40,50 @@ namespace DTXMania // メソッド - public List GetEvents( E楽器パート part, Eパッド pad ) + public List GetEvents(E楽器パート part, Eパッド pad) { - CConfigIni.CKeyAssign.STKEYASSIGN[] stkeyassignArray = this.rConfigIni.KeyAssign[ (int) part ][ (int) pad ]; + CConfigIni.CKeyAssign.STKEYASSIGN[] stkeyassignArray = this.rConfigIni.KeyAssign[(int)part][(int)pad]; List list = new List(); // すべての入力デバイスについて… - foreach( IInputDevice device in this.rInput管理.list入力デバイス ) + foreach (IInputDevice device in this.rInput管理.list入力デバイス) { - if( ( device.list入力イベント != null ) && ( device.list入力イベント.Count != 0 ) ) + if ((device.list入力イベント != null) && (device.list入力イベント.Count != 0)) { - foreach( STInputEvent event2 in device.list入力イベント ) + foreach (STInputEvent event2 in device.list入力イベント) { - for( int i = 0; i < stkeyassignArray.Length; i++ ) + for (int i = 0; i < stkeyassignArray.Length; i++) { - switch( stkeyassignArray[ i ].入力デバイス ) + switch (stkeyassignArray[i].入力デバイス) { case E入力デバイス.キーボード: - if( ( device.e入力デバイス種別 == E入力デバイス種別.Keyboard ) && ( event2.nKey == stkeyassignArray[ i ].コード ) ) + if ((device.e入力デバイス種別 == E入力デバイス種別.Keyboard) && (event2.nKey == stkeyassignArray[i].コード)) { - list.Add( event2 ); + list.Add(event2); this.st検知したデバイス.Keyboard = true; } break; case E入力デバイス.MIDI入力: - if( ( ( device.e入力デバイス種別 == E入力デバイス種別.MidiIn ) && ( device.ID == stkeyassignArray[ i ].ID ) ) && ( event2.nKey == stkeyassignArray[ i ].コード ) ) + if (((device.e入力デバイス種別 == E入力デバイス種別.MidiIn) && (device.ID == stkeyassignArray[i].ID)) && (event2.nKey == stkeyassignArray[i].コード)) { - list.Add( event2 ); + list.Add(event2); this.st検知したデバイス.MIDIIN = true; } break; case E入力デバイス.ジョイパッド: - if( ( ( device.e入力デバイス種別 == E入力デバイス種別.Joystick ) && ( device.ID == stkeyassignArray[ i ].ID ) ) && ( event2.nKey == stkeyassignArray[ i ].コード ) ) + if (((device.e入力デバイス種別 == E入力デバイス種別.Joystick) && (device.ID == stkeyassignArray[i].ID)) && (event2.nKey == stkeyassignArray[i].コード)) { - list.Add( event2 ); + list.Add(event2); this.st検知したデバイス.Joypad = true; } break; case E入力デバイス.マウス: - if( ( device.e入力デバイス種別 == E入力デバイス種別.Mouse ) && ( event2.nKey == stkeyassignArray[ i ].コード ) ) + if ((device.e入力デバイス種別 == E入力デバイス種別.Mouse) && (event2.nKey == stkeyassignArray[i].コード)) { - list.Add( event2 ); + list.Add(event2); this.st検知したデバイス.Mouse = true; } break; @@ -95,18 +95,18 @@ namespace DTXMania } return list; } - public bool b押された( E楽器パート part, Eパッド pad ) + public bool b押された(E楽器パート part, Eパッド pad) { - if( part != E楽器パート.UNKNOWN ) + if (part != E楽器パート.UNKNOWN) { - - CConfigIni.CKeyAssign.STKEYASSIGN[] stkeyassignArray = this.rConfigIni.KeyAssign[ (int) part ][ (int) pad ]; - for( int i = 0; i < stkeyassignArray.Length; i++ ) + + CConfigIni.CKeyAssign.STKEYASSIGN[] stkeyassignArray = this.rConfigIni.KeyAssign[(int)part][(int)pad]; + for (int i = 0; i < stkeyassignArray.Length; i++) { - switch( stkeyassignArray[ i ].入力デバイス ) + switch (stkeyassignArray[i].入力デバイス) { case E入力デバイス.キーボード: - if( !this.rInput管理.Keyboard.bキーが押された( stkeyassignArray[ i ].コード ) ) + if (!this.rInput管理.Keyboard.bキーが押された(stkeyassignArray[i].コード)) break; this.st検知したデバイス.Keyboard = true; @@ -114,8 +114,8 @@ namespace DTXMania case E入力デバイス.MIDI入力: { - IInputDevice device2 = this.rInput管理.MidiIn( stkeyassignArray[ i ].ID ); - if( ( device2 == null ) || !device2.bキーが押された( stkeyassignArray[ i ].コード ) ) + IInputDevice device2 = this.rInput管理.MidiIn(stkeyassignArray[i].ID); + if ((device2 == null) || !device2.bキーが押された(stkeyassignArray[i].コード)) break; this.st検知したデバイス.MIDIIN = true; @@ -123,18 +123,18 @@ namespace DTXMania } case E入力デバイス.ジョイパッド: { - if( !this.rConfigIni.dicJoystick.ContainsKey( stkeyassignArray[ i ].ID ) ) + if (!this.rConfigIni.dicJoystick.ContainsKey(stkeyassignArray[i].ID)) break; - IInputDevice device = this.rInput管理.Joystick( stkeyassignArray[ i ].ID ); - if( ( device == null ) || !device.bキーが押された( stkeyassignArray[ i ].コード ) ) + IInputDevice device = this.rInput管理.Joystick(stkeyassignArray[i].ID); + if ((device == null) || !device.bキーが押された(stkeyassignArray[i].コード)) break; this.st検知したデバイス.Joypad = true; return true; } case E入力デバイス.マウス: - if( !this.rInput管理.Mouse.bキーが押された( stkeyassignArray[ i ].コード ) ) + if (!this.rInput管理.Mouse.bキーが押された(stkeyassignArray[i].コード)) break; this.st検知したデバイス.Mouse = true; @@ -144,33 +144,33 @@ namespace DTXMania } return false; } - public bool b押されたDGB( Eパッド pad ) + public bool b押されたDGB(Eパッド pad) { - if( !this.b押された( E楽器パート.DRUMS, pad ) && !this.b押された( E楽器パート.GUITAR, pad ) ) + if (!this.b押された(E楽器パート.DRUMS, pad) && !this.b押された(E楽器パート.GUITAR, pad)) { - return this.b押された( E楽器パート.BASS, pad ); + return this.b押された(E楽器パート.BASS, pad); } return true; } - public bool b押されたGB( Eパッド pad ) + public bool b押されたGB(Eパッド pad) { - if( !this.b押された( E楽器パート.GUITAR, pad ) ) + if (!this.b押された(E楽器パート.GUITAR, pad)) { - return this.b押された( E楽器パート.BASS, pad ); + return this.b押された(E楽器パート.BASS, pad); } return true; } - public bool b押されている( E楽器パート part, Eパッド pad ) + public bool b押されている(E楽器パート part, Eパッド pad) { - if( part != E楽器パート.UNKNOWN ) + if (part != E楽器パート.UNKNOWN) { - CConfigIni.CKeyAssign.STKEYASSIGN[] stkeyassignArray = this.rConfigIni.KeyAssign[ (int) part ][ (int) pad ]; - for( int i = 0; i < stkeyassignArray.Length; i++ ) + CConfigIni.CKeyAssign.STKEYASSIGN[] stkeyassignArray = this.rConfigIni.KeyAssign[(int)part][(int)pad]; + for (int i = 0; i < stkeyassignArray.Length; i++) { - switch( stkeyassignArray[ i ].入力デバイス ) + switch (stkeyassignArray[i].入力デバイス) { case E入力デバイス.キーボード: - if( !this.rInput管理.Keyboard.bキーが押されている( stkeyassignArray[ i ].コード ) ) + if (!this.rInput管理.Keyboard.bキーが押されている(stkeyassignArray[i].コード)) { break; } @@ -179,12 +179,12 @@ namespace DTXMania case E入力デバイス.ジョイパッド: { - if( !this.rConfigIni.dicJoystick.ContainsKey( stkeyassignArray[ i ].ID ) ) + if (!this.rConfigIni.dicJoystick.ContainsKey(stkeyassignArray[i].ID)) { break; } - IInputDevice device = this.rInput管理.Joystick( stkeyassignArray[ i ].ID ); - if( ( device == null ) || !device.bキーが押されている( stkeyassignArray[ i ].コード ) ) + IInputDevice device = this.rInput管理.Joystick(stkeyassignArray[i].ID); + if ((device == null) || !device.bキーが押されている(stkeyassignArray[i].コード)) { break; } @@ -192,7 +192,7 @@ namespace DTXMania return true; } case E入力デバイス.マウス: - if( !this.rInput管理.Mouse.bキーが押されている( stkeyassignArray[ i ].コード ) ) + if (!this.rInput管理.Mouse.bキーが押されている(stkeyassignArray[i].コード)) { break; } @@ -203,11 +203,11 @@ namespace DTXMania } return false; } - public bool b押されているGB( Eパッド pad ) + public bool b押されているGB(Eパッド pad) { - if( !this.b押されている( E楽器パート.GUITAR, pad ) ) + if (!this.b押されている(E楽器パート.GUITAR, pad)) { - return this.b押されている( E楽器パート.BASS, pad ); + return this.b押されている(E楽器パート.BASS, pad); } return true; } diff --git a/DTXManiaプロジェクト/コード/全体/CPreviewMagnifier.cs b/DTXManiaプロジェクト/コード/全体/CPreviewMagnifier.cs index ecf65876..73d44e1e 100644 --- a/DTXManiaプロジェクト/コード/全体/CPreviewMagnifier.cs +++ b/DTXManiaプロジェクト/コード/全体/CPreviewMagnifier.cs @@ -33,14 +33,14 @@ namespace DTXMania #region [ 定数定義 ] // 配列の0,1要素はそれぞれ, Preview用, 演奏画面用 - private int[] WIDTH_VGA_SET = { 204, 278 }; // VGA版DTXManiaのプレビュー画像width値 - private int[] HEIGHT_VGA_SET = { 269, 355 }; // VGA版DTXManiaのプレビュー画像height値 - private int[] WIDTH_HD_SET = { 400, 400 }; // HD版DTXManiaのプレビュー画像width値 - private int[] HEIGHT_HD_SET = { 400, 600 }; // 600は仮 // HD版DTXManiaのプレビュー画像height値 - private int[] WIDTH_FHD_LIMIT = { 320, 320 }; // VGA版/FullHD版どちらのプレビュー画像とみなすかのwidth閾値 - private int[] HEIGHT_FHD_LIMIT = { 416, 416 }; // VGA版/FullHD版どちらのプレビュー画像とみなすかのwidth閾値 - private int[] WIDTH_FHD_SET = { (int) ( 204 * Scale.X ), (int) ( 278 * Scale.X ) }; // FHD版DTXManiaのプレビュー画像height値 - private int[] HEIGHT_FHD_SET = { (int) ( 269 * Scale.Y ), (int) ( 355 * Scale.Y ) }; // FHD版DTXManiaのプレビュー画像height値 + private int[] WIDTH_VGA_SET = { 204, 278 }; // VGA版DTXManiaのプレビュー画像width値 + private int[] HEIGHT_VGA_SET = { 269, 355 }; // VGA版DTXManiaのプレビュー画像height値 + private int[] WIDTH_HD_SET = { 400, 400 }; // HD版DTXManiaのプレビュー画像width値 + private int[] HEIGHT_HD_SET = { 400, 600 }; // 600は仮 // HD版DTXManiaのプレビュー画像height値 + private int[] WIDTH_FHD_LIMIT = { 320, 320 }; // VGA版/FullHD版どちらのプレビュー画像とみなすかのwidth閾値 + private int[] HEIGHT_FHD_LIMIT = { 416, 416 }; // VGA版/FullHD版どちらのプレビュー画像とみなすかのwidth閾値 + private int[] WIDTH_FHD_SET = { (int)(204 * Scale.X), (int)(278 * Scale.X) }; // FHD版DTXManiaのプレビュー画像height値 + private int[] HEIGHT_FHD_SET = { (int)(269 * Scale.Y), (int)(355 * Scale.Y) }; // FHD版DTXManiaのプレビュー画像height値 #endregion #region [ コンストラクタ ] @@ -61,16 +61,16 @@ namespace DTXMania /// 元の拡大率(高さ) /// 選曲画面(preview)用か、演奏画面用か /// 出力はプロパティで得てください。 - public void GetMagnifier( int width_org, int height_org, float magX_org, float magY_org, bool bIsPreview) + public void GetMagnifier(int width_org, int height_org, float magX_org, float magY_org, bool bIsPreview) { this.bIsPreview = bIsPreview; - // #35820 画像サイズに関係なく、プレビュー領域に合わせる add ikanick 15.12.08 - this.width = width_fhd_set; - this.height = height_fhd_set; - this.magX = magX_org * width_vga_set / width_org * Scale.X; - this.magY = magY_org * height_vga_set / height_org * Scale.Y; - return; + // #35820 画像サイズに関係なく、プレビュー領域に合わせる add ikanick 15.12.08 + this.width = width_fhd_set; + this.height = height_fhd_set; + this.magX = magX_org * width_vga_set / width_org * Scale.X; + this.magY = magY_org * height_vga_set / height_org * Scale.Y; + return; #if false // FHD対応の名残 #region [ HD版DTXManiaのプレビュー画像は特別扱いする ] @@ -137,56 +137,56 @@ namespace DTXMania { get { - return bIsPreview? WIDTH_VGA_SET[ 0 ] : WIDTH_VGA_SET[ 1 ]; + return bIsPreview ? WIDTH_VGA_SET[0] : WIDTH_VGA_SET[1]; } } private int height_vga_set { get { - return bIsPreview? HEIGHT_VGA_SET[ 0 ] : HEIGHT_VGA_SET[ 1 ]; + return bIsPreview ? HEIGHT_VGA_SET[0] : HEIGHT_VGA_SET[1]; } } private int width_hd_set { get { - return bIsPreview? WIDTH_HD_SET[ 0 ] : WIDTH_HD_SET[1]; + return bIsPreview ? WIDTH_HD_SET[0] : WIDTH_HD_SET[1]; } } private int height_hd_set { get { - return bIsPreview? HEIGHT_HD_SET[ 0 ] : HEIGHT_HD_SET[ 1 ]; + return bIsPreview ? HEIGHT_HD_SET[0] : HEIGHT_HD_SET[1]; } } private int width_fhd_limit { get { - return bIsPreview? WIDTH_FHD_LIMIT[ 0 ] : WIDTH_FHD_LIMIT[ 1 ]; + return bIsPreview ? WIDTH_FHD_LIMIT[0] : WIDTH_FHD_LIMIT[1]; } } private int height_fhd_limit { get { - return bIsPreview? HEIGHT_FHD_LIMIT[ 0 ] : HEIGHT_FHD_LIMIT[ 1 ]; + return bIsPreview ? HEIGHT_FHD_LIMIT[0] : HEIGHT_FHD_LIMIT[1]; } } private int width_fhd_set { get { - return bIsPreview ? WIDTH_FHD_SET[ 0 ] : WIDTH_FHD_SET[ 1 ]; + return bIsPreview ? WIDTH_FHD_SET[0] : WIDTH_FHD_SET[1]; } } private int height_fhd_set { get { - return bIsPreview ? HEIGHT_FHD_SET[ 0 ] : HEIGHT_FHD_SET[ 1 ]; + return bIsPreview ? HEIGHT_FHD_SET[0] : HEIGHT_FHD_SET[1]; } } #endregion diff --git a/DTXManiaプロジェクト/コード/全体/CPrivateFastFont.cs b/DTXManiaプロジェクト/コード/全体/CPrivateFastFont.cs index 12fe7d1c..71ff69ea 100644 --- a/DTXManiaプロジェクト/コード/全体/CPrivateFastFont.cs +++ b/DTXManiaプロジェクト/コード/全体/CPrivateFastFont.cs @@ -36,21 +36,21 @@ namespace DTXMania #region [ コンストラクタ ] - public CPrivateFastFont( FontFamily fontfamily, int pt, FontStyle style ) + public CPrivateFastFont(FontFamily fontfamily, int pt, FontStyle style) { - Initialize( null, fontfamily, pt, style ); + Initialize(null, fontfamily, pt, style); } - public CPrivateFastFont( FontFamily fontfamily, int pt ) + public CPrivateFastFont(FontFamily fontfamily, int pt) { - Initialize( null, fontfamily, pt, FontStyle.Regular ); + Initialize(null, fontfamily, pt, FontStyle.Regular); } - public CPrivateFastFont( string fontpath, int pt, FontStyle style ) + public CPrivateFastFont(string fontpath, int pt, FontStyle style) { - Initialize( fontpath, null, pt, style ); + Initialize(fontpath, null, pt, style); } - public CPrivateFastFont( string fontpath, int pt ) + public CPrivateFastFont(string fontpath, int pt) { - Initialize( fontpath, null, pt, FontStyle.Regular ); + Initialize(fontpath, null, pt, FontStyle.Regular); } public CPrivateFastFont() { @@ -58,11 +58,11 @@ namespace DTXMania } #endregion #region [ コンストラクタから呼ばれる初期化処理 ] - protected new void Initialize( string fontpath, FontFamily fontfamily, int pt, FontStyle style ) + protected new void Initialize(string fontpath, FontFamily fontfamily, int pt, FontStyle style) { this.bDispose完了済み_CPrivateFastFont = false; this.listFontCache = new List(); - base.Initialize( fontpath, fontfamily, pt, style ); + base.Initialize(fontpath, fontfamily, pt, style); } #endregion @@ -74,9 +74,9 @@ namespace DTXMania /// 描画文字列 /// 描画色 /// 描画済テクスチャ - public new Bitmap DrawPrivateFont( string drawstr, Color fontColor ) + public new Bitmap DrawPrivateFont(string drawstr, Color fontColor) { - return DrawPrivateFont( drawstr, DrawMode.Normal, fontColor, Color.White, Color.White, Color.White ); + return DrawPrivateFont(drawstr, DrawMode.Normal, fontColor, Color.White, Color.White, Color.White); } /// @@ -86,9 +86,9 @@ namespace DTXMania /// 描画色 /// 縁取色 /// 描画済テクスチャ - public new Bitmap DrawPrivateFont( string drawstr, Color fontColor, Color edgeColor ) + public new Bitmap DrawPrivateFont(string drawstr, Color fontColor, Color edgeColor) { - return DrawPrivateFont( drawstr, DrawMode.Edge, fontColor, edgeColor, Color.White, Color.White ); + return DrawPrivateFont(drawstr, DrawMode.Edge, fontColor, edgeColor, Color.White, Color.White); } /// @@ -113,9 +113,9 @@ namespace DTXMania /// グラデーション 上側の色 /// グラデーション 下側の色 /// 描画済テクスチャ - public new Bitmap DrawPrivateFont( string drawstr, Color fontColor, Color edgeColor, Color gradationTopColor, Color gradataionBottomColor ) + public new Bitmap DrawPrivateFont(string drawstr, Color fontColor, Color edgeColor, Color gradationTopColor, Color gradataionBottomColor) { - return DrawPrivateFont( drawstr, DrawMode.Edge | DrawMode.Gradation, fontColor, edgeColor, gradationTopColor, gradataionBottomColor ); + return DrawPrivateFont(drawstr, DrawMode.Edge | DrawMode.Gradation, fontColor, edgeColor, gradationTopColor, gradataionBottomColor); } #if こちらは使わない // (Bitmapではなく、CTextureを返す版) @@ -175,11 +175,11 @@ namespace DTXMania #endif #endregion - protected new Bitmap DrawPrivateFont( string drawstr, DrawMode drawmode, Color fontColor, Color edgeColor, Color gradationTopColor, Color gradationBottomColor ) + protected new Bitmap DrawPrivateFont(string drawstr, DrawMode drawmode, Color fontColor, Color edgeColor, Color gradationTopColor, Color gradationBottomColor) { #region [ 以前レンダリングしたことのある文字列/フォントか? (キャッシュにヒットするか?) ] int index = listFontCache.FindIndex( - delegate( FontCache fontcache ) + delegate(FontCache fontcache) { return ( drawstr == fontcache.drawstr && @@ -193,12 +193,12 @@ namespace DTXMania } ); #endregion - if ( index < 0 ) + if (index < 0) { // キャッシュにヒットせず。 #region [ レンダリングして、キャッシュに登録 ] FontCache fc = new FontCache(); - fc.bmp = base.DrawPrivateFont( drawstr, drawmode, fontColor, edgeColor, gradationTopColor, gradationBottomColor ); + fc.bmp = base.DrawPrivateFont(drawstr, drawmode, fontColor, edgeColor, gradationTopColor, gradationBottomColor); fc.drawstr = drawstr; fc.drawmode = drawmode; fc.fontColor = fontColor; @@ -207,32 +207,32 @@ namespace DTXMania fc.gradationBottomColor = gradationBottomColor; fc.rectStrings = RectStrings; fc.ptOrigin = PtOrigin; - listFontCache.Add( fc ); + listFontCache.Add(fc); // Debug.WriteLine( drawstr + ": Cacheにヒットせず。(cachesize=" + listFontCache.Count + ")" ); #endregion #region [ もしキャッシュがあふれたら、最も古いキャッシュを破棄する ] - if ( listFontCache.Count > MAXCACHESIZE ) + if (listFontCache.Count > MAXCACHESIZE) { // Debug.WriteLine( "Cache溢れ。" + listFontCache[ 0 ].drawstr + " を解放します。" ); - if ( listFontCache[ 0 ].bmp != null ) + if (listFontCache[0].bmp != null) { - listFontCache[ 0 ].bmp.Dispose(); + listFontCache[0].bmp.Dispose(); } - listFontCache.RemoveAt( 0 ); + listFontCache.RemoveAt(0); } #endregion // 呼び出し元のDispose()でキャッシュもDispose()されないように、Clone()で返す。 - return (Bitmap)listFontCache[ listFontCache.Count - 1 ].bmp.Clone(); + return (Bitmap)listFontCache[listFontCache.Count - 1].bmp.Clone(); } else { // Debug.WriteLine( drawstr + ": Cacheにヒット!! index=" + index ); #region [ キャッシュにヒット。レンダリングは行わず、キャッシュ内のデータを返して終了。] - RectStrings = listFontCache[ index ].rectStrings; - PtOrigin = listFontCache[ index ].ptOrigin; + RectStrings = listFontCache[index].rectStrings; + PtOrigin = listFontCache[index].ptOrigin; // 呼び出し元のDispose()でキャッシュもDispose()されないように、Clone()で返す。 - return (Bitmap) listFontCache[ index ].bmp.Clone(); + return (Bitmap)listFontCache[index].bmp.Clone(); #endregion } } @@ -241,18 +241,17 @@ namespace DTXMania //----------------- public new void Dispose() { - if ( !this.bDispose完了済み_CPrivateFastFont ) + if (!this.bDispose完了済み_CPrivateFastFont) { - if ( listFontCache != null ) + if (listFontCache != null) { //Debug.WriteLine( "Disposing CPrivateFastFont()" ); #region [ キャッシュしている画像を破棄する ] - foreach ( FontCache bc in listFontCache ) - + foreach (FontCache bc in listFontCache) { - if ( bc.bmp != null ) + if (bc.bmp != null) { - bc.bmp.Dispose(); + bc.bmp.Dispose(); } } #endregion diff --git a/DTXManiaプロジェクト/コード/全体/CPrivateFont.cs b/DTXManiaプロジェクト/コード/全体/CPrivateFont.cs index cd11d8c4..b7f24dad 100644 --- a/DTXManiaプロジェクト/コード/全体/CPrivateFont.cs +++ b/DTXManiaプロジェクト/コード/全体/CPrivateFont.cs @@ -40,21 +40,21 @@ namespace DTXMania public class CPrivateFont : IDisposable { #region [ コンストラクタ ] - public CPrivateFont( FontFamily fontfamily, int pt, FontStyle style ) + public CPrivateFont(FontFamily fontfamily, int pt, FontStyle style) { - Initialize( null, fontfamily, pt, style ); + Initialize(null, fontfamily, pt, style); } - public CPrivateFont( FontFamily fontfamily, int pt ) + public CPrivateFont(FontFamily fontfamily, int pt) { - Initialize( null, fontfamily, pt, FontStyle.Regular ); + Initialize(null, fontfamily, pt, FontStyle.Regular); } - public CPrivateFont( string fontpath, int pt, FontStyle style ) + public CPrivateFont(string fontpath, int pt, FontStyle style) { - Initialize( fontpath, null, pt, style ); + Initialize(fontpath, null, pt, style); } - public CPrivateFont( string fontpath, int pt ) + public CPrivateFont(string fontpath, int pt) { - Initialize( fontpath, null, pt, FontStyle.Regular ); + Initialize(fontpath, null, pt, FontStyle.Regular); } public CPrivateFont() { @@ -62,17 +62,17 @@ namespace DTXMania } #endregion - protected void Initialize( string fontpath, FontFamily fontfamily, int pt, FontStyle style ) + protected void Initialize(string fontpath, FontFamily fontfamily, int pt, FontStyle style) { this._pfc = null; this._fontfamily = null; this._font = null; this._pt = pt; - this._rectStrings = new Rectangle( 0, 0, 0, 0 ); - this._ptOrigin = new Point( 0, 0 ); + this._rectStrings = new Rectangle(0, 0, 0, 0); + this._ptOrigin = new Point(0, 0); this.bDispose完了済み = false; - if ( fontfamily != null ) + if (fontfamily != null) { this._fontfamily = fontfamily; } @@ -81,12 +81,12 @@ namespace DTXMania try { this._pfc = new System.Drawing.Text.PrivateFontCollection(); //PrivateFontCollectionオブジェクトを作成する - this._pfc.AddFontFile( fontpath ); //PrivateFontCollectionにフォントを追加する - _fontfamily = _pfc.Families[ 0 ]; + this._pfc.AddFontFile(fontpath); //PrivateFontCollectionにフォントを追加する + _fontfamily = _pfc.Families[0]; } - catch ( System.IO.FileNotFoundException ) + catch (System.IO.FileNotFoundException) { - Trace.TraceWarning( "プライベートフォントの追加に失敗しました({0})。代わりにMS PGothicの使用を試みます。", fontpath ); + Trace.TraceWarning("プライベートフォントの追加に失敗しました({0})。代わりにMS PGothicの使用を試みます。", fontpath); //throw new FileNotFoundException( "プライベートフォントの追加に失敗しました。({0})", Path.GetFileName( fontpath ) ); //return; _fontfamily = null; @@ -110,49 +110,49 @@ namespace DTXMania // 指定されたフォントスタイルが適用できない場合は、フォント内で定義されているスタイルから候補を選んで使用する // 何もスタイルが使えないようなフォントなら、例外を出す。 - if ( _fontfamily != null ) + if (_fontfamily != null) { - if ( !_fontfamily.IsStyleAvailable( style ) ) + if (!_fontfamily.IsStyleAvailable(style)) { FontStyle[] FS = { FontStyle.Regular, FontStyle.Bold, FontStyle.Italic, FontStyle.Underline, FontStyle.Strikeout }; style = FontStyle.Regular | FontStyle.Bold | FontStyle.Italic | FontStyle.Underline | FontStyle.Strikeout; // null非許容型なので、代わりに全盛をNGワードに設定 - foreach ( FontStyle ff in FS ) + foreach (FontStyle ff in FS) { - if ( this._fontfamily.IsStyleAvailable( ff ) ) + if (this._fontfamily.IsStyleAvailable(ff)) { style = ff; - Trace.TraceWarning( "フォント{0}へのスタイル指定を、{1}に変更しました。", Path.GetFileName( fontpath ), style.ToString() ); + Trace.TraceWarning("フォント{0}へのスタイル指定を、{1}に変更しました。", Path.GetFileName(fontpath), style.ToString()); break; } } - if ( style == ( FontStyle.Regular | FontStyle.Bold | FontStyle.Italic | FontStyle.Underline | FontStyle.Strikeout ) ) + if (style == (FontStyle.Regular | FontStyle.Bold | FontStyle.Italic | FontStyle.Underline | FontStyle.Strikeout)) { - Trace.TraceWarning( "フォント{0}は適切なスタイル{1}を選択できませんでした。", Path.GetFileName( fontpath ), style.ToString() ); + Trace.TraceWarning("フォント{0}は適切なスタイル{1}を選択できませんでした。", Path.GetFileName(fontpath), style.ToString()); } } //this._font = new Font(this._fontfamily, pt, style); //PrivateFontCollectionの先頭のフォントのFontオブジェクトを作成する float emSize = pt * 96.0f / 72.0f; - this._font = new Font( this._fontfamily, emSize, style, GraphicsUnit.Pixel ); //PrivateFontCollectionの先頭のフォントのFontオブジェクトを作成する + this._font = new Font(this._fontfamily, emSize, style, GraphicsUnit.Pixel); //PrivateFontCollectionの先頭のフォントのFontオブジェクトを作成する //HighDPI対応のため、pxサイズで指定 } else // フォントファイルが見つからなかった場合 (MS PGothicを代わりに指定する) { float emSize = pt * 96.0f / 72.0f; - this._font = new Font( "MS PGothic", emSize, style, GraphicsUnit.Pixel ); //MS PGothicのFontオブジェクトを作成する + this._font = new Font("MS PGothic", emSize, style, GraphicsUnit.Pixel); //MS PGothicのFontオブジェクトを作成する FontFamily[] ffs = new System.Drawing.Text.InstalledFontCollection().Families; - int lcid = System.Globalization.CultureInfo.GetCultureInfo( "en-us" ).LCID; - foreach ( FontFamily ff in ffs ) + int lcid = System.Globalization.CultureInfo.GetCultureInfo("en-us").LCID; + foreach (FontFamily ff in ffs) { // Trace.WriteLine( lcid ) ); - if ( ff.GetName( lcid ) == "MS PGothic" ) + if (ff.GetName(lcid) == "MS PGothic") { this._fontfamily = ff; - Trace.TraceInformation( "MS PGothicを代わりに指定しました。" ); + Trace.TraceInformation("MS PGothicを代わりに指定しました。"); return; } } - throw new FileNotFoundException( "プライベートフォントの追加に失敗し、MS PGothicでの代替処理にも失敗しました。({0})", Path.GetFileName( fontpath ) ); + throw new FileNotFoundException("プライベートフォントの追加に失敗し、MS PGothicでの代替処理にも失敗しました。({0})", Path.GetFileName(fontpath)); } } @@ -171,9 +171,9 @@ namespace DTXMania /// 描画文字列 /// 描画色 /// 描画済テクスチャ - public Bitmap DrawPrivateFont( string drawstr, Color fontColor ) + public Bitmap DrawPrivateFont(string drawstr, Color fontColor) { - return DrawPrivateFont( drawstr, DrawMode.Normal, fontColor, Color.White, Color.White, Color.White ); + return DrawPrivateFont(drawstr, DrawMode.Normal, fontColor, Color.White, Color.White, Color.White); } /// @@ -183,9 +183,9 @@ namespace DTXMania /// 描画色 /// 縁取色 /// 描画済テクスチャ - public Bitmap DrawPrivateFont( string drawstr, Color fontColor, Color edgeColor ) + public Bitmap DrawPrivateFont(string drawstr, Color fontColor, Color edgeColor) { - return DrawPrivateFont( drawstr, DrawMode.Edge, fontColor, edgeColor, Color.White, Color.White ); + return DrawPrivateFont(drawstr, DrawMode.Edge, fontColor, edgeColor, Color.White, Color.White); } /// @@ -210,9 +210,9 @@ namespace DTXMania /// グラデーション 上側の色 /// グラデーション 下側の色 /// 描画済テクスチャ - public Bitmap DrawPrivateFont( string drawstr, Color fontColor, Color edgeColor, Color gradationTopColor, Color gradataionBottomColor ) + public Bitmap DrawPrivateFont(string drawstr, Color fontColor, Color edgeColor, Color gradationTopColor, Color gradataionBottomColor) { - return DrawPrivateFont( drawstr, DrawMode.Edge | DrawMode.Gradation, fontColor, edgeColor, gradationTopColor, gradataionBottomColor ); + return DrawPrivateFont(drawstr, DrawMode.Edge | DrawMode.Gradation, fontColor, edgeColor, gradationTopColor, gradataionBottomColor); } #if こちらは使わない // (Bitmapではなく、CTextureを返す版) @@ -285,37 +285,37 @@ namespace DTXMania /// グラデーション 上側の色 /// グラデーション 下側の色 /// 描画済テクスチャ - protected Bitmap DrawPrivateFont( string drawstr, DrawMode drawmode, Color fontColor, Color edgeColor, Color gradationTopColor, Color gradationBottomColor ) + protected Bitmap DrawPrivateFont(string drawstr, DrawMode drawmode, Color fontColor, Color edgeColor, Color gradationTopColor, Color gradationBottomColor) { - if ( this._fontfamily == null || drawstr == null || drawstr == "" ) + if (this._fontfamily == null || drawstr == null || drawstr == "") { // nullを返すと、その後bmp→texture処理や、textureのサイズを見て・・の処理で全部例外が発生することになる。 // それは非常に面倒なので、最小限のbitmapを返してしまう。 // まずはこの仕様で進めますが、問題有れば(上位側からエラー検出が必要であれば)例外を出したりエラー状態であるプロパティを定義するなり検討します。 - if ( drawstr != "" ) + if (drawstr != "") { - Trace.TraceWarning( "DrawPrivateFont()の入力不正。最小値のbitmapを返します。" ); + Trace.TraceWarning("DrawPrivateFont()の入力不正。最小値のbitmapを返します。"); } - _rectStrings = new Rectangle( 0, 0, 0, 0 ); - _ptOrigin = new Point( 0, 0 ); + _rectStrings = new Rectangle(0, 0, 0, 0); + _ptOrigin = new Point(0, 0); return new Bitmap(1, 1); } - bool bEdge = ( ( drawmode & DrawMode.Edge ) == DrawMode.Edge ); - bool bGradation = ( ( drawmode & DrawMode.Gradation ) == DrawMode.Gradation ); + bool bEdge = ((drawmode & DrawMode.Edge) == DrawMode.Edge); + bool bGradation = ((drawmode & DrawMode.Gradation) == DrawMode.Gradation); // 縁取りの縁のサイズは、とりあえずフォントの大きさの1/4とする - int nEdgePt = (bEdge)? _pt / 4 : 0; + int nEdgePt = (bEdge) ? _pt / 4 : 0; // 描画サイズを測定する - Size stringSize = System.Windows.Forms.TextRenderer.MeasureText( drawstr, this._font, new Size( int.MaxValue, int.MaxValue ), + Size stringSize = System.Windows.Forms.TextRenderer.MeasureText(drawstr, this._font, new Size(int.MaxValue, int.MaxValue), System.Windows.Forms.TextFormatFlags.NoPrefix | System.Windows.Forms.TextFormatFlags.NoPadding ); //取得した描画サイズを基に、描画先のbitmapを作成する - Bitmap bmp = new Bitmap( stringSize.Width + nEdgePt * 2, stringSize.Height + nEdgePt * 2 ); + Bitmap bmp = new Bitmap(stringSize.Width + nEdgePt * 2, stringSize.Height + nEdgePt * 2); bmp.MakeTransparent(); - Graphics g = Graphics.FromImage( bmp ); + Graphics g = Graphics.FromImage(bmp); g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality; StringFormat sf = new StringFormat(); @@ -323,54 +323,54 @@ namespace DTXMania sf.Alignment = StringAlignment.Center; // 画面中央(水平方向位置) // レイアウト枠 - Rectangle r = new Rectangle( 0, 0, stringSize.Width + nEdgePt * 2, stringSize.Height + nEdgePt * 2 ); + Rectangle r = new Rectangle(0, 0, stringSize.Width + nEdgePt * 2, stringSize.Height + nEdgePt * 2); - if ( bEdge ) // 縁取り有りの描画 + if (bEdge) // 縁取り有りの描画 { // DrawPathで、ポイントサイズを使って描画するために、DPIを使って単位変換する // (これをしないと、単位が違うために、小さめに描画されてしまう) float sizeInPixels = _font.SizeInPoints * g.DpiY / 72; // 1 inch = 72 points System.Drawing.Drawing2D.GraphicsPath gp = new System.Drawing.Drawing2D.GraphicsPath(); - gp.AddString( drawstr, this._fontfamily, (int) this._font.Style, sizeInPixels, r, sf ); + gp.AddString(drawstr, this._fontfamily, (int)this._font.Style, sizeInPixels, r, sf); // 縁取りを描画する - Pen p = new Pen( edgeColor, nEdgePt ); + Pen p = new Pen(edgeColor, nEdgePt); p.LineJoin = System.Drawing.Drawing2D.LineJoin.Round; - g.DrawPath( p, gp ); + g.DrawPath(p, gp); // 塗りつぶす Brush br; - if ( bGradation ) + if (bGradation) { - br = new LinearGradientBrush( r, gradationTopColor, gradationBottomColor, LinearGradientMode.Vertical ); + br = new LinearGradientBrush(r, gradationTopColor, gradationBottomColor, LinearGradientMode.Vertical); } else { - br = new SolidBrush( fontColor ); + br = new SolidBrush(fontColor); } - g.FillPath( br, gp ); + g.FillPath(br, gp); - if ( br != null ) br.Dispose(); br = null; - if ( p != null ) p.Dispose(); p = null; - if ( gp != null ) gp.Dispose(); gp = null; + if (br != null) br.Dispose(); br = null; + if (p != null) p.Dispose(); p = null; + if (gp != null) gp.Dispose(); gp = null; } else { // 縁取りなしの描画 - System.Windows.Forms.TextRenderer.DrawText( g, drawstr, _font, new Point( 0, 0 ), fontColor ); + System.Windows.Forms.TextRenderer.DrawText(g, drawstr, _font, new Point(0, 0), fontColor); } #if debug表示 g.DrawRectangle( new Pen( Color.White, 1 ), new Rectangle( 1, 1, stringSize.Width-1, stringSize.Height-1 ) ); g.DrawRectangle( new Pen( Color.Green, 1 ), new Rectangle( 0, 0, bmp.Width - 1, bmp.Height - 1 ) ); #endif - _rectStrings = new Rectangle( 0, 0, stringSize.Width, stringSize.Height ); - _ptOrigin = new Point( nEdgePt * 2, nEdgePt * 2 ); - + _rectStrings = new Rectangle(0, 0, stringSize.Width, stringSize.Height); + _ptOrigin = new Point(nEdgePt * 2, nEdgePt * 2); + #region [ リソースを解放する ] - if ( sf != null ) sf.Dispose(); sf = null; - if ( g != null ) g.Dispose(); g = null; + if (sf != null) sf.Dispose(); sf = null; + if (g != null) g.Dispose(); g = null; #endregion return bmp; @@ -406,14 +406,14 @@ namespace DTXMania //----------------- public void Dispose() { - if ( !this.bDispose完了済み ) + if (!this.bDispose完了済み) { - if ( this._font != null ) + if (this._font != null) { this._font.Dispose(); this._font = null; } - if ( this._pfc != null ) + if (this._pfc != null) { this._pfc.Dispose(); this._pfc = null; diff --git a/DTXManiaプロジェクト/コード/全体/CSkin.cs b/DTXManiaプロジェクト/コード/全体/CSkin.cs index 2d6ee912..2bdbe01c 100644 --- a/DTXManiaプロジェクト/コード/全体/CSkin.cs +++ b/DTXManiaプロジェクト/コード/全体/CSkin.cs @@ -53,26 +53,26 @@ namespace DTXMania { get { - if( this.rSound[ 1 - this.n次に鳴るサウンド番号 ] == null ) + if (this.rSound[1 - this.n次に鳴るサウンド番号] == null) return false; - return this.rSound[ 1 - this.n次に鳴るサウンド番号 ].b再生中; + return this.rSound[1 - this.n次に鳴るサウンド番号].b再生中; } } public int n位置_現在のサウンド { get { - CSound sound = this.rSound[ 1 - this.n次に鳴るサウンド番号 ]; - if( sound == null ) + CSound sound = this.rSound[1 - this.n次に鳴るサウンド番号]; + if (sound == null) return 0; return sound.n位置; } set { - CSound sound = this.rSound[ 1 - this.n次に鳴るサウンド番号 ]; - if( sound != null ) + CSound sound = this.rSound[1 - this.n次に鳴るサウンド番号]; + if (sound != null) sound.n位置 = value; } } @@ -80,16 +80,16 @@ namespace DTXMania { get { - CSound sound = this.rSound[ this.n次に鳴るサウンド番号 ]; - if( sound == null ) + CSound sound = this.rSound[this.n次に鳴るサウンド番号]; + if (sound == null) return 0; return sound.n位置; } set { - CSound sound = this.rSound[ this.n次に鳴るサウンド番号 ]; - if( sound != null ) + CSound sound = this.rSound[this.n次に鳴るサウンド番号]; + if (sound != null) sound.n位置 = value; } } @@ -97,16 +97,16 @@ namespace DTXMania { get { - CSound sound = this.rSound[ 1 - this.n次に鳴るサウンド番号 ]; - if( sound == null ) + CSound sound = this.rSound[1 - this.n次に鳴るサウンド番号]; + if (sound == null) return 0; return sound.n音量; } set { - CSound sound = this.rSound[ 1 - this.n次に鳴るサウンド番号 ]; - if( sound != null ) + CSound sound = this.rSound[1 - this.n次に鳴るサウンド番号]; + if (sound != null) sound.n音量 = value; } } @@ -114,8 +114,8 @@ namespace DTXMania { get { - CSound sound = this.rSound[ this.n次に鳴るサウンド番号 ]; - if( sound == null ) + CSound sound = this.rSound[this.n次に鳴るサウンド番号]; + if (sound == null) { return 0; } @@ -123,8 +123,8 @@ namespace DTXMania } set { - CSound sound = this.rSound[ this.n次に鳴るサウンド番号 ]; - if( sound != null ) + CSound sound = this.rSound[this.n次に鳴るサウンド番号]; + if (sound != null) { sound.n音量 = value; } @@ -134,8 +134,8 @@ namespace DTXMania { get { - CSound sound = this.rSound[ 1 - this.n次に鳴るサウンド番号 ]; - if( sound == null ) + CSound sound = this.rSound[1 - this.n次に鳴るサウンド番号]; + if (sound == null) { return 0; } @@ -146,8 +146,8 @@ namespace DTXMania { get { - CSound sound = this.rSound[ this.n次に鳴るサウンド番号 ]; - if( sound == null ) + CSound sound = this.rSound[this.n次に鳴るサウンド番号]; + if (sound == null) { return 0; } @@ -175,7 +175,7 @@ namespace DTXMania { this.b読み込み未試行 = true; } - + // メソッド @@ -183,45 +183,45 @@ namespace DTXMania { this.b読み込み未試行 = false; this.b読み込み成功 = false; - if( string.IsNullOrEmpty( this.strファイル名 ) ) - throw new InvalidOperationException( "ファイル名が無効です。" ); + if (string.IsNullOrEmpty(this.strファイル名)) + throw new InvalidOperationException("ファイル名が無効です。"); - if( !File.Exists( CSkin.Path( this.strファイル名 ) ) ) + if (!File.Exists(CSkin.Path(this.strファイル名))) { - throw new FileNotFoundException( this.strファイル名 ); + throw new FileNotFoundException(this.strファイル名); } -//// for( int i = 0; i < 2; i++ ) // #27790 2012.3.10 yyagi 2回読み出しを、1回読みだし+1回メモリコピーに変更 -//// { -// try -// { -// this.rSound[ 0 ] = CDTXMania.app.Sound管理.tサウンドを生成する( CSkin.Path( this.strファイル名 ) ); -// } -// catch -// { -// this.rSound[ 0 ] = null; -// throw; -// } -// if ( this.rSound[ 0 ] == null ) // #28243 2012.5.3 yyagi "this.rSound[ 0 ].bストリーム再生する"時もCloneするようにし、rSound[1]がnullにならないよう修正→rSound[1]の再生正常化 -// { -// this.rSound[ 1 ] = null; -// } -// else -// { -// this.rSound[ 1 ] = ( CSound ) this.rSound[ 0 ].Clone(); // #27790 2012.3.10 yyagi add: to accelerate loading chip sounds -// CDTXMania.app.Sound管理.tサウンドを登録する( this.rSound[ 1 ] ); // #28243 2012.5.3 yyagi add (登録漏れによりストリーム再生処理が発生していなかった) -// } - -//// } - - for ( int i = 0; i < 2; i++ ) // 一旦Cloneを止めてASIO対応に専念 + //// for( int i = 0; i < 2; i++ ) // #27790 2012.3.10 yyagi 2回読み出しを、1回読みだし+1回メモリコピーに変更 + //// { + // try + // { + // this.rSound[ 0 ] = CDTXMania.app.Sound管理.tサウンドを生成する( CSkin.Path( this.strファイル名 ) ); + // } + // catch + // { + // this.rSound[ 0 ] = null; + // throw; + // } + // if ( this.rSound[ 0 ] == null ) // #28243 2012.5.3 yyagi "this.rSound[ 0 ].bストリーム再生する"時もCloneするようにし、rSound[1]がnullにならないよう修正→rSound[1]の再生正常化 + // { + // this.rSound[ 1 ] = null; + // } + // else + // { + // this.rSound[ 1 ] = ( CSound ) this.rSound[ 0 ].Clone(); // #27790 2012.3.10 yyagi add: to accelerate loading chip sounds + // CDTXMania.app.Sound管理.tサウンドを登録する( this.rSound[ 1 ] ); // #28243 2012.5.3 yyagi add (登録漏れによりストリーム再生処理が発生していなかった) + // } + + //// } + + for (int i = 0; i < 2; i++) // 一旦Cloneを止めてASIO対応に専念 { try { - this.rSound[ i ] = CDTXMania.app.Sound管理.tサウンドを生成する( CSkin.Path( this.strファイル名 ) ); + this.rSound[i] = CDTXMania.app.Sound管理.tサウンドを生成する(CSkin.Path(this.strファイル名)); } catch { - this.rSound[ i ] = null; + this.rSound[i] = null; throw; } } @@ -229,7 +229,7 @@ namespace DTXMania } public void t再生する() { - if ( this.b読み込み未試行 ) + if (this.b読み込み未試行) { try { @@ -240,40 +240,40 @@ namespace DTXMania this.b読み込み未試行 = false; } } - if( this.b排他 ) + if (this.b排他) { - if( r最後に再生した排他システムサウンド != null ) + if (r最後に再生した排他システムサウンド != null) r最後に再生した排他システムサウンド.t停止する(); r最後に再生した排他システムサウンド = this; } - CSound sound = this.rSound[ this.n次に鳴るサウンド番号 ]; - if( sound != null ) - sound.t再生を開始する( this.bループ ); + CSound sound = this.rSound[this.n次に鳴るサウンド番号]; + if (sound != null) + sound.t再生を開始する(this.bループ); this.n次に鳴るサウンド番号 = 1 - this.n次に鳴るサウンド番号; } public void t停止する() { - if( this.rSound[ 0 ] != null ) - this.rSound[ 0 ].t再生を停止する(); + if (this.rSound[0] != null) + this.rSound[0].t再生を停止する(); - if( this.rSound[ 1 ] != null ) - this.rSound[ 1 ].t再生を停止する(); + if (this.rSound[1] != null) + this.rSound[1].t再生を停止する(); - if( r最後に再生した排他システムサウンド == this ) + if (r最後に再生した排他システムサウンド == this) r最後に再生した排他システムサウンド = null; } public void tRemoveMixer() { - if ( CDTXMania.app.Sound管理.GetCurrentSoundDeviceType() != "DirectShow" ) + if (CDTXMania.app.Sound管理.GetCurrentSoundDeviceType() != "DirectShow") { - for ( int i = 0; i < 2; i++ ) + for (int i = 0; i < 2; i++) { - if ( this.rSound[ i ] != null ) + if (this.rSound[i] != null) { - CDTXMania.app.Sound管理.RemoveMixer( this.rSound[ i ] ); + CDTXMania.app.Sound管理.RemoveMixer(this.rSound[i]); } } } @@ -283,14 +283,14 @@ namespace DTXMania //----------------- public void Dispose() { - if( !this.bDisposed済み ) + if (!this.bDisposed済み) { - for( int i = 0; i < 2; i++ ) + for (int i = 0; i < 2; i++) { - if( this.rSound[ i ] != null ) + if (this.rSound[i] != null) { - CDTXMania.app.Sound管理.tサウンドを破棄する( this.rSound[ i ] ); - this.rSound[ i ] = null; + CDTXMania.app.Sound管理.tサウンドを破棄する(this.rSound[i]); + this.rSound[i] = null; } } this.b読み込み成功 = false; @@ -304,12 +304,12 @@ namespace DTXMania //----------------- private bool bDisposed済み; private int n次に鳴るサウンド番号; - private CSound[] rSound = new CSound[ 2 ]; + private CSound[] rSound = new CSound[2]; //----------------- #endregion } - + // プロパティ public Cシステムサウンド bgmオプション画面 = null; @@ -329,11 +329,11 @@ namespace DTXMania public Cシステムサウンド sound取消音 = null; public Cシステムサウンド sound変更音 = null; public readonly int nシステムサウンド数 = (int)Eシステムサウンド.Count; - public Cシステムサウンド this[ Eシステムサウンド sound ] + public Cシステムサウンド this[Eシステムサウンド sound] { get { - switch( sound ) + switch (sound) { case Eシステムサウンド.SOUNDカーソル移動音: return this.soundカーソル移動音; @@ -386,11 +386,11 @@ namespace DTXMania throw new IndexOutOfRangeException(); } } - public Cシステムサウンド this[ int index ] + public Cシステムサウンド this[int index] { get { - switch( index ) + switch (index) { case 0: return this.soundカーソル移動音; @@ -473,14 +473,14 @@ namespace DTXMania { get { - lock ( lockBoxDefSkin ) + lock (lockBoxDefSkin) { return _strBoxDefSkinSubfolders; } } set { - lock ( lockBoxDefSkin ) + lock (lockBoxDefSkin) { _strBoxDefSkinSubfolders = value; } @@ -495,9 +495,9 @@ namespace DTXMania /// /// ユーザー設定用ならtrue, box.defからの設定ならfalse /// - public string GetCurrentSkinSubfolderFullName( bool bFromUserConfig ) + public string GetCurrentSkinSubfolderFullName(bool bFromUserConfig) { - if ( !bUseBoxDefSkin || bFromUserConfig == true || strBoxDefSkinSubfolderFullName == "" ) + if (!bUseBoxDefSkin || bFromUserConfig == true || strBoxDefSkinSubfolderFullName == "") { return strSystemSkinSubfolderFullName; } @@ -511,9 +511,9 @@ namespace DTXMania /// /// スキンパス名 /// ユーザー設定用ならtrue, box.defからの設定ならfalse - public void SetCurrentSkinSubfolderFullName( string value, bool bFromUserConfig ) + public void SetCurrentSkinSubfolderFullName(string value, bool bFromUserConfig) { - if ( bFromUserConfig ) + if (bFromUserConfig) { strSystemSkinSubfolderFullName = value; } @@ -525,7 +525,7 @@ namespace DTXMania // コンストラクタ - public CSkin( string _strSkinSubfolderFullName, bool _bUseBoxDefSkin ) + public CSkin(string _strSkinSubfolderFullName, bool _bUseBoxDefSkin) { lockBoxDefSkin = new object(); strSystemSkinSubfolderFullName = _strSkinSubfolderFullName; @@ -544,7 +544,7 @@ namespace DTXMania } private string InitializeSkinPathRoot() { - strSystemSkinRoot = System.IO.Path.Combine( CDTXMania.app.strEXEのあるフォルダ, "System" + System.IO.Path.DirectorySeparatorChar ); + strSystemSkinRoot = System.IO.Path.Combine(CDTXMania.app.strEXEのあるフォルダ, "System" + System.IO.Path.DirectorySeparatorChar); return strSystemSkinRoot; } @@ -557,60 +557,60 @@ namespace DTXMania /// public void PrepareReloadSkin() { - Trace.TraceInformation( "SkinPath設定: {0}", - ( strBoxDefSkinSubfolderFullName == "" ) ? + Trace.TraceInformation("SkinPath設定: {0}", + (strBoxDefSkinSubfolderFullName == "") ? strSystemSkinSubfolderFullName : strBoxDefSkinSubfolderFullName ); - for ( int i = 0; i < nシステムサウンド数; i++ ) + for (int i = 0; i < nシステムサウンド数; i++) { - if ( this[ i ] != null && this[i].b読み込み成功 ) + if (this[i] != null && this[i].b読み込み成功) { - this[ i ].t停止する(); - this[ i ].Dispose(); + this[i].t停止する(); + this[i].Dispose(); } } - this.soundカーソル移動音 = new Cシステムサウンド( @"Sounds\Move.ogg", false, false, false ); - this.sound決定音 = new Cシステムサウンド( @"Sounds\Decide.ogg", false, false, false ); - this.sound変更音 = new Cシステムサウンド( @"Sounds\Change.ogg", false, false, false ); - this.sound取消音 = new Cシステムサウンド( @"Sounds\Cancel.ogg", false, false, true ); - this.sound歓声音 = new Cシステムサウンド( @"Sounds\Audience.ogg", false, false, true ); - this.soundSTAGEFAILED音 = new Cシステムサウンド( @"Sounds\Stage failed.ogg", false, true, true ); - this.soundゲーム開始音 = new Cシステムサウンド( @"Sounds\Game start.ogg", false, false, false ); - this.soundゲーム終了音 = new Cシステムサウンド( @"Sounds\Game end.ogg", false, true, false ); - this.soundステージクリア音 = new Cシステムサウンド( @"Sounds\Stage clear.ogg", false, true, true ); - this.soundフルコンボ音 = new Cシステムサウンド( @"Sounds\Full combo.ogg", false, false, true ); - this.sound曲読込開始音 = new Cシステムサウンド( @"Sounds\Now loading.ogg", false, true, true ); - this.soundタイトル音 = new Cシステムサウンド( @"Sounds\Title.ogg", false, true, false ); - this.bgm起動画面 = new Cシステムサウンド( @"Sounds\Setup BGM.ogg", true, true, false ); - this.bgmオプション画面 = new Cシステムサウンド( @"Sounds\Option BGM.ogg", true, true, false ); - this.bgmコンフィグ画面 = new Cシステムサウンド( @"Sounds\Config BGM.ogg", true, true, false ); - this.bgm選曲画面 = new Cシステムサウンド( @"Sounds\Select BGM.ogg", true, true, false ); + this.soundカーソル移動音 = new Cシステムサウンド(@"Sounds\Move.ogg", false, false, false); + this.sound決定音 = new Cシステムサウンド(@"Sounds\Decide.ogg", false, false, false); + this.sound変更音 = new Cシステムサウンド(@"Sounds\Change.ogg", false, false, false); + this.sound取消音 = new Cシステムサウンド(@"Sounds\Cancel.ogg", false, false, true); + this.sound歓声音 = new Cシステムサウンド(@"Sounds\Audience.ogg", false, false, true); + this.soundSTAGEFAILED音 = new Cシステムサウンド(@"Sounds\Stage failed.ogg", false, true, true); + this.soundゲーム開始音 = new Cシステムサウンド(@"Sounds\Game start.ogg", false, false, false); + this.soundゲーム終了音 = new Cシステムサウンド(@"Sounds\Game end.ogg", false, true, false); + this.soundステージクリア音 = new Cシステムサウンド(@"Sounds\Stage clear.ogg", false, true, true); + this.soundフルコンボ音 = new Cシステムサウンド(@"Sounds\Full combo.ogg", false, false, true); + this.sound曲読込開始音 = new Cシステムサウンド(@"Sounds\Now loading.ogg", false, true, true); + this.soundタイトル音 = new Cシステムサウンド(@"Sounds\Title.ogg", false, true, false); + this.bgm起動画面 = new Cシステムサウンド(@"Sounds\Setup BGM.ogg", true, true, false); + this.bgmオプション画面 = new Cシステムサウンド(@"Sounds\Option BGM.ogg", true, true, false); + this.bgmコンフィグ画面 = new Cシステムサウンド(@"Sounds\Config BGM.ogg", true, true, false); + this.bgm選曲画面 = new Cシステムサウンド(@"Sounds\Select BGM.ogg", true, true, false); } public void ReloadSkin() { - for ( int i = 0; i < nシステムサウンド数; i++ ) + for (int i = 0; i < nシステムサウンド数; i++) { - if ( !this[ i ].b排他 ) // BGM系以外のみ読み込む。(BGM系は必要になったときに読み込む) + if (!this[i].b排他) // BGM系以外のみ読み込む。(BGM系は必要になったときに読み込む) { - Cシステムサウンド cシステムサウンド = this[ i ]; - if ( !CDTXMania.app.bコンパクトモード || cシステムサウンド.bCompact対象 ) + Cシステムサウンド cシステムサウンド = this[i]; + if (!CDTXMania.app.bコンパクトモード || cシステムサウンド.bCompact対象) { try { cシステムサウンド.t読み込み(); - Trace.TraceInformation( "システムサウンドを読み込みました。({0})", cシステムサウンド.strファイル名 ); + Trace.TraceInformation("システムサウンドを読み込みました。({0})", cシステムサウンド.strファイル名); } - catch ( FileNotFoundException ) + catch (FileNotFoundException) { - Trace.TraceWarning( "システムサウンドが存在しません。({0})", cシステムサウンド.strファイル名 ); + Trace.TraceWarning("システムサウンドが存在しません。({0})", cシステムサウンド.strファイル名); } - catch ( Exception e ) + catch (Exception e) { - Trace.TraceError( e.Message ); - Trace.TraceWarning( "システムサウンドの読み込みに失敗しました。({0})", cシステムサウンド.strファイル名 ); + Trace.TraceError(e.Message); + Trace.TraceWarning("システムサウンドの読み込みに失敗しました。({0})", cシステムサウンド.strファイル名); } } } @@ -625,49 +625,49 @@ namespace DTXMania /// 以下の優先順位で存在確認の上strSystemSkinSubfolderFullNameを再設定する。 /// 1. System/Default/ /// 2. System/*****/ で最初にenumerateされたもの - /// 3. System/ (従来互換) + /// 3. System/ (従来互換) /// public void ReloadSkinPaths() { #region [ まず System/*** をenumerateする ] - string[] tempSkinSubfolders = System.IO.Directory.GetDirectories( strSystemSkinRoot, "*" ); - strSystemSkinSubfolders = new string[ tempSkinSubfolders.Length ]; + string[] tempSkinSubfolders = System.IO.Directory.GetDirectories(strSystemSkinRoot, "*"); + strSystemSkinSubfolders = new string[tempSkinSubfolders.Length]; int size = 0; - for ( int i = 0; i < tempSkinSubfolders.Length; i++ ) + for (int i = 0; i < tempSkinSubfolders.Length; i++) { #region [ 検出したフォルダがスキンフォルダかどうか確認する] - if ( !bIsValid( tempSkinSubfolders[ i ] ) ) + if (!bIsValid(tempSkinSubfolders[i])) continue; #endregion #region [ スキンフォルダと確認できたものを、strSkinSubfoldersに入れる ] // フォルダ名末尾に必ず\をつけておくこと。さもないとConfig読み出し側(必ず\をつける)とマッチできない - if ( tempSkinSubfolders[ i ][ tempSkinSubfolders[ i ].Length - 1 ] != System.IO.Path.DirectorySeparatorChar ) + if (tempSkinSubfolders[i][tempSkinSubfolders[i].Length - 1] != System.IO.Path.DirectorySeparatorChar) { - tempSkinSubfolders[ i ] += System.IO.Path.DirectorySeparatorChar; + tempSkinSubfolders[i] += System.IO.Path.DirectorySeparatorChar; } - strSystemSkinSubfolders[ size ] = tempSkinSubfolders[ i ]; - Trace.TraceInformation( "SkinPath検出: {0}", strSystemSkinSubfolders[ size ] ); + strSystemSkinSubfolders[size] = tempSkinSubfolders[i]; + Trace.TraceInformation("SkinPath検出: {0}", strSystemSkinSubfolders[size]); size++; #endregion } - Trace.TraceInformation( "SkinPath入力: {0}", strSystemSkinSubfolderFullName ); - Array.Resize( ref strSystemSkinSubfolders, size ); - Array.Sort( strSystemSkinSubfolders ); // BinarySearch実行前にSortが必要 + Trace.TraceInformation("SkinPath入力: {0}", strSystemSkinSubfolderFullName); + Array.Resize(ref strSystemSkinSubfolders, size); + Array.Sort(strSystemSkinSubfolders); // BinarySearch実行前にSortが必要 #endregion #region [ 現在のSkinパスがbox.defスキンをCONFIG指定していた場合のために、最初にこれが有効かチェックする。有効ならこれを使う。 ] - if ( bIsValid( strSystemSkinSubfolderFullName ) && - Array.BinarySearch( strSystemSkinSubfolders, strSystemSkinSubfolderFullName, - StringComparer.InvariantCultureIgnoreCase ) < 0 ) + if (bIsValid(strSystemSkinSubfolderFullName) && + Array.BinarySearch(strSystemSkinSubfolders, strSystemSkinSubfolderFullName, + StringComparer.InvariantCultureIgnoreCase) < 0) { - strBoxDefSkinSubfolders = new string[ 1 ]{ strSystemSkinSubfolderFullName }; + strBoxDefSkinSubfolders = new string[1] { strSystemSkinSubfolderFullName }; return; } #endregion #region [ 次に、現在のSkinパスが存在するか調べる。あれば終了。] - if ( Array.BinarySearch( strSystemSkinSubfolders, strSystemSkinSubfolderFullName, - StringComparer.InvariantCultureIgnoreCase ) >= 0 ) + if (Array.BinarySearch(strSystemSkinSubfolders, strSystemSkinSubfolderFullName, + StringComparer.InvariantCultureIgnoreCase) >= 0) return; #endregion #region [ カレントのSkinパスが消滅しているので、以下で再設定する。] @@ -676,39 +676,39 @@ namespace DTXMania /// 2. System/*****/ で最初にenumerateされたもの /// 3. System/ (従来互換) #region [ System/Default/ があるなら、そこにカレントSkinパスを設定する] - string tempSkinPath_default = System.IO.Path.Combine( strSystemSkinRoot, "Default" + System.IO.Path.DirectorySeparatorChar ); - if ( Array.BinarySearch( strSystemSkinSubfolders, tempSkinPath_default, - StringComparer.InvariantCultureIgnoreCase ) >= 0 ) + string tempSkinPath_default = System.IO.Path.Combine(strSystemSkinRoot, "Default" + System.IO.Path.DirectorySeparatorChar); + if (Array.BinarySearch(strSystemSkinSubfolders, tempSkinPath_default, + StringComparer.InvariantCultureIgnoreCase) >= 0) { strSystemSkinSubfolderFullName = tempSkinPath_default; return; } #endregion #region [ System/SkinFiles.*****/ で最初にenumerateされたものを、カレントSkinパスに再設定する ] - if ( strSystemSkinSubfolders.Length > 0 ) + if (strSystemSkinSubfolders.Length > 0) { - strSystemSkinSubfolderFullName = strSystemSkinSubfolders[ 0 ]; + strSystemSkinSubfolderFullName = strSystemSkinSubfolders[0]; return; } #endregion #region [ System/ に、カレントSkinパスを再設定する。] strSystemSkinSubfolderFullName = strSystemSkinRoot; - strSystemSkinSubfolders = new string[ 1 ]{ strSystemSkinSubfolderFullName }; + strSystemSkinSubfolders = new string[1] { strSystemSkinSubfolderFullName }; #endregion #endregion } // メソッド - public static string Path( string strファイルの相対パス ) + public static string Path(string strファイルの相対パス) { - if ( strBoxDefSkinSubfolderFullName == "" || !bUseBoxDefSkin ) + if (strBoxDefSkinSubfolderFullName == "" || !bUseBoxDefSkin) { - return System.IO.Path.Combine( strSystemSkinSubfolderFullName, strファイルの相対パス ); + return System.IO.Path.Combine(strSystemSkinSubfolderFullName, strファイルの相対パス); } else { - return System.IO.Path.Combine( strBoxDefSkinSubfolderFullName, strファイルの相対パス ); + return System.IO.Path.Combine(strBoxDefSkinSubfolderFullName, strファイルの相対パス); } } @@ -718,38 +718,38 @@ namespace DTXMania /// /// スキンが格納されたパス名(フルパス) /// スキン名 - public static string GetSkinName( string skinPathFullName ) + public static string GetSkinName(string skinPathFullName) { - if ( skinPathFullName != null ) + if (skinPathFullName != null) { - if ( skinPathFullName == "" ) // 「box.defで未定義」用 + if (skinPathFullName == "") // 「box.defで未定義」用 skinPathFullName = strSystemSkinSubfolderFullName; - string[] tmp = skinPathFullName.Split( System.IO.Path.DirectorySeparatorChar ); - return tmp[ tmp.Length - 2 ]; // ディレクトリ名の最後から2番目の要素がスキン名(最後の要素はnull。元stringの末尾が\なので。) + string[] tmp = skinPathFullName.Split(System.IO.Path.DirectorySeparatorChar); + return tmp[tmp.Length - 2]; // ディレクトリ名の最後から2番目の要素がスキン名(最後の要素はnull。元stringの末尾が\なので。) } return null; } - public static string[] GetSkinName( string[] skinPathFullNames ) + public static string[] GetSkinName(string[] skinPathFullNames) { - string[] ret = new string[ skinPathFullNames.Length ]; - for ( int i = 0; i < skinPathFullNames.Length; i++ ) + string[] ret = new string[skinPathFullNames.Length]; + for (int i = 0; i < skinPathFullNames.Length; i++) { - ret[ i ] = GetSkinName( skinPathFullNames[ i ] ); + ret[i] = GetSkinName(skinPathFullNames[i]); } return ret; } - public string GetSkinSubfolderFullNameFromSkinName( string skinName ) + public string GetSkinSubfolderFullNameFromSkinName(string skinName) { - foreach ( string s in strSystemSkinSubfolders ) + foreach (string s in strSystemSkinSubfolders) { - if ( GetSkinName( s ) == skinName ) + if (GetSkinName(s) == skinName) return s; } - foreach ( string b in strBoxDefSkinSubfolders ) + foreach (string b in strBoxDefSkinSubfolders) { - if ( GetSkinName( b ) == skinName ) + if (GetSkinName(b) == skinName) return b; } return null; @@ -761,16 +761,16 @@ namespace DTXMania /// /// 妥当性を確認するスキンパス(フルパス) /// 妥当ならtrue - public bool bIsValid( string skinPathFullName ) + public bool bIsValid(string skinPathFullName) { string filePathTitle; - filePathTitle = System.IO.Path.Combine( skinPathFullName, @"Graphics\ScreenTitle background.jpg" ); - if ( File.Exists( filePathTitle ) ) + filePathTitle = System.IO.Path.Combine(skinPathFullName, @"Graphics\ScreenTitle background.jpg"); + if (File.Exists(filePathTitle)) { - Bitmap bmp = Bitmap.FromFile( filePathTitle ) as Bitmap; + Bitmap bmp = Bitmap.FromFile(filePathTitle) as Bitmap; int width = bmp.Width; bmp.Dispose(); - if ( width >= 1920 ) + if (width >= 1920) { return true; } @@ -781,12 +781,12 @@ namespace DTXMania public void tRemoveMixerAll() { - for ( int i = 0; i < nシステムサウンド数; i++ ) + for (int i = 0; i < nシステムサウンド数; i++) { - if ( this[ i ] != null && this[ i ].b読み込み成功 ) + if (this[i] != null && this[i].b読み込み成功) { - this[ i ].t停止する(); - this[ i ].tRemoveMixer(); + this[i].t停止する(); + this[i].tRemoveMixer(); } } @@ -795,10 +795,10 @@ namespace DTXMania //----------------- public void Dispose() { - if( !this.bDisposed済み ) + if (!this.bDisposed済み) { - for( int i = 0; i < this.nシステムサウンド数; i++ ) - this[ i ].Dispose(); + for (int i = 0; i < this.nシステムサウンド数; i++) + this[i].Dispose(); this.bDisposed済み = true; } diff --git a/DTXManiaプロジェクト/コード/全体/C定数.cs b/DTXManiaプロジェクト/コード/全体/C定数.cs index 02b69363..a7637359 100644 --- a/DTXManiaプロジェクト/コード/全体/C定数.cs +++ b/DTXManiaプロジェクト/コード/全体/C定数.cs @@ -7,20 +7,20 @@ namespace DTXMania { public enum Ech定義 : int { - Invalid = -1, + Invalid = -1, /// /// 0x01 BGM 割当チャンネル /// - BGM = 0x01, - BarLength = 0x02, - BPM = 0x03, - BGALayer1 = 0x04, - ExObj_nouse = 0x05, - MissAnimation_nouse = 0x06, - BGALayer2 = 0x07, - BPMEx = 0x08, - BMS_reserved_09 = 0x09, - BMS_reserved_0A = 0x0A, + BGM = 0x01, + BarLength = 0x02, + BPM = 0x03, + BGALayer1 = 0x04, + ExObj_nouse = 0x05, + MissAnimation_nouse = 0x06, + BGALayer2 = 0x07, + BPMEx = 0x08, + BMS_reserved_09 = 0x09, + BMS_reserved_0A = 0x0A, //BMS_reserved_0B = 0x0B, //BMS_reserved_0C = 0x0C, //BMS_reserved_0D = 0x0D, @@ -30,40 +30,40 @@ namespace DTXMania /// /// HHC 0x11 /// - HiHatClose = 0x11, - Snare = 0x12, - BassDrum = 0x13, - HighTom = 0x14, - LowTom = 0x15, - Cymbal = 0x16, - FloorTom = 0x17, - HiHatOpen = 0x18, - RideCymbal = 0x19, - LeftCymbal = 0x1A, - LeftPedal = 0x1B, + HiHatClose = 0x11, + Snare = 0x12, + BassDrum = 0x13, + HighTom = 0x14, + LowTom = 0x15, + Cymbal = 0x16, + FloorTom = 0x17, + HiHatOpen = 0x18, + RideCymbal = 0x19, + LeftCymbal = 0x1A, + LeftPedal = 0x1B, /// /// 0x1C Visible LBD /// - LeftBassDrum = 0x1C, + LeftBassDrum = 0x1C, //nouse_1d = 0x1D, //nouse_1e = 0x1E, /// /// 0x1F Dr. Fillin /// - DrumsFillin = 0x1F, - Guitar_Open = 0x20, - Guitar_xxB = 0x21, - Guitar_xGx = 0x22, - Guitar_xGB = 0x23, - Guitar_Rxx = 0x24, - Guitar_RxB = 0x25, - Guitar_RGx = 0x26, - Guitar_RGB = 0x27, + DrumsFillin = 0x1F, + Guitar_Open = 0x20, + Guitar_xxB = 0x21, + Guitar_xGx = 0x22, + Guitar_xGB = 0x23, + Guitar_Rxx = 0x24, + Guitar_RxB = 0x25, + Guitar_RGx = 0x26, + Guitar_RGB = 0x27, /// /// 0x28 Gt. Wailing /// - Guitar_Wailing = 0x28, - flowspeed_gt_nouse = 0x29, + Guitar_Wailing = 0x28, + flowspeed_gt_nouse = 0x29, //nouse_2a = 0x2A, //nouse_2b = 0x2B, //nouse_2c = 0x2C, @@ -72,26 +72,26 @@ namespace DTXMania /// /// 0x2F Gt. Wailing Sound /// - Guitar_WailingSound = 0x2F, - flowspeed_dr_nouse = 0x30, + Guitar_WailingSound = 0x2F, + flowspeed_dr_nouse = 0x30, /// /// 0x31 HHC Hidden /// - HiHatClose_Hidden = 0x31, - Snare_Hidden = 0x32, - BassDrum_Hidden = 0x33, - HighTom_Hidden = 0x34, - LowTom_Hidden = 0x35, - Cymbal_Hidden = 0x36, - FloorTom_Hidden = 0x37, - HiHatOpen_Hidden = 0x38, - RideCymbal_Hidden = 0x39, - LeftCymbal_Hidden = 0x3A, - LeftPedal_Hidden = 0x3B, + HiHatClose_Hidden = 0x31, + Snare_Hidden = 0x32, + BassDrum_Hidden = 0x33, + HighTom_Hidden = 0x34, + LowTom_Hidden = 0x35, + Cymbal_Hidden = 0x36, + FloorTom_Hidden = 0x37, + HiHatOpen_Hidden = 0x38, + RideCymbal_Hidden = 0x39, + LeftCymbal_Hidden = 0x3A, + LeftPedal_Hidden = 0x3B, /// /// 0x3C LBD Hidden /// - LeftBassDrum_Hidden = 0x3C, + LeftBassDrum_Hidden = 0x3C, //nouse_3d = 0x3D, //nouse_3e = 0x3E, //nouse_3f = 0x3F, @@ -114,76 +114,76 @@ namespace DTXMania /// /// 0x50 BarLine /// - BarLine = 0x50, + BarLine = 0x50, /// /// 0x51 BeatLine /// - BeatLine = 0x51, - MIDIChorus = 0x52, - FillIn = 0x53, - Movie = 0x54, - BGALayer3 = 0x55, - BGALayer4 = 0x56, - BGALayer5 = 0x57, - BGALayer6 = 0x58, - BGALayer7 = 0x59, - MovieFull = 0x5A, - nouse_5b = 0x5B, - nouse_5c = 0x5C, - nouse_5d = 0x5D, - nouse_5e = 0x5E, - nouse_5f = 0x5F, - BGALayer8 = 0x60, - SE01 = 0x61, - SE02 = 0x62, - SE03 = 0x63, - SE04 = 0x64, - SE05 = 0x65, - SE06 = 0x66, - SE07 = 0x67, - SE08 = 0x68, - SE09 = 0x69, + BeatLine = 0x51, + MIDIChorus = 0x52, + FillIn = 0x53, + Movie = 0x54, + BGALayer3 = 0x55, + BGALayer4 = 0x56, + BGALayer5 = 0x57, + BGALayer6 = 0x58, + BGALayer7 = 0x59, + MovieFull = 0x5A, + nouse_5b = 0x5B, + nouse_5c = 0x5C, + nouse_5d = 0x5D, + nouse_5e = 0x5E, + nouse_5f = 0x5F, + BGALayer8 = 0x60, + SE01 = 0x61, + SE02 = 0x62, + SE03 = 0x63, + SE04 = 0x64, + SE05 = 0x65, + SE06 = 0x66, + SE07 = 0x67, + SE08 = 0x68, + SE09 = 0x69, //nouse_6a = 0x6A, //nouse_6b = 0x6B, //nouse_6c = 0x6C, //nouse_6d = 0x6D, //nouse_6e = 0x6E, //nouse_6f = 0x6F, - SE10 = 0x70, - SE11 = 0x71, - SE12 = 0x72, - SE13 = 0x73, - SE14 = 0x74, - SE15 = 0x75, - SE16 = 0x76, - SE17 = 0x77, - SE18 = 0x78, - SE19 = 0x79, + SE10 = 0x70, + SE11 = 0x71, + SE12 = 0x72, + SE13 = 0x73, + SE14 = 0x74, + SE15 = 0x75, + SE16 = 0x76, + SE17 = 0x77, + SE18 = 0x78, + SE19 = 0x79, //nouse_7a = 0x7A, //nouse_7b = 0x7B, //nouse_7c = 0x7C, //nouse_7d = 0x7D, //nouse_7e = 0x7E, //nouse_7f = 0x7F, - SE20 = 0x80, - SE21 = 0x81, - SE22 = 0x82, - SE23 = 0x83, - SE24 = 0x84, - SE25 = 0x85, - SE26 = 0x86, - SE27 = 0x87, - SE28 = 0x88, - SE29 = 0x89, + SE20 = 0x80, + SE21 = 0x81, + SE22 = 0x82, + SE23 = 0x83, + SE24 = 0x84, + SE25 = 0x85, + SE26 = 0x86, + SE27 = 0x87, + SE28 = 0x88, + SE29 = 0x89, //nouse_8a = 0x8A, //nouse_8b = 0x8B, //nouse_8c = 0x8C, //nouse_8d = 0x8D, //nouse_8e = 0x8E, //nouse_8f = 0x8F, - SE30 = 0x90, - SE31 = 0x91, - SE32 = 0x92, + SE30 = 0x90, + SE31 = 0x91, + SE32 = 0x92, //nouse_90 = 0x90, //nouse_91 = 0x91, //nouse_92 = 0x92, @@ -204,21 +204,21 @@ namespace DTXMania /// /// 0xA0 Bs. Open /// - Bass_Open = 0xA0, - Bass_xxB = 0xA1, - Bass_xGx = 0xA2, - Bass_xGB = 0xA3, - Bass_Rxx = 0xA4, - Bass_RxB = 0xA5, - Bass_RGx = 0xA6, + Bass_Open = 0xA0, + Bass_xxB = 0xA1, + Bass_xGx = 0xA2, + Bass_xGB = 0xA3, + Bass_Rxx = 0xA4, + Bass_RxB = 0xA5, + Bass_RGx = 0xA6, /// /// 0xA7 Bs. RGB /// - Bass_RGB = 0xA7, + Bass_RGB = 0xA7, /// /// 0xA8 Bs. Wailing /// - Bass_Wailing = 0xA8, + Bass_Wailing = 0xA8, //nouse_a9 = 0xA9, //nouse_aa = 0xAA, //nouse_ab = 0xAB, @@ -228,31 +228,31 @@ namespace DTXMania /// /// 0xAF Bs. Wailing Sound /// - Bass_WailingSound = 0xAF, + Bass_WailingSound = 0xAF, //nouse_b0 = 0xB0, - HiHatClose_NoChip = 0xB1, - Snare_NoChip = 0xB2, - BassDrum_NoChip = 0xB3, - HighTom_NoChip = 0xB4, - LowTom_NoChip = 0xB5, - Cymbal_NoChip = 0xB6, - FloorTom_NoChip = 0xB7, - HiHatOpen_NoChip = 0xB8, - RideCymbal_NoChip = 0xB9, - Guitar_NoChip = 0xBA, - Bass_NoChip = 0xBB, - LeftCymbal_NoChip = 0xBC, - LeftPedal_NoChip = 0xBD, - LeftBassDrum_NoChip = 0xBE, + HiHatClose_NoChip = 0xB1, + Snare_NoChip = 0xB2, + BassDrum_NoChip = 0xB3, + HighTom_NoChip = 0xB4, + LowTom_NoChip = 0xB5, + Cymbal_NoChip = 0xB6, + FloorTom_NoChip = 0xB7, + HiHatOpen_NoChip = 0xB8, + RideCymbal_NoChip = 0xB9, + Guitar_NoChip = 0xBA, + Bass_NoChip = 0xBB, + LeftCymbal_NoChip = 0xBC, + LeftPedal_NoChip = 0xBD, + LeftBassDrum_NoChip = 0xBE, //nouse_bf = 0xBF, //nouse_c0 = 0xC0, - BeatLineShift = 0xC1, - BeatLineDisplay = 0xC2, + BeatLineShift = 0xC1, + BeatLineDisplay = 0xC2, //nouse_c3 = 0xC3, - BGALayer1_Swap = 0xC4, + BGALayer1_Swap = 0xC4, //nouse_c5 = 0xC5, //nouse_c6 = 0xC6, - BGALayer2_Swap = 0xC7, + BGALayer2_Swap = 0xC7, //nouse_c8 = 0xC8, //nouse_c9 = 0xC9, //nouse_ca = 0xCA, @@ -266,18 +266,18 @@ namespace DTXMania //nouse_d2 = 0xD2, //nouse_d3 = 0xD3, //nouse_d4 = 0xD4, - BGALayer3_Swap = 0xD5, - BGALayer4_Swap = 0xD6, - BGALayer5_Swap = 0xD7, - BGALayer6_Swap = 0xD8, - BGALayer7_Swap = 0xD9, - MixerAdd = 0xDA, - MixerRemove = 0xDB, + BGALayer3_Swap = 0xD5, + BGALayer4_Swap = 0xD6, + BGALayer5_Swap = 0xD7, + BGALayer6_Swap = 0xD8, + BGALayer7_Swap = 0xD9, + MixerAdd = 0xDA, + MixerRemove = 0xDB, //nouse_dc = 0xDC, //nouse_dd = 0xDD, //nouse_de = 0xDE, //nouse_df = 0xDF, - BGALayer8_Swap = 0xE0, + BGALayer8_Swap = 0xE0, //nouse_e1 = 0xE1, //nouse_e2 = 0xE2, //nouse_e3 = 0xE3, @@ -310,7 +310,7 @@ namespace DTXMania //nouse_fe = 0xFE, //nouse_ff = 0xFF, } - + public enum ECYGroup { 打ち分ける, @@ -341,78 +341,78 @@ namespace DTXMania } public enum Eダメージレベル { - 少ない = 0, - 普通 = 1, - 大きい = 2 + 少ない = 0, + 普通 = 1, + 大きい = 2 } public enum Eパッド // 演奏用のenum。ここを修正するときは、次に出てくる EKeyConfigPad と EパッドFlag もセットで修正すること。 { - HH = 0, - R = 0, - SD = 1, - G = 1, - BD = 2, - B = 2, - HT = 3, - Pick = 3, - LT = 4, - Wail = 4, - FT = 5, - Cancel = 5, - CY = 6, - Decide = 6, - HHO = 7, - RD = 8, - LC = 9, - HP = 10, // #27029 2012.1.4 from + HH = 0, + R = 0, + SD = 1, + G = 1, + BD = 2, + B = 2, + HT = 3, + Pick = 3, + LT = 4, + Wail = 4, + FT = 5, + Cancel = 5, + CY = 6, + Decide = 6, + HHO = 7, + RD = 8, + LC = 9, + HP = 10, // #27029 2012.1.4 from MAX, // 門番用として定義 UNKNOWN = 99 } public enum EKeyConfigPad // #24609 キーコンフィグで使うenum。capture要素あり。 { - HH = Eパッド.HH, - R = Eパッド.R, - SD = Eパッド.SD, - G = Eパッド.G, - BD = Eパッド.BD, - B = Eパッド.B, - HT = Eパッド.HT, - Pick = Eパッド.Pick, - LT = Eパッド.LT, - Wail = Eパッド.Wail, - FT = Eパッド.FT, - Cancel = Eパッド.Cancel, - CY = Eパッド.CY, - Decide = Eパッド.Decide, - HHO = Eパッド.HHO, - RD = Eパッド.RD, - LC = Eパッド.LC, - HP = Eパッド.HP, // #27029 2012.1.4 from + HH = Eパッド.HH, + R = Eパッド.R, + SD = Eパッド.SD, + G = Eパッド.G, + BD = Eパッド.BD, + B = Eパッド.B, + HT = Eパッド.HT, + Pick = Eパッド.Pick, + LT = Eパッド.LT, + Wail = Eパッド.Wail, + FT = Eパッド.FT, + Cancel = Eパッド.Cancel, + CY = Eパッド.CY, + Decide = Eパッド.Decide, + HHO = Eパッド.HHO, + RD = Eパッド.RD, + LC = Eパッド.LC, + HP = Eパッド.HP, // #27029 2012.1.4 from Capture, UNKNOWN = Eパッド.UNKNOWN } [Flags] public enum EパッドFlag // #24063 2011.1.16 yyagi コマンド入力用 パッド入力のフラグ化 { - None = 0, - HH = 1, - R = 1, - SD = 2, - G = 2, - B = 4, - BD = 4, - HT = 8, - Pick = 8, - LT = 16, - Wail = 16, - FT = 32, - Cancel = 32, - CY = 64, - Decide = 128, - HHO = 128, - RD = 256, - LC = 512, - HP = 1024, // #27029 + None = 0, + HH = 1, + R = 1, + SD = 2, + G = 2, + B = 4, + BD = 4, + HT = 8, + Pick = 8, + LT = 16, + Wail = 16, + FT = 32, + Cancel = 32, + CY = 64, + Decide = 128, + HHO = 128, + RD = 256, + LC = 512, + HP = 1024, // #27029 UNKNOWN = 2048 } public enum Eランダムモード @@ -434,18 +434,18 @@ namespace DTXMania public enum E楽器パート // ここを修正するときは、セットで次の EKeyConfigPart も修正すること。 { - DRUMS = 0, - GUITAR = 1, - BASS = 2, - UNKNOWN = 99 + DRUMS = 0, + GUITAR = 1, + BASS = 2, + UNKNOWN = 99 } public enum EKeyConfigPart // : E楽器パート { - DRUMS = E楽器パート.DRUMS, - GUITAR = E楽器パート.GUITAR, - BASS = E楽器パート.BASS, + DRUMS = E楽器パート.DRUMS, + GUITAR = E楽器パート.GUITAR, + BASS = E楽器パート.BASS, SYSTEM, - UNKNOWN = E楽器パート.UNKNOWN + UNKNOWN = E楽器パート.UNKNOWN } public enum E打ち分け時の再生の優先順位 @@ -455,20 +455,20 @@ namespace DTXMania } public enum E入力デバイス { - キーボード = 0, - MIDI入力 = 1, - ジョイパッド = 2, - マウス = 3, - 不明 = -1 + キーボード = 0, + MIDI入力 = 1, + ジョイパッド = 2, + マウス = 3, + 不明 = -1 } public enum E判定 { - Perfect = 0, - Great = 1, - Good = 2, - Poor = 3, - Miss = 4, - Bad = 5, + Perfect = 0, + Great = 1, + Good = 2, + Poor = 3, + Miss = 4, + Bad = 5, Auto } public enum E判定文字表示位置 @@ -480,7 +480,7 @@ namespace DTXMania } public enum E判定位置 { - 標準 = 0, + 標準 = 0, Lower, MAX } @@ -592,82 +592,82 @@ namespace DTXMania FULL // チップを常に透明化する } - /// - /// 使用するAUTOゴーストデータの種類 (#35411 chnmr0) - /// - public enum EAutoGhostData - { - PERFECT = 0, // 従来のAUTO - LAST_PLAY = 1, // (.score.ini) の LastPlay ゴースト - HI_SKILL = 2, // (.score.ini) の HiSkill ゴースト - HI_SCORE = 3, // (.score.ini) の HiScore ゴースト - ONLINE = 4 // オンラインゴースト (DTXMOS からプラグインが取得、本体のみでは指定しても無効) - } + /// + /// 使用するAUTOゴーストデータの種類 (#35411 chnmr0) + /// + public enum EAutoGhostData + { + PERFECT = 0, // 従来のAUTO + LAST_PLAY = 1, // (.score.ini) の LastPlay ゴースト + HI_SKILL = 2, // (.score.ini) の HiSkill ゴースト + HI_SCORE = 3, // (.score.ini) の HiScore ゴースト + ONLINE = 4 // オンラインゴースト (DTXMOS からプラグインが取得、本体のみでは指定しても無効) + } - /// - /// 使用するターゲットゴーストデータの種類 (#35411 chnmr0) - /// ここでNONE以外を指定してかつ、ゴーストが利用可能な場合グラフの目標値に描画される - /// NONE の場合従来の動作 - /// - public enum ETargetGhostData - { - NONE = 0, - PERFECT = 1, - LAST_PLAY = 2, // (.score.ini) の LastPlay ゴースト - HI_SKILL = 3, // (.score.ini) の HiSkill ゴースト - HI_SCORE = 4, // (.score.ini) の HiScore ゴースト - ONLINE = 5 // オンラインゴースト (DTXMOS からプラグインが取得、本体のみでは指定しても無効) - } + /// + /// 使用するターゲットゴーストデータの種類 (#35411 chnmr0) + /// ここでNONE以外を指定してかつ、ゴーストが利用可能な場合グラフの目標値に描画される + /// NONE の場合従来の動作 + /// + public enum ETargetGhostData + { + NONE = 0, + PERFECT = 1, + LAST_PLAY = 2, // (.score.ini) の LastPlay ゴースト + HI_SKILL = 3, // (.score.ini) の HiSkill ゴースト + HI_SCORE = 4, // (.score.ini) の HiScore ゴースト + ONLINE = 5 // オンラインゴースト (DTXMOS からプラグインが取得、本体のみでは指定しても無効) + } /// /// Drum/Guitar/Bass の値を扱う汎用の構造体。 /// /// 値の型。 [Serializable] - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] public struct STDGBVALUE // indexはE楽器パートと一致させること { public T Drums; public T Guitar; public T Bass; public T Unknown; - public T this[ int index ] + public T this[int index] { get { - switch( index ) + switch (index) { - case (int) E楽器パート.DRUMS: + case (int)E楽器パート.DRUMS: return this.Drums; - case (int) E楽器パート.GUITAR: + case (int)E楽器パート.GUITAR: return this.Guitar; - case (int) E楽器パート.BASS: + case (int)E楽器パート.BASS: return this.Bass; - case (int) E楽器パート.UNKNOWN: + case (int)E楽器パート.UNKNOWN: return this.Unknown; } throw new IndexOutOfRangeException(); } set { - switch( index ) + switch (index) { - case (int) E楽器パート.DRUMS: + case (int)E楽器パート.DRUMS: this.Drums = value; return; - case (int) E楽器パート.GUITAR: + case (int)E楽器パート.GUITAR: this.Guitar = value; return; - case (int) E楽器パート.BASS: + case (int)E楽器パート.BASS: this.Bass = value; return; - case (int) E楽器パート.UNKNOWN: + case (int)E楽器パート.UNKNOWN: this.Unknown = value; return; } @@ -680,7 +680,7 @@ namespace DTXMania /// レーンの値を扱う汎用の構造体。列挙型"Eドラムレーン"に準拠。 /// /// 値の型。 - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] public struct STLANEVALUE { public T LC; @@ -706,122 +706,122 @@ namespace DTXMania public T BsW; public T BGM; - public T this[ int index ] + public T this[int index] { get { - switch ( index ) + switch (index) { - case (int) Eレーン.LC: + case (int)Eレーン.LC: return this.LC; - case (int) Eレーン.HH: + case (int)Eレーン.HH: return this.HH; - case (int) Eレーン.SD: + case (int)Eレーン.SD: return this.SD; - case (int) Eレーン.BD: + case (int)Eレーン.BD: return this.BD; - case (int) Eレーン.HT: + case (int)Eレーン.HT: return this.HT; - case (int) Eレーン.LT: + case (int)Eレーン.LT: return this.LT; - case (int) Eレーン.FT: + case (int)Eレーン.FT: return this.FT; - case (int) Eレーン.CY: + case (int)Eレーン.CY: return this.CY; - case (int) Eレーン.RD: + case (int)Eレーン.RD: return this.RD; - case (int) Eレーン.Guitar: + case (int)Eレーン.Guitar: return this.Guitar; - case (int) Eレーン.Bass: + case (int)Eレーン.Bass: return this.Bass; - case (int) Eレーン.GtR: + case (int)Eレーン.GtR: return this.GtR; - case (int) Eレーン.GtG: + case (int)Eレーン.GtG: return this.GtG; - case (int) Eレーン.GtB: + case (int)Eレーン.GtB: return this.GtB; - case (int) Eレーン.GtPick: + case (int)Eレーン.GtPick: return this.GtPick; - case (int) Eレーン.GtW: + case (int)Eレーン.GtW: return this.GtW; - case (int) Eレーン.BsR: + case (int)Eレーン.BsR: return this.BsR; - case (int) Eレーン.BsG: + case (int)Eレーン.BsG: return this.BsG; - case (int) Eレーン.BsB: + case (int)Eレーン.BsB: return this.BsB; - case (int) Eレーン.BsPick: + case (int)Eレーン.BsPick: return this.BsPick; - case (int) Eレーン.BsW: + case (int)Eレーン.BsW: return this.BsW; } throw new IndexOutOfRangeException(); } set { - switch ( index ) + switch (index) { - case (int) Eレーン.LC: + case (int)Eレーン.LC: this.LC = value; return; - case (int) Eレーン.HH: + case (int)Eレーン.HH: this.HH = value; return; - case (int) Eレーン.SD: + case (int)Eレーン.SD: this.SD = value; return; - case (int) Eレーン.BD: + case (int)Eレーン.BD: this.BD = value; return; - case (int) Eレーン.HT: + case (int)Eレーン.HT: this.HT = value; return; - case (int) Eレーン.LT: + case (int)Eレーン.LT: this.LT = value; return; - case (int) Eレーン.FT: + case (int)Eレーン.FT: this.FT = value; return; - case (int) Eレーン.CY: + case (int)Eレーン.CY: this.CY = value; return; - case (int) Eレーン.RD: + case (int)Eレーン.RD: this.RD = value; return; - case (int) Eレーン.Guitar: + case (int)Eレーン.Guitar: this.Guitar = value; return; - case (int) Eレーン.Bass: + case (int)Eレーン.Bass: this.Bass = value; return; - case (int) Eレーン.GtR: + case (int)Eレーン.GtR: this.GtR = value; return; - case (int) Eレーン.GtG: + case (int)Eレーン.GtG: this.GtG = value; return; - case (int) Eレーン.GtB: + case (int)Eレーン.GtB: this.GtB = value; return; - case (int) Eレーン.GtPick: + case (int)Eレーン.GtPick: this.GtPick = value; return; - case (int) Eレーン.GtW: + case (int)Eレーン.GtW: this.GtW = value; return; - case (int) Eレーン.BsR: + case (int)Eレーン.BsR: this.BsR = value; return; - case (int) Eレーン.BsG: + case (int)Eレーン.BsG: this.BsG = value; return; - case (int) Eレーン.BsB: + case (int)Eレーン.BsB: this.BsB = value; return; - case (int) Eレーン.BsPick: + case (int)Eレーン.BsPick: this.BsPick = value; return; - case (int) Eレーン.BsW: + case (int)Eレーン.BsW: this.BsW = value; return; } @@ -831,7 +831,7 @@ namespace DTXMania } - [StructLayout( LayoutKind.Sequential )] + [StructLayout(LayoutKind.Sequential)] public struct STAUTOPLAY // Eレーンとindexを一致させること { public bool LC; // 0 @@ -855,132 +855,132 @@ namespace DTXMania public bool BsB; // 18 public bool BsPick; // 19 public bool BsW; // 20 - public bool this[ int index ] + public bool this[int index] { get { - switch ( index ) + switch (index) { - case (int) Eレーン.LC: + case (int)Eレーン.LC: return this.LC; - case (int) Eレーン.HH: + case (int)Eレーン.HH: return this.HH; - case (int) Eレーン.SD: + case (int)Eレーン.SD: return this.SD; - case (int) Eレーン.BD: + case (int)Eレーン.BD: return this.BD; - case (int) Eレーン.HT: + case (int)Eレーン.HT: return this.HT; - case (int) Eレーン.LT: + case (int)Eレーン.LT: return this.LT; - case (int) Eレーン.FT: + case (int)Eレーン.FT: return this.FT; - case (int) Eレーン.CY: + case (int)Eレーン.CY: return this.CY; - case (int) Eレーン.RD: + case (int)Eレーン.RD: return this.RD; - case (int) Eレーン.Guitar: - if ( !this.GtR ) return false; - if ( !this.GtG ) return false; - if ( !this.GtB ) return false; - if ( !this.GtPick ) return false; - if ( !this.GtW ) return false; + case (int)Eレーン.Guitar: + if (!this.GtR) return false; + if (!this.GtG) return false; + if (!this.GtB) return false; + if (!this.GtPick) return false; + if (!this.GtW) return false; return true; - case (int) Eレーン.Bass: - if ( !this.BsR ) return false; - if ( !this.BsG ) return false; - if ( !this.BsB) return false; - if ( !this.BsPick ) return false; - if ( !this.BsW ) return false; + case (int)Eレーン.Bass: + if (!this.BsR) return false; + if (!this.BsG) return false; + if (!this.BsB) return false; + if (!this.BsPick) return false; + if (!this.BsW) return false; return true; - case (int) Eレーン.GtR: + case (int)Eレーン.GtR: return this.GtR; - case (int) Eレーン.GtG: + case (int)Eレーン.GtG: return this.GtG; - case (int) Eレーン.GtB: + case (int)Eレーン.GtB: return this.GtB; - case (int) Eレーン.GtPick: + case (int)Eレーン.GtPick: return this.GtPick; - case (int) Eレーン.GtW: + case (int)Eレーン.GtW: return this.GtW; - case (int) Eレーン.BsR: + case (int)Eレーン.BsR: return this.BsR; - case (int) Eレーン.BsG: + case (int)Eレーン.BsG: return this.BsG; - case (int) Eレーン.BsB: + case (int)Eレーン.BsB: return this.BsB; - case (int) Eレーン.BsPick: + case (int)Eレーン.BsPick: return this.BsPick; - case (int) Eレーン.BsW: + case (int)Eレーン.BsW: return this.BsW; } throw new IndexOutOfRangeException(); } set { - switch ( index ) + switch (index) { - case (int) Eレーン.LC: + case (int)Eレーン.LC: this.LC = value; return; - case (int) Eレーン.HH: + case (int)Eレーン.HH: this.HH = value; return; - case (int) Eレーン.SD: + case (int)Eレーン.SD: this.SD = value; return; - case (int) Eレーン.BD: + case (int)Eレーン.BD: this.BD = value; return; - case (int) Eレーン.HT: + case (int)Eレーン.HT: this.HT = value; return; - case (int) Eレーン.LT: + case (int)Eレーン.LT: this.LT = value; return; - case (int) Eレーン.FT: + case (int)Eレーン.FT: this.FT = value; return; - case (int) Eレーン.CY: + case (int)Eレーン.CY: this.CY = value; return; - case (int) Eレーン.RD: + case (int)Eレーン.RD: this.RD = value; return; - case (int) Eレーン.Guitar: + case (int)Eレーン.Guitar: this.GtR = this.GtG = this.GtB = this.GtPick = this.GtW = value; return; - case (int) Eレーン.Bass: + case (int)Eレーン.Bass: this.BsR = this.BsG = this.BsB = this.BsPick = this.BsW = value; return; - case (int) Eレーン.GtR: + case (int)Eレーン.GtR: this.GtR = value; return; - case (int) Eレーン.GtG: + case (int)Eレーン.GtG: this.GtG = value; return; - case (int) Eレーン.GtB: + case (int)Eレーン.GtB: this.GtB = value; return; - case (int) Eレーン.GtPick: + case (int)Eレーン.GtPick: this.GtPick = value; return; - case (int) Eレーン.GtW: + case (int)Eレーン.GtW: this.GtW = value; return; - case (int) Eレーン.BsR: + case (int)Eレーン.BsR: this.BsR = value; return; - case (int) Eレーン.BsG: + case (int)Eレーン.BsG: this.BsG = value; return; - case (int) Eレーン.BsB: + case (int)Eレーン.BsB: this.BsB = value; return; - case (int) Eレーン.BsPick: + case (int)Eレーン.BsPick: this.BsPick = value; return; - case (int) Eレーン.BsW: + case (int)Eレーン.BsW: this.BsW = value; return; } diff --git a/DTXManiaプロジェクト/コード/全体/C文字コンソール.cs b/DTXManiaプロジェクト/コード/全体/C文字コンソール.cs index fcd21c79..e36be8dc 100644 --- a/DTXManiaプロジェクト/コード/全体/C文字コンソール.cs +++ b/DTXManiaプロジェクト/コード/全体/C文字コンソール.cs @@ -29,31 +29,31 @@ namespace DTXMania // メソッド - public void tPrint( int x, int y, Eフォント種別 font, string str英数字文字列 ) + public void tPrint(int x, int y, Eフォント種別 font, string str英数字文字列) { - if( !base.b活性化してない && !string.IsNullOrEmpty( str英数字文字列 ) ) + if (!base.b活性化してない && !string.IsNullOrEmpty(str英数字文字列)) { int BOL = x; - for( int i = 0; i < str英数字文字列.Length; i++ ) + for (int i = 0; i < str英数字文字列.Length; i++) { - char ch = str英数字文字列[ i ]; - if( ch == '\n' ) + char ch = str英数字文字列[i]; + if (ch == '\n') { x = BOL; y += nFontHeight; } else { - int index = str表記可能文字.IndexOf( ch ); - if( index < 0 ) + int index = str表記可能文字.IndexOf(ch); + if (index < 0) { x += nFontWidth; } else { - if( this.txフォント8x16[ (int) ( (int) font / (int) Eフォント種別.白細 ) ] != null ) + if (this.txフォント8x16[(int)((int)font / (int)Eフォント種別.白細)] != null) { - this.txフォント8x16[ (int) ( (int) font / (int) Eフォント種別.白細 ) ].t2D描画( CDTXMania.app.Device, x, y, this.rc文字の矩形領域[ (int) ( (int) font % (int) Eフォント種別.白細 ), index ] ); + this.txフォント8x16[(int)((int)font / (int)Eフォント種別.白細)].t2D描画(CDTXMania.app.Device, x, y, this.rc文字の矩形領域[(int)((int)font % (int)Eフォント種別.白細), index]); } x += nFontWidth; } @@ -67,46 +67,46 @@ namespace DTXMania public override void On活性化() { - this.rc文字の矩形領域 = new Rectangle[3, str表記可能文字.Length ]; - for( int i = 0; i < 3; i++ ) + this.rc文字の矩形領域 = new Rectangle[3, str表記可能文字.Length]; + for (int i = 0; i < 3; i++) { for (int j = 0; j < str表記可能文字.Length; j++) { const int regionX = 128 * 2, regionY = 16; - this.rc文字の矩形領域[ i, j ].X = ( ( i / 2 ) * regionX ) + ( ( j % regionY ) * nFontWidth ); - this.rc文字の矩形領域[ i, j ].Y = ( ( i % 2 ) * regionX ) + ( ( j / regionY ) * nFontHeight ); - this.rc文字の矩形領域[ i, j ].Width = nFontWidth; - this.rc文字の矩形領域[ i, j ].Height = nFontHeight; + this.rc文字の矩形領域[i, j].X = ((i / 2) * regionX) + ((j % regionY) * nFontWidth); + this.rc文字の矩形領域[i, j].Y = ((i % 2) * regionX) + ((j / regionY) * nFontHeight); + this.rc文字の矩形領域[i, j].Width = nFontWidth; + this.rc文字の矩形領域[i, j].Height = nFontHeight; } } base.On活性化(); } public override void On非活性化() { - if( this.rc文字の矩形領域 != null ) + if (this.rc文字の矩形領域 != null) this.rc文字の矩形領域 = null; base.On非活性化(); } public override void OnManagedリソースの作成() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - this.txフォント8x16[ 0 ] = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\Console font 8x16.png" ) ); - this.txフォント8x16[ 1 ] = TextureFactory.tテクスチャの生成( CSkin.Path( @"Graphics\Console font 2 8x16.png" ) ); + this.txフォント8x16[0] = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\Console font 8x16.png")); + this.txフォント8x16[1] = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\Console font 2 8x16.png")); base.OnManagedリソースの作成(); } } public override void OnManagedリソースの解放() { - if( !base.b活性化してない ) + if (!base.b活性化してない) { - for( int i = 0; i < 2; i++ ) + for (int i = 0; i < 2; i++) { - if( this.txフォント8x16[ i ] != null ) + if (this.txフォント8x16[i] != null) { - this.txフォント8x16[ i ].Dispose(); - this.txフォント8x16[ i ] = null; + this.txフォント8x16[i].Dispose(); + this.txフォント8x16[i] = null; } } base.OnManagedリソースの解放(); @@ -121,7 +121,7 @@ namespace DTXMania private Rectangle[,] rc文字の矩形領域; private const string str表記可能文字 = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ "; private const int nFontWidth = 8 * 2, nFontHeight = 16 * 2; - private CTexture[] txフォント8x16 = new CTexture[ 2 ]; + private CTexture[] txフォント8x16 = new CTexture[2]; //----------------- #endregion } diff --git a/DTXManiaプロジェクト/コード/全体/Program.cs b/DTXManiaプロジェクト/コード/全体/Program.cs index 7aa520b7..b0649c09 100644 --- a/DTXManiaプロジェクト/コード/全体/Program.cs +++ b/DTXManiaプロジェクト/コード/全体/Program.cs @@ -17,118 +17,118 @@ namespace DTXMania //----------------------------- private static Mutex mutex二重起動防止用; - private static bool tDLLの存在チェック( string strDll名, string str存在しないときに表示するエラー文字列jp, string str存在しないときに表示するエラー文字列en, bool bLoadDllCheck ) + private static bool tDLLの存在チェック(string strDll名, string str存在しないときに表示するエラー文字列jp, string str存在しないときに表示するエラー文字列en, bool bLoadDllCheck) { - string str存在しないときに表示するエラー文字列 = ( CultureInfo.CurrentCulture.TwoLetterISOLanguageName == "ja" ) ? + string str存在しないときに表示するエラー文字列 = (CultureInfo.CurrentCulture.TwoLetterISOLanguageName == "ja") ? str存在しないときに表示するエラー文字列jp : str存在しないときに表示するエラー文字列en; - if ( bLoadDllCheck ) + if (bLoadDllCheck) { - IntPtr hModule = LoadLibrary( strDll名 ); // 実際にLoadDll()してチェックする - if ( hModule == IntPtr.Zero ) + IntPtr hModule = LoadLibrary(strDll名); // 実際にLoadDll()してチェックする + if (hModule == IntPtr.Zero) { - MessageBox.Show( str存在しないときに表示するエラー文字列, "DTXMania runtime error", MessageBoxButtons.OK, MessageBoxIcon.Hand ); + MessageBox.Show(str存在しないときに表示するエラー文字列, "DTXMania runtime error", MessageBoxButtons.OK, MessageBoxIcon.Hand); return false; } - FreeLibrary( hModule ); + FreeLibrary(hModule); } else { // 単純にファイルの存在有無をチェックするだけ (プロジェクトで「参照」していたり、アンマネージドなDLLが暗黙リンクされるものはこちら) - string path = Path.Combine( System.IO.Directory.GetCurrentDirectory(), strDll名 ); - if ( !File.Exists( path ) ) + string path = Path.Combine(System.IO.Directory.GetCurrentDirectory(), strDll名); + if (!File.Exists(path)) { - MessageBox.Show( str存在しないときに表示するエラー文字列, "DTXMania runtime error", MessageBoxButtons.OK, MessageBoxIcon.Hand ); + MessageBox.Show(str存在しないときに表示するエラー文字列, "DTXMania runtime error", MessageBoxButtons.OK, MessageBoxIcon.Hand); return false; } } return true; } - private static bool tDLLの存在チェック( string strDll名, string str存在しないときに表示するエラー文字列jp, string str存在しないときに表示するエラー文字列en ) + private static bool tDLLの存在チェック(string strDll名, string str存在しないときに表示するエラー文字列jp, string str存在しないときに表示するエラー文字列en) { //return true; - return tDLLの存在チェック( strDll名, str存在しないときに表示するエラー文字列jp, str存在しないときに表示するエラー文字列en, false ); + return tDLLの存在チェック(strDll名, str存在しないときに表示するエラー文字列jp, str存在しないときに表示するエラー文字列en, false); } #region [DllImport] - [DllImport( "kernel32", CharSet = CharSet.Unicode, SetLastError = true )] - internal static extern void FreeLibrary( IntPtr hModule ); + [DllImport("kernel32", CharSet = CharSet.Unicode, SetLastError = true)] + internal static extern void FreeLibrary(IntPtr hModule); - [DllImport( "kernel32", CharSet = CharSet.Unicode, SetLastError = true )] - internal static extern IntPtr LoadLibrary( string lpFileName ); + [DllImport("kernel32", CharSet = CharSet.Unicode, SetLastError = true)] + internal static extern IntPtr LoadLibrary(string lpFileName); #endregion //----------------------------- #endregion - [STAThread] + [STAThread] private static void Main() { - mutex二重起動防止用 = new Mutex( false, "DTXManiaMutex" ); + mutex二重起動防止用 = new Mutex(false, "DTXManiaMutex"); - if ( mutex二重起動防止用.WaitOne( 0, false ) ) + if (mutex二重起動防止用.WaitOne(0, false)) { string newLine = Environment.NewLine; bool bDLLnotfound = false; - Trace.WriteLine( "Current Directory: " + Environment.CurrentDirectory ); - Trace.WriteLine( "EXEのあるフォルダ: " + Path.GetDirectoryName( Application.ExecutablePath ) ); + Trace.WriteLine("Current Directory: " + Environment.CurrentDirectory); + Trace.WriteLine("EXEのあるフォルダ: " + Path.GetDirectoryName(Application.ExecutablePath)); #region [DLLの存在チェック] - if ( !tDLLの存在チェック( "dll\\SlimDX" + CDTXMania.SLIMDXDLL + ".dll", + if (!tDLLの存在チェック("dll\\SlimDX" + CDTXMania.SLIMDXDLL + ".dll", "SlimDX" + CDTXMania.SLIMDXDLL + ".dll またはその依存するdllが存在しません。" + newLine + "DTXManiaをダウンロードしなおしてください。", "SlimDX" + CDTXMania.SLIMDXDLL + ".dll, or its depended DLL, is not found." + newLine + "Please download DTXMania again." - ) ) bDLLnotfound = true; - if ( !tDLLの存在チェック( "dll\\FDK.dll", + )) bDLLnotfound = true; + if (!tDLLの存在チェック("dll\\FDK.dll", "FDK.dll またはその依存するdllが存在しません。" + newLine + "DTXManiaをダウンロードしなおしてください。", "FDK.dll, or its depended DLL, is not found." + newLine + "Please download DTXMania again." - ) ) bDLLnotfound = true; - if ( !tDLLの存在チェック( "xadec.dll", // #35444 2015.8.27 yyagi; Changed dll path + )) bDLLnotfound = true; + if (!tDLLの存在チェック("xadec.dll", // #35444 2015.8.27 yyagi; Changed dll path "xadec.dll が存在しません。" + newLine + "DTXManiaをダウンロードしなおしてください。", "xadec.dll is not found." + newLine + "Please download DTXMania again." - ) ) bDLLnotfound = true; - if ( !tDLLの存在チェック( "dll\\SoundDecoder.dll", + )) bDLLnotfound = true; + if (!tDLLの存在チェック("dll\\SoundDecoder.dll", "SoundDecoder.dll またはその依存するdllが存在しません。" + newLine + "DTXManiaをダウンロードしなおしてください。", "SoundDecoder.dll, or its depended DLL, is not found." + newLine + "Please download DTXMania again." - ) ) bDLLnotfound = true; - if ( !tDLLの存在チェック( CDTXMania.D3DXDLL, + )) bDLLnotfound = true; + if (!tDLLの存在チェック(CDTXMania.D3DXDLL, CDTXMania.D3DXDLL + " が存在しません。" + newLine + "DirectX Redist フォルダの DXSETUP.exe を実行し、" + newLine + "必要な DirectX ランタイムをインストールしてください。", CDTXMania.D3DXDLL + " is not found." + newLine + "Please execute DXSETUP.exe in \"DirectX Redist\" folder, to install DirectX runtimes required for DTXMania.", true - ) ) bDLLnotfound = true; - if ( !tDLLの存在チェック( "dll\\bass.dll", + )) bDLLnotfound = true; + if (!tDLLの存在チェック("dll\\bass.dll", "bass.dll が存在しません。" + newLine + "DTXManiaをダウンロードしなおしてください。", "baas.dll is not found." + newLine + "Please download DTXMania again." - ) ) bDLLnotfound = true; - if ( !tDLLの存在チェック( "dll\\Bass.Net.dll", + )) bDLLnotfound = true; + if (!tDLLの存在チェック("dll\\Bass.Net.dll", "Bass.Net.dll が存在しません。" + newLine + "DTXManiaをダウンロードしなおしてください。", "Bass.Net.dll is not found." + newLine + "Please download DTXMania again." - ) ) bDLLnotfound = true; - if ( !tDLLの存在チェック( "dll\\bassmix.dll", + )) bDLLnotfound = true; + if (!tDLLの存在チェック("dll\\bassmix.dll", "bassmix.dll を読み込めません。bassmix.dll か bass.dll が存在しません。" + newLine + "DTXManiaをダウンロードしなおしてください。", "bassmix.dll is not loaded. bassmix.dll or bass.dll must not exist." + newLine + "Please download DTXMania again." - ) ) bDLLnotfound = true; - if ( !tDLLの存在チェック( "dll\\bassasio.dll", + )) bDLLnotfound = true; + if (!tDLLの存在チェック("dll\\bassasio.dll", "bassasio.dll を読み込めません。bassasio.dll か bass.dll が存在しません。" + newLine + "DTXManiaをダウンロードしなおしてください。", "bassasio.dll is not loaded. bassasio.dll or bass.dll must not exist." + newLine + "Please download DTXMania again." - ) ) bDLLnotfound = true; - if ( !tDLLの存在チェック( "dll\\basswasapi.dll", + )) bDLLnotfound = true; + if (!tDLLの存在チェック("dll\\basswasapi.dll", "basswasapi.dll を読み込めません。basswasapi.dll か bass.dll が存在しません。" + newLine + "DTXManiaをダウンロードしなおしてください。", "basswasapi.dll is not loaded. basswasapi.dll or bass.dll must not exist." + newLine + "Please download DTXMania again." - ) ) bDLLnotfound = true; - if ( !tDLLの存在チェック( "dll\\bass_fx.dll", + )) bDLLnotfound = true; + if (!tDLLの存在チェック("dll\\bass_fx.dll", "bass_fx.dll を読み込めません。bass_fx.dll か bass.dll が存在しません。" + newLine + "DTXManiaをダウンロードしなおしてください。", "bass_fx.dll is not loaded. bass_fx.dll or bass.dll must not exist." + newLine + "Please download DTXMania again." - ) ) bDLLnotfound = true; - if ( !tDLLの存在チェック( "dll\\DirectShowLib-2005.dll", + )) bDLLnotfound = true; + if (!tDLLの存在チェック("dll\\DirectShowLib-2005.dll", "DirectShowLib-2005.dll が存在しません。" + newLine + "DTXManiaをダウンロードしなおしてください。", "DirectShowLib-2005.dll is not found." + newLine + "Please download DTXMania again." - ) ) bDLLnotfound = true; + )) bDLLnotfound = true; #endregion - if ( !bDLLnotfound ) + if (!bDLLnotfound) { #if DEBUG && TEST_ENGLISH Thread.CurrentThread.CurrentCulture = new CultureInfo( "en-US" ); #endif - DWM.EnableComposition( false ); // Disable AeroGrass temporally + DWM.EnableComposition(false); // Disable AeroGrass temporally // BEGIN #23670 2010.11.13 from: キャッチされない例外は放出せずに、ログに詳細を出力する。 // BEGIM #24606 2011.03.08 from: DEBUG 時は例外発生箇所を直接デバッグできるようにするため、例外をキャッチしないようにする。 @@ -136,11 +136,11 @@ namespace DTXMania try #endif { - using ( var mania = new CDTXMania() ) + using (var mania = new CDTXMania()) mania.Run(); - Trace.WriteLine( "" ); - Trace.WriteLine( "遊んでくれてありがとう!" ); + Trace.WriteLine(""); + Trace.WriteLine("遊んでくれてありがとう!"); } #if !DEBUG catch( Exception e ) @@ -155,8 +155,8 @@ namespace DTXMania // END #24606 2011.03.08 from // END #23670 2010.11.13 from - if ( Trace.Listeners.Count > 1 ) - Trace.Listeners.RemoveAt( 1 ); + if (Trace.Listeners.Count > 1) + Trace.Listeners.RemoveAt(1); } // BEGIN #24615 2011.03.09 from: Mutex.WaitOne() が true を返した場合は、Mutex のリリースが必要である。 @@ -168,11 +168,11 @@ namespace DTXMania } else // DTXManiaが既に起動中 { - + // → 引数が0個の時はそのまま終了 // 1個( コンパクトモード or DTXV -S) か2個 (DTXV -Nxxx ファイル名)のときは、そのプロセスにコマンドラインを丸々投げて終了する - for ( int i = 0; i < 5; i++ ) // 検索結果のハンドルがZeroになることがあるので、200ms間隔で5回リトライする + for (int i = 0; i < 5; i++) // 検索結果のハンドルがZeroになることがあるので、200ms間隔で5回リトライする { #region [ 既に起動中のDTXManiaプロセスを検索する。] // このやり方だと、ShowInTaskbar=falseでタスクバーに表示されないパターンの時に検索に失敗するようだが @@ -180,15 +180,15 @@ namespace DTXMania // FindWindowを使えばこのパターンにも対応できるが、C#でビルドするアプリはウインドウクラス名を自前指定できないので、これは使わない。 Process current = Process.GetCurrentProcess(); - Process[] running = Process.GetProcessesByName( current.ProcessName ); + Process[] running = Process.GetProcessesByName(current.ProcessName); Process target = null; //IntPtr hWnd = FindWindow( null, "DTXMania .NET style release " + CDTXMania.app.VERSION ); - foreach ( Process p in running ) + foreach (Process p in running) { - if ( p.Id != current.Id ) // プロセス名は同じでかつ、プロセスIDが自分自身とは異なるものを探す + if (p.Id != current.Id) // プロセス名は同じでかつ、プロセスIDが自分自身とは異なるものを探す { - if ( p.MainModule.FileName == current.MainModule.FileName && p.MainWindowHandle != IntPtr.Zero ) + if (p.MainModule.FileName == current.MainModule.FileName && p.MainWindowHandle != IntPtr.Zero) { target = p; break; @@ -198,29 +198,29 @@ namespace DTXMania #endregion #region [ 起動中のDTXManiaがいれば、そのプロセスにコマンドラインを投げる ] - if ( target != null ) + if (target != null) { string[] commandLineArgs = Environment.GetCommandLineArgs(); - if ( commandLineArgs != null && commandLineArgs.Length > 1 ) + if (commandLineArgs != null && commandLineArgs.Length > 1) { string arg = null; - for ( int j = 1; j < commandLineArgs.Length; j++ ) + for (int j = 1; j < commandLineArgs.Length; j++) { - if ( j == 1 ) + if (j == 1) { - arg += commandLineArgs[ j ]; + arg += commandLineArgs[j]; } else { - arg += " " + "\"" + commandLineArgs[ j ] + "\""; + arg += " " + "\"" + commandLineArgs[j] + "\""; } } -//Trace.TraceInformation( "Message=" + arg + ", len(w/o null)=" + arg.Length ); + //Trace.TraceInformation( "Message=" + arg + ", len(w/o null)=" + arg.Length ); - if ( arg != null ) + if (arg != null) { - FDK.CSendMessage.sendmessage( target.MainWindowHandle, current.MainWindowHandle, arg ); + FDK.CSendMessage.sendmessage(target.MainWindowHandle, current.MainWindowHandle, arg); } } break; @@ -228,8 +228,8 @@ namespace DTXMania #endregion else { - Trace.TraceInformation( "メッセージ送信先のプロセスが見つからず。5回リトライします。" ); - Thread.Sleep( 200 ); + Trace.TraceInformation("メッセージ送信先のプロセスが見つからず。5回リトライします。"); + Thread.Sleep(200); } } } -- 2.11.0