From c232ca0e21c4b1057416191ea7d1ec542ca89223 Mon Sep 17 00:00:00 2001 From: yyagi Date: Wed, 27 Jul 2011 16:06:13 +0000 Subject: [PATCH] =?utf8?q?#23559=20Risky=E3=82=AA=E3=83=97=E3=82=B7?= =?utf8?q?=E3=83=A7=E3=83=B3=E8=BF=BD=E5=8A=A0=20#none=20=E8=8B=A5?= =?utf8?q?=E5=B9=B2=E3=81=AE=E3=82=8A=E3=83=95=E3=82=A1=E3=82=AF=E3=82=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: http://svn.osdn.jp/svnroot/dtxmania/trunk@230 16f42ceb-6dc6-49c8-ba94-f2d53467949d --- .../コード/スコア、曲/CScoreIni.cs | 131 +++++++++++---------- .../04.コンフィグ/CActConfigList.cs | 70 +++++------ .../07.演奏/CStage演奏画面共通.cs | 124 ++++++++----------- .../ギター画面/CAct演奏Guitarゲージ.cs | 18 ++- .../ドラム画面/CAct演奏Drumsゲージ.cs | 6 +- .../コード/全体/CConfigIni.cs | 60 ++++------ 6 files changed, 186 insertions(+), 223 deletions(-) diff --git a/DTXManiaプロジェクト/コード/スコア、曲/CScoreIni.cs b/DTXManiaプロジェクト/コード/スコア、曲/CScoreIni.cs index 7875a4fb..5b6e310c 100644 --- a/DTXManiaプロジェクト/コード/スコア、曲/CScoreIni.cs +++ b/DTXManiaプロジェクト/コード/スコア、曲/CScoreIni.cs @@ -209,7 +209,7 @@ namespace DTXMania public int n全チップ数; public string strDTXManiaのバージョン; public bool レーン9モード; - public int nRiskyMode; // #23559 2011.6.20 yyagi 0=OFF, 1-10=Risky + public int nRisky; // #23559 2011.6.20 yyagi 0=OFF, 1-10=Risky public string 最終更新日時; public C演奏記録() @@ -267,7 +267,7 @@ namespace DTXMania this.最終更新日時 = ""; this.Hash = "00000000000000000000000000000000"; this.レーン9モード = true; - this.nRiskyMode = 0; // #23559 2011.6.20 yyagi + this.nRisky = 0; // #23559 2011.6.20 yyagi } public bool bフルコンボじゃない @@ -472,7 +472,7 @@ namespace DTXMania stream.Read( buffer, 0, (int) stream.Length ); stream.Close(); StringBuilder builder = new StringBuilder(0x21); - using (MD5CryptoServiceProvider m = new MD5CryptoServiceProvider()) // #25650 2011.7.7 yyagi; add Dispose() method to avoid resource leak. + using ( MD5CryptoServiceProvider m = new MD5CryptoServiceProvider() ) // #25650 2011.7.7 yyagi; Using "using" structure to clarify the scope for MD5CryptServiceProvider. { byte[] buffer2 = m.ComputeHash(buffer); foreach (byte num in buffer2) @@ -732,63 +732,67 @@ namespace DTXMania } } } - else if( item.Equals( "TightDrums" ) ) + else if ( item.Equals( "Risky" ) ) + { + c演奏記録.nRisky = int.Parse( para ); + } + else if ( item.Equals( "TightDrums" ) ) { c演奏記録.bTight = C変換.bONorOFF( para[ 0 ] ); } - else if( item.Equals( "SuddenDrums" ) ) + else if ( item.Equals( "SuddenDrums" ) ) { c演奏記録.bSudden.Drums = C変換.bONorOFF( para[ 0 ] ); } - else if( item.Equals( "SuddenGuitar" ) ) + else if ( item.Equals( "SuddenGuitar" ) ) { c演奏記録.bSudden.Guitar = C変換.bONorOFF( para[ 0 ] ); } - else if( item.Equals( "SuddenBass" ) ) + else if ( item.Equals( "SuddenBass" ) ) { c演奏記録.bSudden.Bass = C変換.bONorOFF( para[ 0 ] ); } - else if( item.Equals( "HiddenDrums" ) ) + else if ( item.Equals( "HiddenDrums" ) ) { c演奏記録.bHidden.Drums = C変換.bONorOFF( para[ 0 ] ); } - else if( item.Equals( "HiddenGuitar" ) ) + else if ( item.Equals( "HiddenGuitar" ) ) { c演奏記録.bHidden.Guitar = C変換.bONorOFF( para[ 0 ] ); } - else if( item.Equals( "HiddenBass" ) ) + else if ( item.Equals( "HiddenBass" ) ) { c演奏記録.bHidden.Bass = C変換.bONorOFF( para[ 0 ] ); } - else if( item.Equals( "ReverseDrums" ) ) + else if ( item.Equals( "ReverseDrums" ) ) { c演奏記録.bReverse.Drums = C変換.bONorOFF( para[ 0 ] ); } - else if( item.Equals( "ReverseGuitar" ) ) + else if ( item.Equals( "ReverseGuitar" ) ) { c演奏記録.bReverse.Guitar = C変換.bONorOFF( para[ 0 ] ); } - else if( item.Equals( "ReverseBass" ) ) + else if ( item.Equals( "ReverseBass" ) ) { c演奏記録.bReverse.Bass = C変換.bONorOFF( para[ 0 ] ); } else { - 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; @@ -801,16 +805,16 @@ namespace DTXMania } throw new Exception( "RandomGuitar の値が無効です。" ); } - 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; @@ -828,27 +832,27 @@ namespace DTXMania } throw new Exception( "RandomBass の値が無効です。" ); } - if( item.Equals( "LightGuitar" ) ) + if ( item.Equals( "LightGuitar" ) ) { c演奏記録.bLight.Guitar = C変換.bONorOFF( para[ 0 ] ); } - else if( item.Equals( "LightBass" ) ) + else if ( item.Equals( "LightBass" ) ) { c演奏記録.bLight.Bass = C変換.bONorOFF( para[ 0 ] ); } - else if( item.Equals( "LeftGuitar" ) ) + else if ( item.Equals( "LeftGuitar" ) ) { c演奏記録.bLeft.Guitar = C変換.bONorOFF( para[ 0 ] ); } - else if( item.Equals( "LeftBass" ) ) + else if ( item.Equals( "LeftBass" ) ) { c演奏記録.bLeft.Bass = C変換.bONorOFF( para[ 0 ] ); } else { - if( item.Equals( "Dark" ) ) + if ( item.Equals( "Dark" ) ) { - switch( int.Parse( para ) ) + switch ( int.Parse( para ) ) { case 0: { @@ -868,22 +872,22 @@ namespace DTXMania } throw new Exception( "Dark の値が無効です。" ); } - if( item.Equals( "ScrollSpeedDrums" ) ) + if ( item.Equals( "ScrollSpeedDrums" ) ) { c演奏記録.f譜面スクロール速度.Drums = (float) decimal.Parse( para ); } - else if( item.Equals( "ScrollSpeedGuitar" ) ) + else if ( item.Equals( "ScrollSpeedGuitar" ) ) { c演奏記録.f譜面スクロール速度.Guitar = (float) decimal.Parse( para ); } - else if( item.Equals( "ScrollSpeedBass" ) ) + else if ( item.Equals( "ScrollSpeedBass" ) ) { c演奏記録.f譜面スクロール速度.Bass = (float) decimal.Parse( para ); } - else if( item.Equals( "PlaySpeed" ) ) + else if ( item.Equals( "PlaySpeed" ) ) { string[] strArray2 = para.Split( new char[] { '/' } ); - if( strArray2.Length == 2 ) + if ( strArray2.Length == 2 ) { c演奏記録.n演奏速度分子 = int.Parse( strArray2[ 0 ] ); c演奏記録.n演奏速度分母 = int.Parse( strArray2[ 1 ] ); @@ -891,9 +895,9 @@ namespace DTXMania } else { - if( item.Equals( "HHGroup" ) ) + if ( item.Equals( "HHGroup" ) ) { - switch( int.Parse( para ) ) + switch ( int.Parse( para ) ) { case 0: { @@ -918,9 +922,9 @@ namespace DTXMania } throw new Exception( "HHGroup の値が無効です。" ); } - if( item.Equals( "FTGroup" ) ) + if ( item.Equals( "FTGroup" ) ) { - switch( int.Parse( para ) ) + switch ( int.Parse( para ) ) { case 0: { @@ -935,9 +939,9 @@ namespace DTXMania } throw new Exception( "FTGroup の値が無効です。" ); } - if( item.Equals( "CYGroup" ) ) + if ( item.Equals( "CYGroup" ) ) { - switch( int.Parse( para ) ) + switch ( int.Parse( para ) ) { case 0: { @@ -952,9 +956,9 @@ namespace DTXMania } throw new Exception( "CYGroup の値が無効です。" ); } - if( item.Equals( "HitSoundPriorityHH" ) ) + if ( item.Equals( "HitSoundPriorityHH" ) ) { - switch( int.Parse( para ) ) + switch ( int.Parse( para ) ) { case 0: { @@ -969,9 +973,9 @@ namespace DTXMania } throw new Exception( "HitSoundPriorityHH の値が無効です。" ); } - if( item.Equals( "HitSoundPriorityFT" ) ) + if ( item.Equals( "HitSoundPriorityFT" ) ) { - switch( int.Parse( para ) ) + switch ( int.Parse( para ) ) { case 0: { @@ -986,9 +990,9 @@ namespace DTXMania } throw new Exception( "HitSoundPriorityFT の値が無効です。" ); } - if( item.Equals( "HitSoundPriorityCY" ) ) + if ( item.Equals( "HitSoundPriorityCY" ) ) { - switch( int.Parse( para ) ) + switch ( int.Parse( para ) ) { case 0: { @@ -1003,23 +1007,23 @@ namespace DTXMania } throw new Exception( "HitSoundPriorityCY の値が無効です。" ); } - if( item.Equals( "Guitar" ) ) + if ( item.Equals( "Guitar" ) ) { c演奏記録.bGuitar有効 = C変換.bONorOFF( para[ 0 ] ); } - else if( item.Equals( "Drums" ) ) + else if ( item.Equals( "Drums" ) ) { c演奏記録.bDrums有効 = C変換.bONorOFF( para[ 0 ] ); } - else if( item.Equals( "StageFailed" ) ) + else if ( item.Equals( "StageFailed" ) ) { c演奏記録.bSTAGEFAILED有効 = C変換.bONorOFF( para[ 0 ] ); } else { - if( item.Equals( "DamageLevel" ) ) + if ( item.Equals( "DamageLevel" ) ) { - switch( int.Parse( para ) ) + switch ( int.Parse( para ) ) { case 0: { @@ -1039,51 +1043,51 @@ namespace DTXMania } throw new Exception( "DamageLevel の値が無効です。" ); } - if( item.Equals( "UseKeyboard" ) ) + if ( item.Equals( "UseKeyboard" ) ) { c演奏記録.b演奏にキーボードを使用した = C変換.bONorOFF( para[ 0 ] ); } - else if( item.Equals( "UseMIDIIN" ) ) + else if ( item.Equals( "UseMIDIIN" ) ) { c演奏記録.b演奏にMIDI入力を使用した = C変換.bONorOFF( para[ 0 ] ); } - else if( item.Equals( "UseJoypad" ) ) + else if ( item.Equals( "UseJoypad" ) ) { c演奏記録.b演奏にジョイパッドを使用した = C変換.bONorOFF( para[ 0 ] ); } - else if( item.Equals( "UseMouse" ) ) + else if ( item.Equals( "UseMouse" ) ) { c演奏記録.b演奏にマウスを使用した = C変換.bONorOFF( para[ 0 ] ); } - else if( item.Equals( "PerfectRange" ) ) + else if ( item.Equals( "PerfectRange" ) ) { c演奏記録.nPerfectになる範囲ms = int.Parse( para ); } - else if( item.Equals( "GreatRange" ) ) + else if ( item.Equals( "GreatRange" ) ) { c演奏記録.nGreatになる範囲ms = int.Parse( para ); } - else if( item.Equals( "GoodRange" ) ) + else if ( item.Equals( "GoodRange" ) ) { c演奏記録.nGoodになる範囲ms = int.Parse( para ); } - else if( item.Equals( "PoorRange" ) ) + else if ( item.Equals( "PoorRange" ) ) { 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 ] ); } @@ -1159,6 +1163,7 @@ namespace DTXMania writer.Write( this.stセクション[ i ].bAutoPlay[ j ] ? 1 : 0 ); } writer.WriteLine(); + 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 ); @@ -1335,7 +1340,7 @@ namespace DTXMania byte[] bytes = Encoding.GetEncoding( "shift-jis" ).GetBytes( builder.ToString() ); StringBuilder builder2 = new StringBuilder(0x21); - using (MD5CryptoServiceProvider m = new MD5CryptoServiceProvider()) // #25650 2011.7.7 yyagi; add Dispose() method to avoid resource leak. + using (MD5CryptoServiceProvider m = new MD5CryptoServiceProvider()) // #25650 2011.7.7 yyagi; Using "using" structure to clarify the scope for MD5CryptServiceProvider. { byte[] buffer2 = m.ComputeHash(bytes); foreach (byte num2 in buffer2) diff --git a/DTXManiaプロジェクト/コード/ステージ/04.コンフィグ/CActConfigList.cs b/DTXManiaプロジェクト/コード/ステージ/04.コンフィグ/CActConfigList.cs index 2ff54d05..8043d2c6 100644 --- a/DTXManiaプロジェクト/コード/ステージ/04.コンフィグ/CActConfigList.cs +++ b/DTXManiaプロジェクト/コード/ステージ/04.コンフィグ/CActConfigList.cs @@ -73,6 +73,12 @@ namespace DTXMania "OFF: all display parts are shown.\nHALF: wallpaper, lanes and gauge are\n disappeared.\nFULL: additionaly to HALF, bar/beat\n lines, hit bar, pads are disappeared.", new string[] { "OFF", "HALF", "FULL" } ); this.list項目リスト.Add( this.iCommonDark ); + + this.iSystemRisky = new CItemInteger( "Risky", 0, 10, CDTXMania.ConfigIni.nRisky, + "Riskyモードの設定:\n1以上の値にすると、その回数分の\nPoor/MissでFAILEDとなります。\nOFFにすると無効になり、\nDamageLevelに従ったゲージ増減と\nなります。\nStageFailedの設定と併用できます。", + "Risky mode:\nSet over 1, in case you'd like to specify\n the number of Poor/Miss times to be\n FAILED.\nSet OFF to disable Risky mode." ); + this.list項目リスト.Add( this.iSystemRisky ); + this.iCommonPlaySpeed = new CItemInteger( "PlaySpeed", 5, 40, CDTXMania.ConfigIni.n演奏速度, "曲の演奏速度を、速くしたり遅くした\nりすることができます。\n(※一部のサウンドカードでは正しく\n 再生できない可能性があります。)", "It changes the song speed.\nFor example, you can play in half\n speed by setting PlaySpeed = 0.500\n for your practice.\nNote: It also changes the songs' pitch." ); @@ -117,12 +123,6 @@ namespace DTXMania "BGAの使用:\n画像(BGA)を表示可能にする場合に\nON にします。BGA の再生には、それ\nなりのマシンパワーが必要とされます。", "To draw BGA (back ground animations)\n or not." ); this.list項目リスト.Add( this.iSystemBGA ); - // #24074 2011.01.23 comment-out ikanick オプション(Drums)へ移行 - // this.iSystemGraph = new CItemToggle( "Graph", CDTXMania.ConfigIni.bGraph有効, - // "達成率グラフの使用:\n最高スキル達成率と比較できるグラフ\nを表示する場合にON にします。\nオートプレイだと表示されません。\n現バージョンではドラムのみとなって\nいます。", - // "To draw Graph \n or not."); - // this.list項目リスト.Add( this.iSystemGraph ); - this.iSystemPreviewSoundWait = new CItemInteger( "PreSoundWait", 0, 0x2710, CDTXMania.ConfigIni.n曲が選択されてからプレビュー音が鳴るまでのウェイトms, "プレビュー音演奏までの時間:\n曲にカーソルが合わされてからプレ\nビュー音が鳴り始めるまでの時間を\n指定します。\n0 ~ 10000 [ms] が指定可能です。", "Delay time(ms) to start playing preview\n sound in SELECT MUSIC screen.\nYou can specify from 0ms to 10000ms." ); @@ -148,8 +148,8 @@ namespace DTXMania "Turn ON if you want to be cheered\n at the end of fill-in zone or not." ); this.list項目リスト.Add( this.iSystemAudienceSound ); this.iSystemDamageLevel = new CItemList( "DamageLevel", CItemBase.Eパネル種別.通常, (int) CDTXMania.ConfigIni.eダメージレベル, - "ゲージ減少割合:\nMiss ヒット時のゲージの減少度合い\nを指定します。\n", - "Damage level at missing (and\n recovering level) at playing.", + "ゲージ減少割合:\nMiss ヒット時のゲージの減少度合い\nを指定します。\nRiskyが1以上の場合は無効となります", + "Damage level at missing (and\n recovering level) at playing.\nThis setting is ignored when Risky >= 1.", new string[] { "Small", "Normal", "Large" } ); this.list項目リスト.Add( this.iSystemDamageLevel ); this.iSystemSaveScore = new CItemToggle( "SaveScore", CDTXMania.ConfigIni.bScoreIniを出力する, @@ -541,21 +541,6 @@ namespace DTXMania { this.tConfigIniへ記録する(); } -// else if( ( this.list項目リスト[ this.n現在の選択項目 ] == this.iSystemGuitar ) || ( this.list項目リスト[ this.n現在の選択項目 ] == this.iSystemDrums ) ) -// { -// this.list項目リスト[ this.n現在の選択項目 ].tEnter押下(); -// if( !this.iSystemGuitar.bON && !this.iSystemDrums.bON ) -// { -// if( this.list項目リスト[ this.n現在の選択項目 ] == this.iSystemGuitar ) -// { -// this.iSystemDrums.bON = true; -// } -// else -// { -// this.iSystemGuitar.bON = true; -// } -// } -// } else if( this.list項目リスト[ this.n現在の選択項目 ] == this.iKeyAssignDrumsLC ) { CDTXMania.stageコンフィグ.tパッド選択通知( EKeyConfigPart.DRUMS, EKeyConfigPad.LC ); @@ -1091,25 +1076,25 @@ namespace DTXMania } if( this.b項目リスト側にフォーカスがある && ( this.n目標のスクロールカウンタ == 0 ) ) { - int num11; - int num12; - int num13; + int x; + int y_upper; + int y_lower; if( !this.b要素値にフォーカス中 ) { - num11 = 0x114; - num12 = 0xba - this.ct三角矢印アニメ.n現在の値; - num13 = 0xfe + this.ct三角矢印アニメ.n現在の値; + x = 0x114; + y_upper = 0xba - this.ct三角矢印アニメ.n現在の値; + y_lower = 0xfe + this.ct三角矢印アニメ.n現在の値; } else { - num11 = 0x210; - num12 = 0xc6 - this.ct三角矢印アニメ.n現在の値; - num13 = 0xf2 + this.ct三角矢印アニメ.n現在の値; + x = 0x210; + y_upper = 0xc6 - this.ct三角矢印アニメ.n現在の値; + y_lower = 0xf2 + this.ct三角矢印アニメ.n現在の値; } if( this.tx三角矢印 != null ) { - this.tx三角矢印.t2D描画( CDTXMania.app.Device, num11, num12, new Rectangle( 0, 0, 0x20, 0x10 ) ); - this.tx三角矢印.t2D描画( CDTXMania.app.Device, num11, num13, new Rectangle( 0, 0x10, 0x20, 0x10 ) ); + this.tx三角矢印.t2D描画( CDTXMania.app.Device, x, y_upper, new Rectangle( 0, 0, 0x20, 0x10 ) ); + this.tx三角矢印.t2D描画( CDTXMania.app.Device, x, y_lower, new Rectangle( 0, 0x10, 0x20, 0x10 ) ); } } } @@ -1206,9 +1191,11 @@ namespace DTXMania private CItemToggle iSystemStageFailed; private CItemToggle iSystemStoicMode; private CItemToggle iSystemVSyncWait; - private CItemToggle iSystemShowLag; // #25370 2011.6.3 yyagi - private CItemToggle iSystemAutoResultCapture; // #25399 2011.6.9 yyagi + private CItemToggle 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 List list項目リスト; private long nスクロール用タイマ値; private int n現在のスクロールカウンタ; @@ -1270,7 +1257,6 @@ namespace DTXMania private CItemInteger iGuitarInputAdjustTimeMs; // private CItemInteger iBassInputAdjustTimeMs; // - private int t前の項目( int nItem ) { if( --nItem < 0 ) @@ -1362,8 +1348,10 @@ namespace DTXMania CDTXMania.ConfigIni.n自動再生音量 = this.iSystemAutoChipVolume.n現在の値; CDTXMania.ConfigIni.bストイックモード = this.iSystemStoicMode.bON; - CDTXMania.ConfigIni.bIsShowingLag = this.iSystemShowLag.bON; // #25370 2011.6.3 yyagi - CDTXMania.ConfigIni.bIsAutoResultCapture = this.iSystemAutoResultCapture.bON; // #25399 2011.6.9 yyagi + CDTXMania.ConfigIni.bIsShowingLag = this.iSystemShowLag.bON; // #25370 2011.6.3 yyagi + CDTXMania.ConfigIni.bIsAutoResultCapture = this.iSystemAutoResultCapture.bON; // #25399 2011.6.9 yyagi + + CDTXMania.ConfigIni.nRisky = this.iSystemRisky.n現在の値; // #23559 2911.7.27 yyagi } private void tConfigIniへ記録する・Bass() { @@ -1381,9 +1369,7 @@ namespace DTXMania CDTXMania.ConfigIni.b演奏音を強調する.Bass = this.iSystemSoundMonitorBass.bON; CDTXMania.ConfigIni.n表示可能な最小コンボ数.Bass = this.iSystemMinComboBass.n現在の値; } -// private void tConfigIniへ記録する・Common() -// { -// } + private void tConfigIniへ記録する・Drums() { CDTXMania.ConfigIni.bAutoPlay.LC = this.iDrumsLeftCymbal.bON; diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CStage演奏画面共通.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CStage演奏画面共通.cs index 3b496d8f..9f0203a6 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/CStage演奏画面共通.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/CStage演奏画面共通.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Text; +using System.Runtime; using System.Runtime.InteropServices; using System.Drawing; using System.Drawing.Imaging; @@ -269,6 +270,8 @@ namespace DTXMania CDTXMania.DTX.SwapGuitarBassInfos(); } this.sw = new Stopwatch(); +// this.gclatencymode = GCSettings.LatencyMode; +// GCSettings.LatencyMode = GCLatencyMode.LowLatency; // GCのgen2はせいぜい1演奏辺り1,2回しか発生しないので、ここでわざわざGC gen2は抑止しない } public override void On非活性化() { @@ -282,6 +285,7 @@ namespace DTXMania this.ctチップ模様アニメ.Drums = null; this.ctチップ模様アニメ.Guitar = null; this.ctチップ模様アニメ.Bass = null; +// GCSettings.LatencyMode = this.gclatencymode; base.On非活性化(); } public override void OnManagedリソースの作成() @@ -535,7 +539,7 @@ namespace DTXMania protected CConfigIni.STAUTOPLAY bIsAutoPlay; // #24239 2011.1.23 yyagi protected Stopwatch sw; // 2011.6.13 最適化検討用のストップウォッチ - +// protected GCLatencyMode gclatencymode; protected E判定 e指定時刻からChipのJUDGEを返す( long nTime, CDTX.CChip pChip, int nInputAdjustTime ) { @@ -998,69 +1002,37 @@ namespace DTXMania break; case E楽器パート.GUITAR: - switch ( eJudgeResult ) - { - case E判定.Miss: - case E判定.Bad: - this.nヒット数・Auto含む.Guitar.Miss++; - if ( !bPChipIsAutoPlay ) - { - this.nヒット数・Auto含まない.Guitar.Miss++; - } - break; - default: // #24068 2011.1.10 ikanick changed - // #24167 2011.1.16 yyagi changed - this.nヒット数・Auto含む.Guitar[ (int) eJudgeResult ]++; - if ( !bPChipIsAutoPlay ) - { - this.nヒット数・Auto含まない.Guitar[ (int) eJudgeResult ]++; - } - break; - } - switch ( eJudgeResult ) - { - case E判定.Perfect: - case E判定.Great: - case E判定.Good: - this.actCombo.n現在のコンボ数.Guitar++; - break; - - default: - this.actCombo.n現在のコンボ数.Guitar = 0; - break; - } - break; - case E楽器パート.BASS: + int indexInst = (int) pChip.e楽器パート; switch ( eJudgeResult ) { case E判定.Miss: case E判定.Bad: - this.nヒット数・Auto含む.Bass.Miss++; + this.nヒット数・Auto含む[ indexInst ].Miss++; if ( !bPChipIsAutoPlay ) { - this.nヒット数・Auto含まない.Bass.Miss++; + this.nヒット数・Auto含まない[ indexInst ].Miss++; } break; default: // #24068 2011.1.10 ikanick changed - this.nヒット数・Auto含む.Bass[ (int) eJudgeResult ]++; + // #24167 2011.1.16 yyagi changed + this.nヒット数・Auto含む[ indexInst ][ (int) eJudgeResult ]++; if ( !bPChipIsAutoPlay ) { - this.nヒット数・Auto含まない.Bass[ (int) eJudgeResult ]++; + this.nヒット数・Auto含まない[ indexInst ][ (int) eJudgeResult ]++; } break; } - switch ( eJudgeResult ) { case E判定.Perfect: case E判定.Great: case E判定.Good: - this.actCombo.n現在のコンボ数.Bass++; + this.actCombo.n現在のコンボ数[ indexInst ]++; break; default: - this.actCombo.n現在のコンボ数.Bass = 0; + this.actCombo.n現在のコンボ数[ indexInst ] = 0; break; } break; @@ -1070,28 +1042,16 @@ namespace DTXMania } if ( ( !bPChipIsAutoPlay && ( pChip.e楽器パート != E楽器パート.UNKNOWN ) ) && ( eJudgeResult != E判定.Miss ) && ( eJudgeResult != E判定.Bad ) ) { - int nCombos = 0; - switch ( pChip.e楽器パート ) - { - case E楽器パート.DRUMS: - nCombos = this.actCombo.n現在のコンボ数.Drums; - break; - case E楽器パート.GUITAR: - nCombos = this.actCombo.n現在のコンボ数.Guitar; - break; - case E楽器パート.BASS: - nCombos = this.actCombo.n現在のコンボ数.Bass; - break; - } + int nCombos = this.actCombo.n現在のコンボ数[ (int) pChip.e楽器パート ]; long nScore = this.actScore.Get( pChip.e楽器パート ); - long[] numArray = new long[] { 350L, 200L, 50L, 0L }; + long[] nComboScoreDelta = new long[] { 350L, 200L, 50L, 0L }; if ( ( nCombos <= 500 ) || ( eJudgeResult == E判定.Good ) ) { - nScore += numArray[ (int) eJudgeResult ] * nCombos; + nScore += nComboScoreDelta[ (int) eJudgeResult ] * nCombos; } else if ( ( eJudgeResult == E判定.Perfect ) || ( eJudgeResult == E判定.Great ) ) { - nScore += numArray[ (int) eJudgeResult ] * 500L; + nScore += nComboScoreDelta[ (int) eJudgeResult ] * 500L; } this.actScore.Set( pChip.e楽器パート, nScore ); } @@ -1338,8 +1298,10 @@ namespace DTXMania if ( ( !this.bPAUSE && ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED ) ) && ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト ) ) { this.t入力処理・ドラム(); - this.t入力処理・ギター(); - this.t入力処理・ベース(); + //this.t入力処理・ギター(); + //this.t入力処理・ベース(); + this.t入力処理・ギターベース( E楽器パート.GUITAR ); + this.t入力処理・ギターベース( E楽器パート.BASS ); if ( keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.UpArrow ) && ( keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.RightShift ) || keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.LeftShift ) ) ) { // shift (+ctrl) + UpArrow (BGMAdjust) CDTXMania.DTX.t各自動再生音チップの再生時刻を変更する( ( keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.LeftControl ) || keyboard.bキーが押されている( (int) SlimDX.DirectInput.Key.RightControl ) ) ? 1 : 10 ); @@ -1526,7 +1488,8 @@ namespace DTXMania CDTX dTX = CDTXMania.DTX; CConfigIni configIni = CDTXMania.ConfigIni; - while ( nCurrentTopChip < dTX.listChip.Count ) +// while ( nCurrentTopChip < dTX.listChip.Count ) + for ( ; nCurrentTopChip < dTX.listChip.Count; nCurrentTopChip++ ) { CDTX.CChip pChip = dTX.listChip[ nCurrentTopChip ]; pChip.nバーからの距離dot.Drums = (int) ( ( pChip.n発声時刻ms - CDTXMania.Timer.n現在時刻 ) * ScrollSpeedDrums ); @@ -1538,8 +1501,8 @@ namespace DTXMania } if ( ( ( nCurrentTopChip == this.n現在のトップChip ) && ( pChip.nバーからの距離dot.Drums < -65 ) ) && pChip.bHit ) { - this.n現在のトップChip++; - nCurrentTopChip = this.n現在のトップChip; + //this.n現在のトップChip++; + nCurrentTopChip = ++this.n現在のトップChip; continue; } @@ -1910,7 +1873,7 @@ namespace DTXMania #endregion } - nCurrentTopChip++; +// nCurrentTopChip++; } return false; } @@ -2003,14 +1966,14 @@ namespace DTXMania } protected void t進行描画・レーンフラッシュD() { - if ( ( ( CDTXMania.ConfigIni.eDark != Eダークモード.HALF ) && ( CDTXMania.ConfigIni.eDark != Eダークモード.FULL ) ) && ( ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED ) && ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト ) ) ) + if ( ( CDTXMania.ConfigIni.eDark == Eダークモード.OFF ) && ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED ) && ( base.eフェーズID != CStage.Eフェーズ.演奏_STAGE_FAILED_フェードアウト ) ) { this.actLaneFlushD.On進行描画(); } } protected void t進行描画・レーンフラッシュGB() { - if ( ( ( CDTXMania.ConfigIni.eDark != Eダークモード.HALF ) && ( CDTXMania.ConfigIni.eDark != Eダークモード.FULL ) ) && CDTXMania.ConfigIni.bGuitar有効 ) + if ( ( CDTXMania.ConfigIni.eDark != Eダークモード.OFF ) && CDTXMania.ConfigIni.bGuitar有効 ) { this.actLaneFlushGB.On進行描画(); } @@ -2339,6 +2302,7 @@ namespace DTXMania protected void t判定にあわせてゲージを増減する( E楽器パート screenmode, E楽器パート part, E判定 e今回の判定 ) { double fDamage; + int nRisky = CDTXMania.ConfigIni.nRisky; #if true // DAMAGELEVELTUNING switch ( e今回の判定 ) @@ -2346,18 +2310,16 @@ namespace DTXMania case E判定.Perfect: case E判定.Great: case E判定.Good: + fDamage = ( nRisky > 0 ) ? 0 : fDamageGaugeDelta[ (int) e今回の判定, (int) part ]; + break; case E判定.Poor: - fDamage = fDamageGaugeDelta[ (int) e今回の判定, (int) part ]; + fDamage = ( nRisky > 0 ) ? ( -1.1 / nRisky ) : fDamageGaugeDelta[ (int) e今回の判定, (int) part ]; break; case E判定.Miss: - fDamage = fDamageGaugeDelta[ (int) e今回の判定, (int) part ]; - switch ( CDTXMania.ConfigIni.eダメージレベル ) + fDamage = ( nRisky > 0 ) ? ( -1.1 / nRisky ) : fDamageGaugeDelta[ (int) e今回の判定, (int) part ]; + if ( nRisky == 0 ) { - case Eダメージレベル.少ない: - case Eダメージレベル.普通: - case Eダメージレベル.大きい: - fDamage *= fDamageLevelFactor[ (int) CDTXMania.ConfigIni.eダメージレベル ]; - break; + fDamage *= fDamageLevelFactor[ (int) CDTXMania.ConfigIni.eダメージレベル ]; } break; @@ -2410,10 +2372,22 @@ namespace DTXMania if ( screenmode == E楽器パート.DRUMS ) // ドラム演奏画面なら、ギター/ベースのダメージも全部ドラムのゲージに集約する { part = E楽器パート.DRUMS; + this.actGauge.db現在のゲージ値[ (int) part ] += fDamage; + } + else + { + if ( nRisky > 0 ) // ギター画面且つRISKYなら、ギターとベースのゲージをセットで減少 + { + this.actGauge.db現在のゲージ値[ (int) E楽器パート.GUITAR ] += fDamage; + this.actGauge.db現在のゲージ値[ (int) E楽器パート.BASS ] += fDamage; + } + else + { + this.actGauge.db現在のゲージ値[ (int) part ] += fDamage; + } } - this.actGauge.db現在のゲージ値[ (int) part ] += fDamage; - if ( this.actGauge.db現在のゲージ値[ (int) part ] > 1.0 ) + if ( this.actGauge.db現在のゲージ値[ (int) part ] > 1.0 ) // RISKY時は決してゲージが増加しないので、ギタレボモード時のギター/ベース両チェックはしなくて良い this.actGauge.db現在のゲージ値[ (int) part ] = 1.0; } //----------------- diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏Guitarゲージ.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏Guitarゲージ.cs index 5131dea5..18f8d95b 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏Guitarゲージ.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CAct演奏Guitarゲージ.cs @@ -25,8 +25,8 @@ namespace DTXMania public override void On活性化() { - this.db現在のゲージ値.Guitar = 0.66666666666666663; - this.db現在のゲージ値.Bass = 0.66666666666666663; + this.db現在のゲージ値.Guitar = ( CDTXMania.ConfigIni.nRisky > 0 ) ? 1.0 : 0.66666666666666663; + this.db現在のゲージ値.Bass = ( CDTXMania.ConfigIni.nRisky > 0 ) ? 1.0 : 0.66666666666666663; base.On活性化(); } public override void On非活性化() @@ -65,13 +65,15 @@ namespace DTXMania } this.ct本体移動.t進行Loop(); this.ct本体振動.t進行Loop(); - if( this.db現在のゲージ値.Guitar == 1.0 ) + + #region [ ギターのゲージ ] + if ( this.db現在のゲージ値.Guitar == 1.0 ) // ギターのゲージ { num = (int) ( 128.0 * this.db現在のゲージ値.Guitar ); } else { - num = (int) ( ( 128.0 * this.db現在のゲージ値.Guitar ) + ( 2.0 * Math.Sin( 6.2831853071795862 * ( ( (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 ) { @@ -133,13 +135,16 @@ namespace DTXMania this.txゲージ.t2D描画( CDTXMania.app.Device, x, 8, rectangle ); } } - if( this.db現在のゲージ値.Bass == 1.0 ) + #endregion + + #region [ ベースのゲージ ] + if ( this.db現在のゲージ値.Bass == 1.0 ) { num9 = (int) ( 128.0 * this.db現在のゲージ値.Bass ); } else { - num9 = (int) ( ( 128.0 * this.db現在のゲージ値.Bass ) + ( 2.0 * Math.Sin( 6.2831853071795862 * ( ( (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 ) { @@ -194,6 +199,7 @@ namespace DTXMania this.txゲージ.t2D描画( CDTXMania.app.Device, num11, 8, rectangle2 ); } } + #endregion } return 0; } diff --git a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drumsゲージ.cs b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drumsゲージ.cs index 477b8fec..2f8e1bf7 100644 --- a/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drumsゲージ.cs +++ b/DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏Drumsゲージ.cs @@ -41,14 +41,14 @@ namespace DTXMania public override void On活性化() { - this.dbゲージ値 = 0.66666666666666663; + this.dbゲージ値 = ( CDTXMania.ConfigIni.nRisky > 0 ) ? 1.0 : 0.66666666666666663; base.On活性化(); } public override void On非活性化() { this.ct本体振動 = null; this.ct本体移動 = null; - for( int i = 0; i < 0x18; i++ ) + for( int i = 0; i < 24; i++ ) { this.st白い星[ i ].ct進行 = null; } @@ -89,7 +89,7 @@ namespace DTXMania } this.ct本体移動.t進行Loop(); this.ct本体振動.t進行Loop(); - int num2 = ( this.dbゲージ値 == 1.0 ) ? ( (int) ( 352.0 * this.dbゲージ値 ) ) : ( (int) ( ( 352.0 * this.dbゲージ値 ) + ( 2.0 * Math.Sin( 6.2831853071795862 * ( ( (double) this.ct本体振動.n現在の値 ) / 360.0 ) ) ) ) ); + int num2 = ( this.dbゲージ値 == 1.0 ) ? ( (int) ( 352.0 * this.dbゲージ値 ) ) : ( (int) ( ( 352.0 * this.dbゲージ値 ) + ( 2.0 * Math.Sin( Math.PI * 2 * ( ( (double) this.ct本体振動.n現在の値 ) / 360.0 ) ) ) ) ); if( num2 <= 0 ) { return 0; diff --git a/DTXManiaプロジェクト/コード/全体/CConfigIni.cs b/DTXManiaプロジェクト/コード/全体/CConfigIni.cs index 86895f59..7525381b 100644 --- a/DTXManiaプロジェクト/コード/全体/CConfigIni.cs +++ b/DTXManiaプロジェクト/コード/全体/CConfigIni.cs @@ -581,6 +581,7 @@ namespace DTXMania } } } + public int nRisky; // #23559 2011.6.20 yyagi Riskyでの残ミス数。0で閉店 public bool bIsSwappedGuitarBass // #24063 2011.1.16 yyagi ギターとベースの切り替え中か否か { get; @@ -900,10 +901,6 @@ namespace DTXMania this.b歓声を発声する = true; this.bScoreIniを出力する = true; this.bランダムセレクトで子BOXを検索対象とする = true; - this.b演奏音を強調する = new STDGBVALUE(); - this.b演奏音を強調する.Drums = true; - this.b演奏音を強調する.Guitar = true; - this.b演奏音を強調する.Bass = true; this.n表示可能な最小コンボ数 = new STDGBVALUE(); this.n表示可能な最小コンボ数.Drums = 11; this.n表示可能な最小コンボ数.Guitar = 2; @@ -914,38 +911,29 @@ namespace DTXMania this.n自動再生音量 = 80; this.n手動再生音量 = 100; this.bログ出力 = true; + this.b演奏音を強調する = new STDGBVALUE(); this.bSudden = new STDGBVALUE(); - this.bSudden.Drums = false; - this.bSudden.Guitar = false; - this.bSudden.Bass = false; this.bHidden = new STDGBVALUE(); - this.bHidden.Drums = false; - this.bHidden.Guitar = false; - this.bHidden.Bass = false; this.bReverse = new STDGBVALUE(); - this.bReverse.Drums = false; - this.bReverse.Guitar = false; - this.bReverse.Bass = false; this.eRandom = new STDGBVALUE(); - this.eRandom.Drums = Eランダムモード.OFF; - this.eRandom.Guitar = Eランダムモード.OFF; - this.eRandom.Bass = Eランダムモード.OFF; this.bLight = new STDGBVALUE(); - this.bLight.Drums = false; - this.bLight.Guitar = false; - this.bLight.Bass = false; this.bLeft = new STDGBVALUE(); - this.bLeft.Drums = false; - this.bLeft.Guitar = false; - this.bLeft.Bass = false; this.判定文字表示位置 = new STDGBVALUE(); - this.判定文字表示位置.Drums = E判定文字表示位置.レーン上; - this.判定文字表示位置.Guitar = E判定文字表示位置.レーン上; - this.判定文字表示位置.Bass = E判定文字表示位置.レーン上; this.n譜面スクロール速度 = new STDGBVALUE(); - this.n譜面スクロール速度.Drums = 1; - this.n譜面スクロール速度.Guitar = 1; - this.n譜面スクロール速度.Bass = 1; + this.nInputAdjustTimeMs = new STDGBVALUE(); // #23580 2011.1.3 yyagi + 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.n演奏速度 = 20; this.bAutoPlay = new STAUTOPLAY(); this.bAutoPlay.HH = false; @@ -966,12 +954,6 @@ namespace DTXMania this.ConfigIniファイル名 = ""; this.dicJoystick = new Dictionary( 10 ); this.tデフォルトのキーアサインに設定する(); - this.nInputAdjustTimeMs = new STDGBVALUE(); // #23580 2011.1.3 yyagi - this.nInputAdjustTimeMs.Drums = 0; - this.nInputAdjustTimeMs.Guitar = 0; - this.nInputAdjustTimeMs.Bass = 0; -// this.nハイハット切り捨て下限Velocity = 20; -// this.n切り捨て下限Velocity = 0; // #23857 2010.12.12 yyagi VelocityMin this.nVelocityMin.LC = 0; // #23857 2011.1.31 yyagi VelocityMin this.nVelocityMin.HH = 20; this.nVelocityMin.SD = 0; @@ -981,6 +963,7 @@ namespace DTXMania this.nVelocityMin.FT = 0; this.nVelocityMin.CY = 0; this.nVelocityMin.RD = 0; + this.nRisky = 0; // #23539 2011.7.26 yyagi RISKYモード this.bIsShowingLag = false; // #25370 2011.6.3 yyagi ズレ時間表示 this.bIsAutoResultCapture = false; // #25399 2011.6.9 yyagi リザルト画像自動保存機能ON/OFF @@ -1279,6 +1262,10 @@ namespace DTXMania 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(); sw.WriteLine( "; ドラム判定文字表示位置(0:レーン上,1:判定ライン上,2:表示OFF)" ); sw.WriteLine( "DrumsPosition={0}", (int) this.判定文字表示位置.Drums ); sw.WriteLine(); @@ -1974,6 +1961,11 @@ namespace DTXMania { this.ドラムコンボ文字の表示位置 = (Eドラムコンボ文字の表示位置) C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 3, (int) this.ドラムコンボ文字の表示位置 ); } + else if ( str3.Equals( "Risky" ) ) // #2359 2011.6.23 yyagi + { + this.nRisky = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 10, this.nRisky ); + } + continue; } //----------------------------- -- 2.11.0