From 6df8bad11e728cbc266a80d1dcefacd0dde0dce5 Mon Sep 17 00:00:00 2001 From: Julian Holfeld Date: Fri, 4 Oct 2024 13:51:01 +0200 Subject: [PATCH] refactor: remove dead code (#693) --- OpenTaiko/src/Character/CMenuCharacter.cs | 15 - OpenTaiko/src/Character/CResultCharacter.cs | 11 - OpenTaiko/src/Character/PuchiChara.cs | 18 +- OpenTaiko/src/Common/CConfigIni.cs | 17 +- OpenTaiko/src/Common/CSkin.cs | 78 +-- OpenTaiko/src/Common/CTextConsole.cs | 3 - OpenTaiko/src/Common/C定数.cs | 2 - OpenTaiko/src/Common/NamePlateConfig.cs | 14 +- OpenTaiko/src/Common/OpenTaiko.cs | 191 +----- OpenTaiko/src/Common/Program.cs | 8 - OpenTaiko/src/Common/SaveFile.cs | 15 - .../src/Databases/DBNameplateUnlockables.cs | 6 - OpenTaiko/src/Databases/DBPuchichara.cs | 7 +- OpenTaiko/src/Databases/DBSongUnlockables.cs | 11 +- OpenTaiko/src/Databases/DBUnlockables.cs | 8 +- OpenTaiko/src/Helpers/HRarity.cs | 2 - OpenTaiko/src/I18N/ILang.cs | 43 -- OpenTaiko/src/Items/CItemToggle.cs | 1 - OpenTaiko/src/Songs/CBoxDef.cs | 14 - OpenTaiko/src/Songs/CDTX.cs | 588 +----------------- OpenTaiko/src/Songs/CScoreIni_Importer.cs | 3 +- OpenTaiko/src/Songs/CSong管理.cs | 284 --------- OpenTaiko/src/Songs/Cスコア.cs | 6 - OpenTaiko/src/Songs/VTTParser.cs | 9 +- .../src/Stages/04.Config/CActConfigList.cs | 183 +----- .../src/Stages/04.Config/CStageコンフィグ.cs | 7 +- .../Stages/06.SongLoading/CStage曲読み込み.cs | 3 +- 27 files changed, 72 insertions(+), 1475 deletions(-) diff --git a/OpenTaiko/src/Character/CMenuCharacter.cs b/OpenTaiko/src/Character/CMenuCharacter.cs index cb6a9e2a..b96f8579 100644 --- a/OpenTaiko/src/Character/CMenuCharacter.cs +++ b/OpenTaiko/src/Character/CMenuCharacter.cs @@ -246,9 +246,6 @@ namespace OpenTaiko { float resolutionRatioX = OpenTaiko.Skin.Resolution[0] / (float)OpenTaiko.Skin.Characters_Resolution[_charaId][0]; float resolutionRatioY = OpenTaiko.Skin.Resolution[1] / (float)OpenTaiko.Skin.Characters_Resolution[_charaId][1]; - //float _x = (x + (150.0f * (TJAPlayer3.Skin.Characters_Resolution[_charaId][0] / 1280.0f))) * resolutionRatioX; - //float _y = (y + (((_substitute == true) ? 290 : _ref[_ctref[player].n現在の値].szテクスチャサイズ.Height)) * (TJAPlayer3.Skin.Characters_Resolution[_charaId][1] / 720.0f)) * resolutionRatioY; - _tex.vcScaleRatio.X *= resolutionRatioX; _tex.vcScaleRatio.Y *= resolutionRatioY; @@ -256,20 +253,11 @@ namespace OpenTaiko { float _y = y; if (player % 2 == 0) { - //_ref[_ctref[player].n現在の値].t2D描画(x, y); - //_ref[_ctref[player].n現在の値].t2D中心基準描画(x + 150, y + 156); - _tex.t2D拡大率考慮下中心基準描画( _x, _y // 312 ); - - - } else { - //_ref[_ctref[player].n現在の値].t2D左右反転描画(x, y); - //_ref[_ctref[player].n現在の値].t2D中心基準描画Mirrored(x + 150, y + 156); - _tex.t2D拡大率考慮下中心基準描画Mirrored( _x, _y // 312 @@ -278,11 +266,8 @@ namespace OpenTaiko { _tex.vcScaleRatio.X = 1f; _tex.vcScaleRatio.Y = 1f; - _tex.Opacity = 255; - } - } } } diff --git a/OpenTaiko/src/Character/CResultCharacter.cs b/OpenTaiko/src/Character/CResultCharacter.cs index e0b39260..62e9a03e 100644 --- a/OpenTaiko/src/Character/CResultCharacter.cs +++ b/OpenTaiko/src/Character/CResultCharacter.cs @@ -7,7 +7,6 @@ namespace OpenTaiko { private static CCounter[] ctCharacterFailed = new CCounter[5] { new CCounter(), new CCounter(), new CCounter(), new CCounter(), new CCounter() }; private static CCounter[] ctCharacterFailedIn = new CCounter[5] { new CCounter(), new CCounter(), new CCounter(), new CCounter(), new CCounter() }; - public enum ECharacterResult { // Song select NORMAL, @@ -208,12 +207,6 @@ namespace OpenTaiko { float resolutionRatioX = OpenTaiko.Skin.Resolution[0] / (float)OpenTaiko.Skin.Characters_Resolution[_charaId][0]; float resolutionRatioY = OpenTaiko.Skin.Resolution[1] / (float)OpenTaiko.Skin.Characters_Resolution[_charaId][1]; - //202 - //float _x = (x - (((_substitute == true) ? 20 : 40) * (TJAPlayer3.Skin.Characters_Resolution[_charaId][0] / 1280.0f))) * resolutionRatioX; - - //532 - //float _y = (y - (((_substitute == true) ? 20 : 40) * (TJAPlayer3.Skin.Characters_Resolution[_charaId][1] / 720.0f))) * resolutionRatioY; - float _x = x; float _y = y; @@ -234,12 +227,8 @@ namespace OpenTaiko { _tex.vcScaleRatio.X = 1f; _tex.vcScaleRatio.Y = 1f; - - _tex.Opacity = 255; - } - } } } diff --git a/OpenTaiko/src/Character/PuchiChara.cs b/OpenTaiko/src/Character/PuchiChara.cs index a066c868..26475619 100644 --- a/OpenTaiko/src/Character/PuchiChara.cs +++ b/OpenTaiko/src/Character/PuchiChara.cs @@ -58,29 +58,15 @@ namespace OpenTaiko { int p = OpenTaiko.GetActualPlayer(player); - /* - TJAPlayer3.act文字コンソール.tPrint(700, 500, C文字コンソール.Eフォント種別.白, Counter.n現在の値.ToString()); - TJAPlayer3.act文字コンソール.tPrint(700, 520, C文字コンソール.Eフォント種別.白, SineCounter.n現在の値.ToString()); - TJAPlayer3.act文字コンソール.tPrint(700, 540, C文字コンソール.Eフォント種別.白, SineCounterIdle.n現在の値.ToString()); - */ - if (inGame) sineY = (double)SineCounter.CurrentValue; else sineY = (double)SineCounterIdle.CurrentValue; - // TJAPlayer3.act文字コンソール.tPrint(700, 560, C文字コンソール.Eフォント種別.白, sineY.ToString()); - sineY = Math.Sin(sineY * (Math.PI / 180)) * (OpenTaiko.Skin.Game_PuchiChara_Sine * (isBalloon ? OpenTaiko.Skin.Game_PuchiChara_Scale[1] : OpenTaiko.Skin.Game_PuchiChara_Scale[0])); - // TJAPlayer3.act文字コンソール.tPrint(700, 580, C文字コンソール.Eフォント種別.白, sineY.ToString()); - - //int puriChar = Math.Max(0, Math.Min(TJAPlayer3.Skin.Puchichara_Ptn - 1, TJAPlayer3.NamePlateConfig.data.PuchiChara[p])); - int puriChar = PuchiChara.tGetPuchiCharaIndexByName(p); - var chara = OpenTaiko.Tx.Puchichara[puriChar].tx; - //TJAPlayer3.Tx.PuchiChara[puriChar]; if (chara != null) { float puchiScale = OpenTaiko.Skin.Resolution[1] / 720.0f; @@ -90,9 +76,7 @@ namespace OpenTaiko { chara.vcScaleRatio.Y *= scale; chara.Opacity = alpha; - // (isGrowing ? TJAPlayer3.Skin.Game_PuchiChara[1] : 0) => Height - - /* To do : + /* Todo : ** ** - Yellow light color filter when isGrowing is true */ diff --git a/OpenTaiko/src/Common/CConfigIni.cs b/OpenTaiko/src/Common/CConfigIni.cs index 2c1980b7..33cdad3d 100644 --- a/OpenTaiko/src/Common/CConfigIni.cs +++ b/OpenTaiko/src/Common/CConfigIni.cs @@ -1446,7 +1446,6 @@ namespace OpenTaiko { public bool bViewerShowDebugStatus; public bool bViewerTimeStretch; public bool bViewerDrums有効, bViewerGuitar有効; - //public bool bNoMP3Streaming; // 2014.4.14 yyagi; mp3のシーク位置がおかしくなる場合は、これをtrueにすることで、wavにデコードしてからオンメモリ再生する public int nMasterVolume; public bool ShinuchiMode; // 真打モード public bool FastRender; // 事前画像描画モード @@ -1665,7 +1664,7 @@ namespace OpenTaiko { this.nWindowBaseXPosition = 100; // #30675 2013.02.04 ikanick add this.nWindowBaseYPosition = 100; this.nWindowWidth = SampleFramework.GameWindowSize.Width; // #23510 2010.10.31 yyagi add - this.nWindowHeight = SampleFramework.GameWindowSize.Height; // + this.nWindowHeight = SampleFramework.GameWindowSize.Height; // this.nフレーム毎スリープms = -1; // #xxxxx 2011.11.27 yyagi add this.n非フォーカス時スリープms = 1; // #23568 2010.11.04 ikanick add this._bGuitar有効 = true; @@ -2237,24 +2236,10 @@ namespace OpenTaiko { sw.WriteLine("TaikoAutoRoll={0}", this.bAuto先生の連打 ? 1 : 0); sw.WriteLine("RollsPerSec={0}", this.nRollsPerSec); sw.WriteLine("DefaultAILevel={0}", this.nDefaultAILevel); - //sw.WriteLine("AIBattleMode={0}", bAIBattleMode ? 1 : 0); sw.WriteLine(); sw.WriteLine(";-------------------"); #endregion - /* - #region [ HitRange ] - sw.WriteLine("[HitRange]"); - sw.WriteLine(); - sw.WriteLine("; Perfect~Poor とみなされる範囲[ms]"); - sw.WriteLine("Perfect={0}", this.nヒット範囲ms.Perfect); - sw.WriteLine("Good={0}", this.nヒット範囲ms.Good); - sw.WriteLine("Poor={0}", this.nヒット範囲ms.Poor); - sw.WriteLine(); - sw.WriteLine(";-------------------"); - #endregion - */ - #region [ Log ] sw.WriteLine("[Log]"); sw.WriteLine(); diff --git a/OpenTaiko/src/Common/CSkin.cs b/OpenTaiko/src/Common/CSkin.cs index ea9ddff2..aed5e637 100644 --- a/OpenTaiko/src/Common/CSkin.cs +++ b/OpenTaiko/src/Common/CSkin.cs @@ -156,28 +156,6 @@ namespace OpenTaiko { Trace.TraceWarning($"ファイルが存在しません。: {this.strFileName}"); return; } - //// for( int i = 0; i < 2; i++ ) // #27790 2012.3.10 yyagi 2回読み出しを、1回読みだし+1回メモリコピーに変更 - //// { - // try - // { - // this.rSound[ 0 ] = CDTXMania.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.Sound管理.tサウンドを登録する( this.rSound[ 1 ] ); // #28243 2012.5.3 yyagi add (登録漏れによりストリーム再生処理が発生していなかった) - // } - - //// } for (int i = 0; i < 2; i++) // 一旦Cloneを止めてASIO対応に専念 { @@ -995,24 +973,6 @@ namespace OpenTaiko { } break; } - //case "FontName": - //{ - // strParam = strParam.Replace('/', System.IO.Path.DirectorySeparatorChar); - // strParam = strParam.Replace('\\', System.IO.Path.DirectorySeparatorChar); - // if (HPrivateFastFont.FontExists(strParam)) FontName = strParam; - // strParam = Path(strParam); - // if (HPrivateFastFont.FontExists(strParam)) FontName = strParam; - // break; - //} - //case "BoxFontName": - //{ - // strParam = strParam.Replace('/', System.IO.Path.DirectorySeparatorChar); - // strParam = strParam.Replace('\\', System.IO.Path.DirectorySeparatorChar); - // if (HPrivateFastFont.FontExists(strParam)) BoxFontName = strParam; - // strParam = Path(strParam); - // if (HPrivateFastFont.FontExists(Path(strParam))) BoxFontName = strParam; - // break; - //} #endregion #region [Background Scroll] @@ -6233,11 +6193,6 @@ namespace OpenTaiko { case "Result_UIMove_4P": { string[] strSplit = strParam.Split(','); - // for (int i = 0; i < 2; i++) - // { - //Result_UIMove_4P[i] = int.Parse(strSplit[i]); - // } - for (int i = 0; i < 4; i++) { int moveX = int.Parse(strSplit[0]); Result_UIMove_4P_X[i] = moveX * i; @@ -6249,11 +6204,6 @@ namespace OpenTaiko { } case "Result_UIMove_5P": { string[] strSplit = strParam.Split(','); - // for (int i = 0; i < 2; i++) - // { - //Result_UIMove_5P[i] = int.Parse(strSplit[i]); - // } - for (int i = 0; i < 5; i++) { int moveX = int.Parse(strSplit[0]); Result_UIMove_5P_X[i] = moveX * i; @@ -7018,7 +6968,7 @@ namespace OpenTaiko { } #endregion - #region OnlineLounge + #region OnlineLounge case "OnlineLounge_Side_Menu": { string[] strSplit = strParam.Split(','); for (int i = 0; i < 2; i++) { @@ -7175,7 +7125,7 @@ namespace OpenTaiko { } #endregion - #region OpenEncyclopedia + #region OpenEncyclopedia case "OpenEncyclopedia_Context_Item2": { string[] strSplit = strParam.Split(','); for (int i = 0; i < 2; i++) { @@ -7373,7 +7323,7 @@ namespace OpenTaiko { } #endregion - #region Modal + #region Modal case "Modal_Title_Full": { string[] strSplit = strParam.Split(','); for (int i = 0; i < 2; i++) { @@ -7604,10 +7554,6 @@ namespace OpenTaiko { //分岐背景、ゴーゴー背景が連動する。(全て同じ大きさ、位置で作成すること。) //左上基準描画 public bool bFieldBgPointOverride = false; - /* - public int[] nScrollFieldBGX = new int[] { 333, 333, 333, 333 }; - public int[] nScrollFieldBGY = new int[] { 192, 368, 0, 0 }; - */ //SEnotes //音符座標に加算 public int[] nSENotesX = new int[] { -2, -2 }; @@ -7953,7 +7899,6 @@ namespace OpenTaiko { #endregion #region SongSelect - //public int SongSelect_Overall_Y = 123; public string[] SongSelect_GenreName = { "ポップス", "アニメ", "ゲームバラエティ", "ナムコオリジナル", "クラシック", "バラエティ", "キッズ", "ボーカロイド", "最近遊んだ曲" }; public int SongSelect_Bar_Count = 9; @@ -8256,8 +8201,6 @@ namespace OpenTaiko { #endregion #region DaniSelect - //public int[] DaniSelect_Dan_Text_X = new int[] { 300, 980, 300, 980 }; - //public int[] DaniSelect_Dan_Text_Y = new int[] { 198, 198, 522, 522 }; public int[] DaniSelect_DanSides_X = new int[] { 243, 1199 }; public int[] DaniSelect_DanSides_Y = new int[] { 143, 143 }; @@ -8458,8 +8401,6 @@ namespace OpenTaiko { public int[] Game_Dancer_X = new int[] { 640, 430, 856, 215, 1070 }; public int[] Game_Dancer_Y = new int[] { 500, 500, 500, 500, 500 }; public string Game_Dancer_Motion = "0"; - //public int Game_Dancer_Ptn = 0; - //public int Game_Dancer_Beat = 8; public int[] Game_Dancer_Gauge = new int[] { 0, 0, 0, 40, 80 }; #endregion @@ -8899,10 +8840,6 @@ namespace OpenTaiko { #endregion #region Result - /* - public int[] Result_UIMove_4P = new int[] { 320, 0 }; - public int[] Result_UIMove_5P = new int[] { 256, 0 }; - */ public bool Result_Use1PUI = false; public int[] Result_UIMove_4P_X = new int[] { 0, 320, 640, 960 }; @@ -9053,11 +8990,8 @@ namespace OpenTaiko { public Color Result_MusicName_ForeColor = ColorTranslator.FromHtml("#FFFFFF"); public Color Result_StageText_ForeColor = ColorTranslator.FromHtml("#FFFFFF"); - //public Color Result_StageText_ForeColor_Red = ColorTranslator.FromHtml("#FFFFFF"); public Color Result_MusicName_BackColor = ColorTranslator.FromHtml("#000000"); public Color Result_StageText_BackColor = ColorTranslator.FromHtml("#000000"); - //public Color Result_StageText_BackColor_Red = ColorTranslator.FromHtml("#FF0000"); - public int[] Result_Dan = new int[] { 500, 500 }; public int[] Result_Dan_XY = new int[] { 0, 420 }; @@ -9234,7 +9168,7 @@ namespace OpenTaiko { #endregion - #region OnlineLounge + #region OnlineLounge public int[] OnlineLounge_Side_Menu = new int[] { 640, 360 }; public int[] OnlineLounge_Side_Menu_Text_Offset = new int[] { 0, 18 }; @@ -9258,7 +9192,7 @@ namespace OpenTaiko { #endregion - #region TowerSelect + #region TowerSelect public int TowerSelect_Title_Size = 30; public int TowerSelect_Title_MaxWidth = 230; @@ -9272,7 +9206,7 @@ namespace OpenTaiko { #endregion - #region OpenEncyclopedia + #region OpenEncyclopedia public int[] OpenEncyclopedia_Context_Item2 = new int[] { 960, 180 }; public int[] OpenEncyclopedia_Context_Item3 = new int[] { 640, 360 }; diff --git a/OpenTaiko/src/Common/CTextConsole.cs b/OpenTaiko/src/Common/CTextConsole.cs index f62af20f..7df452db 100644 --- a/OpenTaiko/src/Common/CTextConsole.cs +++ b/OpenTaiko/src/Common/CTextConsole.cs @@ -42,9 +42,6 @@ namespace OpenTaiko { // CActivity 実装 - public override void Activate() { - base.Activate(); - } public override void DeActivate() { if (this.rc文字の矩形領域 != null) this.rc文字の矩形領域 = null; diff --git a/OpenTaiko/src/Common/C定数.cs b/OpenTaiko/src/Common/C定数.cs index dc8bc878..89acea5f 100644 --- a/OpenTaiko/src/Common/C定数.cs +++ b/OpenTaiko/src/Common/C定数.cs @@ -416,6 +416,4 @@ namespace OpenTaiko { OFF = 0 } #endregion - - } diff --git a/OpenTaiko/src/Common/NamePlateConfig.cs b/OpenTaiko/src/Common/NamePlateConfig.cs index 7bc13983..9982cddd 100644 --- a/OpenTaiko/src/Common/NamePlateConfig.cs +++ b/OpenTaiko/src/Common/NamePlateConfig.cs @@ -4,11 +4,6 @@ namespace OpenTaiko { class NamePlateConfig { public void tNamePlateConfig() { // Deprecated, only converts to new format - /* - if (!File.Exists("NamePlate.json")) - tSaveFile(); - */ - tLoadFile(); } @@ -62,15 +57,10 @@ namespace OpenTaiko { } // Automatically set the dan to nameplate if new - // Add a function within the NamePlate.cs file to update the title texture + // Add a function within the NamePlate.cs file to update the title texture if (!OpenTaiko.NamePlateConfig.data.DanTitles[player].ContainsKey(title) || cs != clearStatus || iG != isGold) { changed = true; - /* - TJAPlayer3.NamePlateConfig.data.Dan[player] = title; - TJAPlayer3.NamePlateConfig.data.DanGold[player] = iG; - TJAPlayer3.NamePlateConfig.data.DanType[player] = cs; - */ } @@ -189,8 +179,6 @@ namespace OpenTaiko { } private void tLoadFile() { - //data = ConfigManager.GetConfig(@"NamePlate.json"); - if (!File.Exists("NamePlate.json")) return; diff --git a/OpenTaiko/src/Common/OpenTaiko.cs b/OpenTaiko/src/Common/OpenTaiko.cs index 29ba28bd..6c8097f6 100755 --- a/OpenTaiko/src/Common/OpenTaiko.cs +++ b/OpenTaiko/src/Common/OpenTaiko.cs @@ -17,7 +17,7 @@ namespace OpenTaiko { internal class OpenTaiko : Game { // プロパティ #region [ properties ] - public static readonly string VERSION = Assembly.GetExecutingAssembly().GetName().Version.ToString();//.Substring(0, Assembly.GetExecutingAssembly().GetName().Version.ToString().Length - 2); + public static readonly string VERSION = Assembly.GetExecutingAssembly().GetName().Version.ToString(); public static readonly string AppDisplayThreePartVersion = GetAppDisplayThreePartVersion(); public static readonly string AppNumericThreePartVersion = GetAppNumericThreePartVersion(); @@ -41,8 +41,6 @@ namespace OpenTaiko { ?? $"{GetAppDisplayThreePartVersion()} (unknown informational version)"; public static readonly string SLIMDXDLL = "c_net20x86_Jun2010"; public static readonly string D3DXDLL = "d3dx9_43.dll"; // June 2010 - //public static readonly string D3DXDLL = "d3dx9_42.dll"; // February 2010 - //public static readonly string D3DXDLL = "d3dx9_41.dll"; // March 2009 public static CStage latestSongSelect { get; @@ -311,11 +309,6 @@ namespace OpenTaiko { get; private set; } - // public static CStageオプション stageオプション - // { - // get; - // private set; - // } public static CStageコンフィグ stageコンフィグ { get; private set; @@ -518,7 +511,6 @@ namespace OpenTaiko { // Load config info ConfigIni.tファイルから読み込み(path); } catch (Exception e) { - //ConfigIni = new CConfigIni(); // 存在してなければ新規生成 Trace.TraceError(e.ToString()); Trace.TraceError("例外が発生しましたが処理を継続します。 (b8d93255-bbe4-4ca3-8264-7ee5175b19f3)"); } @@ -530,20 +522,6 @@ namespace OpenTaiko { case 0: GraphicsDeviceType_ = Silk.NET.GLFW.AnglePlatformType.OpenGL; break; - /* - case 1: - GraphicsDeviceType_ = Silk.NET.GLFW.AnglePlatformType.D3D9; - break; - case 2: - GraphicsDeviceType_ = Silk.NET.GLFW.AnglePlatformType.D3D11; - break; - case 3: - GraphicsDeviceType_ = Silk.NET.GLFW.AnglePlatformType.Vulkan; - break; - case 4: - GraphicsDeviceType_ = Silk.NET.GLFW.AnglePlatformType.Metal; - break; - */ case 1: GraphicsDeviceType_ = Silk.NET.GLFW.AnglePlatformType.D3D11; break; @@ -565,33 +543,15 @@ namespace OpenTaiko { } protected override void Initialize() { - this.t起動処理(); - - /* - if ( this.listトップレベルActivities != null ) - { - foreach( CActivity activity in this.listトップレベルActivities ) - activity.OnManagedリソースの作成(); - } - - foreach( STPlugin st in this.listプラグイン ) - { - Directory.SetCurrentDirectory( st.strプラグインフォルダ ); - st.plugin.OnManagedリソースの作成(); - Directory.SetCurrentDirectory( TJAPlayer3.strEXEのあるフォルダ ); - } - */ } protected override void LoadContent() { if (ConfigIni.bウィンドウモード) { if (!this.bマウスカーソル表示中) { - //Cursor.Show(); this.bマウスカーソル表示中 = true; } } else if (this.bマウスカーソル表示中) { - //Cursor.Hide(); this.bマウスカーソル表示中 = false; } @@ -638,7 +598,6 @@ namespace OpenTaiko { try #endif { - // Sound管理?.t再生中の処理をする(); Timer?.Update(); SoundManager.PlayTimer?.Update(); FPS?.Update(); @@ -651,71 +610,8 @@ namespace OpenTaiko { if (BeatScaling.CurrentValue == BeatScaling.EndValue) BeatScaling = null; } - //CameraTest - /* - Camera *= Matrix4X4.CreateScale(1.0f / ScreenAspect, 1.0f, 1.0f) * - Matrix4X4.CreateRotationZ(MathF.PI / 4.0f) * - Matrix4X4.CreateScale(1.0f * ScreenAspect, 1.0f, 1.0f); - */ - // #xxxxx 2013.4.8 yyagi; sleepの挿入位置を、EndScnene~Present間から、BeginScene前に移動。描画遅延を小さくするため。 - #region [ DTXCreatorからの指示 ] - /* - if ( this.Window.IsReceivedMessage ) // ウインドウメッセージで、 - { - string strMes = this.Window.strMessage; - this.Window.IsReceivedMessage = false; - - if ( strMes != null ) - { - DTXVmode.ParseArguments( strMes ); - - if ( DTXVmode.Enabled ) - { - bコンパクトモード = true; - strコンパクトモードファイル = DTXVmode.filename; - if ( DTXVmode.Command == CDTXVmode.ECommand.Preview ) - { - // preview soundの再生 - string strPreviewFilename = DTXVmode.previewFilename; - //Trace.TraceInformation( "Preview Filename=" + DTXVmode.previewFilename ); - try - { - if ( this.previewSound != null ) - { - this.previewSound.tサウンドを停止する(); - this.previewSound.Dispose(); - this.previewSound = null; - } - this.previewSound = TJAPlayer3.Sound管理.tサウンドを生成する( strPreviewFilename, ESoundGroup.SongPreview ); - - // 2018-08-23 twopointzero: DTXVmode previewVolume will always set - // Gain since in this mode it should override the application of - // SONGVOL or any other Gain source regardless of configuration. - this.previewSound.SetGain(DTXVmode.previewVolume); - - this.previewSound.n位置 = DTXVmode.previewPan; - this.previewSound.t再生を開始する(); - Trace.TraceInformation( "DTXCからの指示で、サウンドを生成しました。({0})", strPreviewFilename ); - } - catch - { - Trace.TraceError(ToString()); - Trace.TraceError( "DTXCからの指示での、サウンドの生成に失敗しました。({0})", strPreviewFilename ); - if ( this.previewSound != null ) - { - this.previewSound.Dispose(); - } - this.previewSound = null; - } - } - } - } - } - */ - #endregion - if (r現在のステージ != null) { OpenTaiko.NamePlate.lcNamePlate.Update(); this.n進行描画の戻り値 = (r現在のステージ != null) ? r現在のステージ.Draw() : 0; @@ -1078,7 +974,6 @@ namespace OpenTaiko { Directory.SetCurrentDirectory(OpenTaiko.strEXEのあるフォルダ); } - //this.tガベージコレクションを実行する(); // #31980 2013.9.3 yyagi タイトル画面でだけ、毎フレームGCを実行して重くなっていた問題の修正 //----------------------------- #endregion break; @@ -1991,12 +1886,6 @@ for (int i = 0; i < 3; i++) { if (!ConfigIni.bTokkunMode) { float screen_ratiox = OpenTaiko.Skin.Resolution[0] / 1280.0f; float screen_ratioy = OpenTaiko.Skin.Resolution[1] / 720.0f; - /* - var mat = Matrix.LookAtLH(new Vector3(-fCamXOffset * screen_ratiox, fCamYOffset * screen_ratioy, (float)(-SampleFramework.GameWindowSize.Height / (fCamZoomFactor * 2) * Math.Sqrt(3.0))), new Vector3(-fCamXOffset * screen_ratiox, fCamYOffset * screen_ratioy, 0f), new Vector3(0f, 1f, 0f)); - mat *= Matrix.RotationYawPitchRoll(0, 0, C変換.DegreeToRadian(fCamRotation)); - mat *= Matrix.Scaling(fCamXScale, fCamYScale, 1f); - this.Device.SetTransform(TransformState.View, mat); - */ Camera *= Matrix4X4.CreateScale(fCamXScale, fCamYScale, 1f); @@ -2037,9 +1926,6 @@ for (int i = 0; i < 3; i++) { } } - //foreach(var capture in ConfigIni.KeyAssign.System.Capture) - //{ - //if (TJAPlayer3.Input管理.Keyboard.KeyPressed(capture.コード) && capture.コード != 0) if (OpenTaiko.ConfigIni.KeyAssign.KeyIsPressed(OpenTaiko.ConfigIni.KeyAssign.System.Capture)) { #if DEBUG if (OpenTaiko.InputManager.Keyboard.KeyPressing((int)SlimDXKeys.Key.LeftControl)) { @@ -2071,15 +1957,6 @@ for (int i = 0; i < 3; i++) { #endif } - //} - - /* - if ( Sound管理?.GetCurrentSoundDeviceType() != "DirectSound" ) - { - Sound管理?.t再生中の処理をする(); // サウンドバッファの更新; 画面描画と同期させることで、スクロールをスムーズにする - } - */ - #region [ 全画面_ウインドウ切り替え ] if (this.b次のタイミングで全画面_ウィンドウ切り替えを行う) { ConfigIni.bFullScreen = !ConfigIni.bFullScreen; @@ -2308,14 +2185,6 @@ for (int i = 0; i < 3; i++) { } // Add a condition here (if old Saves\ format save files exist) to port them to database (?) SaveFileInstances = DBSaves.FetchSaveInstances(); - /* - for (int i = 0; i < 5; i++) - { - SaveFileInstances[i] = new SaveFile(); - SaveFileInstances[i].tSaveFile(TJAPlayer3.ConfigIni.sSaveFile[i]); - } - */ - //--------------------- #endregion @@ -2333,7 +2202,6 @@ for (int i = 0; i < 3; i++) { "OpenTaiko.logへの書き込みができませんでした。書き込みできるようにしてから、再度起動してください。", "Failed to write OpenTaiko.log. Please set your device to READ/WRITE and try again." }; - //MessageBox.Show( mes_writeErr[c], "OpenTaiko Startup Error", MessageBoxButtons.OK, MessageBoxIcon.Error ); Environment.Exit(1); } } @@ -2351,15 +2219,8 @@ for (int i = 0; i < 3; i++) { #region [ DTXVmodeクラス の初期化 ] //--------------------- - //Trace.TraceInformation( "Initialize DTXV mode." ); - //Trace.Indent(); - try { - DTXVmode = new CDTXVmode(); - DTXVmode.Enabled = false; - //Trace.TraceInformation( "DTXV initialization complete." ); - } finally { - //Trace.Unindent(); - } + DTXVmode = new CDTXVmode(); + DTXVmode.Enabled = false; //--------------------- #endregion @@ -2430,11 +2291,8 @@ for (int i = 0; i < 3; i++) { actTextConsole = new CTextConsole(); Trace.TraceInformation("Console initialized."); actTextConsole.Activate(); - //if (!ConfigIni.PreAssetsLoading) - { - actTextConsole.CreateManagedResource(); - actTextConsole.CreateUnmanagedResource(); - } + actTextConsole.CreateManagedResource(); + actTextConsole.CreateUnmanagedResource(); Trace.TraceInformation("Console has been activated."); Trace.TraceInformation("Console has finished being initialized."); } catch (Exception exception) { @@ -2572,7 +2430,6 @@ for (int i = 0; i < 3; i++) { ShowWindowTitleWithSoundType(); FDK.SoundManager.bIsTimeStretch = OpenTaiko.ConfigIni.bTimeStretch; SoundManager.nMasterVolume = OpenTaiko.ConfigIni.nMasterVolume; - //FDK.CSound管理.bIsMP3DecodeByWindowsCodec = CDTXMania.ConfigIni.bNoMP3Streaming; Trace.TraceInformation("サウンドデバイスの初期化を完了しました。"); } catch (Exception e) { throw new NullReferenceException("No sound devices are enabled. Please check your audio settings.", e); @@ -2610,7 +2467,6 @@ for (int i = 0; i < 3; i++) { r直前のステージ = null; stage起動 = new CStage起動(); stageタイトル = new CStageタイトル(); - // stageオプション = new CStageオプション(); stageコンフィグ = new CStageコンフィグ(); stageSongSelect = new CStage選曲(); stage段位選択 = new CStage段位選択(); @@ -2631,7 +2487,6 @@ for (int i = 0; i < 3; i++) { this.listトップレベルActivities.Add(actTextConsole); this.listトップレベルActivities.Add(stage起動); this.listトップレベルActivities.Add(stageタイトル); - // this.listトップレベルActivities.Add( stageオプション ); this.listトップレベルActivities.Add(stageコンフィグ); this.listトップレベルActivities.Add(stageSongSelect); this.listトップレベルActivities.Add(stage段位選択); @@ -2905,11 +2760,8 @@ for (int i = 0; i < 3; i++) { Trace.Indent(); try { actTextConsole.DeActivate(); - //if (!ConfigIni.PreAssetsLoading) - { - actTextConsole.ReleaseManagedResource(); - actTextConsole.ReleaseUnmanagedResource(); - } + actTextConsole.ReleaseManagedResource(); + actTextConsole.ReleaseUnmanagedResource(); actTextConsole = null; Trace.TraceInformation("Console terminated."); } catch (Exception exception6) { @@ -2956,7 +2808,6 @@ for (int i = 0; i < 3; i++) { //--------------------- Trace.TraceInformation("Outputting Config.ini..."); Trace.TraceInformation("This only needs to be done once, unless you have deleted the file!"); - // if ( ConfigIni.bIsSwappedGuitarBass ) // #24063 2011.1.16 yyagi ギターベースがスワップしているときは元に戻す string str = strEXEのあるフォルダ + "Config.ini"; Trace.Indent(); try { @@ -2997,23 +2848,12 @@ for (int i = 0; i < 3; i++) { #endregion #region [ DTXVmodeの終了処理 ] //--------------------- - //Trace.TraceInformation( "DTXVモードの終了処理を行います。" ); - //Trace.Indent(); - try { - if (DTXVmode != null) { - DTXVmode = null; - //Trace.TraceInformation( "DTXVモードの終了処理を完了しました。" ); - } else { - //Trace.TraceInformation( "DTXVモードは使用されていません。" ); - } - } finally { - //Trace.Unindent(); + if (DTXVmode != null) { + DTXVmode = null; } //--------------------- #endregion Trace.TraceInformation("OpenTaiko has closed down successfully."); - - this.b終了処理完了済み = true; } } @@ -3111,19 +2951,6 @@ for (int i = 0; i < 3; i++) { this.SearchAndGeneratePluginsInFolder(dir + Path.DirectorySeparatorChar, PluginTypeName); } //----------------- - /* - private void Window_ResizeEnd(object sender, EventArgs e) // #23510 2010.11.20 yyagi: to get resized window size - { - if ( ConfigIni.bウィンドウモード ) - { - ConfigIni.n初期ウィンドウ開始位置X = base.Window.Location.X; // #30675 2013.02.04 ikanick add - ConfigIni.n初期ウィンドウ開始位置Y = base.Window.Location.Y; // - } - - ConfigIni.nウインドウwidth = (ConfigIni.bウィンドウモード) ? base.Window.ClientSize.Width : currentClientSize.Width; // #23510 2010.10.31 yyagi add - ConfigIni.nウインドウheight = (ConfigIni.bウィンドウモード) ? base.Window.ClientSize.Height : currentClientSize.Height; - } - */ #endregion #endregion diff --git a/OpenTaiko/src/Common/Program.cs b/OpenTaiko/src/Common/Program.cs index 34cd2ca3..4305db8b 100644 --- a/OpenTaiko/src/Common/Program.cs +++ b/OpenTaiko/src/Common/Program.cs @@ -15,14 +15,12 @@ namespace OpenTaiko { if (bLoadDllCheck) { IntPtr hModule = LoadLibrary(strDll名); // 実際にLoadDll()してチェックする if (hModule == IntPtr.Zero) { - //MessageBox.Show( str存在しないときに表示するエラー文字列, "DTXMania runtime error", MessageBoxButtons.OK, MessageBoxIcon.Hand ); return false; } FreeLibrary(hModule); } else { // 単純にファイルの存在有無をチェックするだけ (プロジェクトで「参照」していたり、アンマネージドなDLLが暗黙リンクされるものはこちら) string path = Path.Combine(System.IO.Directory.GetCurrentDirectory(), strDll名); if (!File.Exists(path)) { - //MessageBox.Show( str存在しないときに表示するエラー文字列, "DTXMania runtime error", MessageBoxButtons.OK, MessageBoxIcon.Hand ); return false; } } @@ -30,7 +28,6 @@ namespace OpenTaiko { } private static bool tDLLの存在チェック(string strDll名, string str存在しないときに表示するエラー文字列jp, string str存在しないときに表示するエラー文字列en) { return true; - //return tDLLの存在チェック( strDll名, str存在しないときに表示するエラー文字列jp, str存在しないときに表示するエラー文字列en, false ); } #region [DllImport] @@ -54,11 +51,8 @@ namespace OpenTaiko { bool bDLLnotfound = false; Trace.WriteLine("Current Directory: " + Environment.CurrentDirectory); - //Trace.WriteLine( "EXEのあるフォルダ: " + Path.GetDirectoryName( Application.ExecutablePath ) ); - Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; - { // BEGIN #23670 2010.11.13 from: キャッチされない例外は放出せずに、ログに詳細を出力する。 // BEGIM #24606 2011.03.08 from: DEBUG 時は例外発生箇所を直接デバッグできるようにするため、例外をキャッチしないようにする。 @@ -148,8 +142,6 @@ namespace OpenTaiko { Process current = Process.GetCurrentProcess(); Process[] running = Process.GetProcessesByName(current.ProcessName); Process target = null; - //IntPtr hWnd = FindWindow( null, "DTXMania .NET style release " + CDTXMania.VERSION ); - foreach (Process p in running) { if (p.Id != current.Id) // プロセス名は同じでかつ、プロセスIDが自分自身とは異なるものを探す { diff --git a/OpenTaiko/src/Common/SaveFile.cs b/OpenTaiko/src/Common/SaveFile.cs index e2d18e01..46de486c 100644 --- a/OpenTaiko/src/Common/SaveFile.cs +++ b/OpenTaiko/src/Common/SaveFile.cs @@ -41,7 +41,6 @@ namespace OpenTaiko { // Earn Coins is also called once per play, so we just add 1 here to the total playcount data.TotalPlaycount += 1; DBSaves.AlterCoinsAndTotalPlayCount(data.SaveId, amount, 1); - //tSaveFile(); } // Return false if the current amount of coins is to low @@ -51,8 +50,6 @@ namespace OpenTaiko { data.Medals -= amount; DBSaves.AlterCoinsAndTotalPlayCount(data.SaveId, -amount, 0); - //tSaveFile(); - return true; } @@ -88,20 +85,9 @@ namespace OpenTaiko { if (!this.data.DanTitles.ContainsKey(title) || cs != clearStatus || iG != isGold) { DBSaves.RegisterDanTitle(data.SaveId, title, clearStatus, isGold); changed = true; - /* - TJAPlayer3.NamePlateConfig.data.Dan[player] = title; - TJAPlayer3.NamePlateConfig.data.DanGold[player] = iG; - TJAPlayer3.NamePlateConfig.data.DanType[player] = cs; - */ } - - CDanTitle danTitle = new CDanTitle(iG, cs); - this.data.DanTitles[title] = danTitle; - - //tSaveFile(); - return changed; } @@ -166,7 +152,6 @@ namespace OpenTaiko { public void tApplyHeyaChanges() { DBSaves.ApplyChangesFromMyRoom(this); - //this.tSaveFile(); } #endregion diff --git a/OpenTaiko/src/Databases/DBNameplateUnlockables.cs b/OpenTaiko/src/Databases/DBNameplateUnlockables.cs index 53459260..0255a0e8 100644 --- a/OpenTaiko/src/Databases/DBNameplateUnlockables.cs +++ b/OpenTaiko/src/Databases/DBNameplateUnlockables.cs @@ -5,12 +5,8 @@ using static OpenTaiko.DBNameplateUnlockables; namespace OpenTaiko { internal class DBNameplateUnlockables : CSavableT> { public DBNameplateUnlockables() { - //_fn = @$"{TJAPlayer3.strEXEのあるフォルダ}Databases{Path.DirectorySeparatorChar}NameplateUnlockables.json"; - //base.tDBInitSavable(); - _fn = @$"{OpenTaiko.strEXEのあるフォルダ}Databases{Path.DirectorySeparatorChar}NameplateUnlockables.db3"; - using (var connection = new SqliteConnection(@$"Data Source={_fn}")) { connection.Open(); @@ -61,7 +57,6 @@ namespace OpenTaiko { public void tGetUnlockedItems(int _player, ModalQueue mq) { int player = OpenTaiko.GetActualPlayer(_player); - //var _sf = TJAPlayer3.SaveFileInstances[player].data.NamePlateTitles; var _sf = OpenTaiko.SaveFileInstances[player].data.UnlockedNameplateIds; bool _edited = false; @@ -72,7 +67,6 @@ namespace OpenTaiko { var _fulfilled = item.Value.unlockConditions.tConditionMetWrapper(player, DBUnlockables.CUnlockConditions.EScreen.Internal).Item1; if (_fulfilled) { - //_sf.Add(_npvKey, item.Value.nameplateInfo); _sf.Add(_npvKey); _edited = true; mq.tAddModal( diff --git a/OpenTaiko/src/Databases/DBPuchichara.cs b/OpenTaiko/src/Databases/DBPuchichara.cs index e9b6cbd1..e91b8fe1 100644 --- a/OpenTaiko/src/Databases/DBPuchichara.cs +++ b/OpenTaiko/src/Databases/DBPuchichara.cs @@ -1,5 +1,5 @@ -using Newtonsoft.Json; - +using Newtonsoft.Json; + namespace OpenTaiko { class DBPuchichara { public class PuchicharaEffect { @@ -12,11 +12,8 @@ namespace OpenTaiko { public float GetCoinMultiplier() { float mult = 1f; - if (Autoroll > 0) mult *= 0f; if (ShowAdlib == true) mult *= 0.9f; - //if (AllPurple == true) mult *= 1.1f; - return mult; } diff --git a/OpenTaiko/src/Databases/DBSongUnlockables.cs b/OpenTaiko/src/Databases/DBSongUnlockables.cs index 482ea45a..cc9fe5aa 100644 --- a/OpenTaiko/src/Databases/DBSongUnlockables.cs +++ b/OpenTaiko/src/Databases/DBSongUnlockables.cs @@ -15,16 +15,10 @@ namespace OpenTaiko { } public DBSongUnlockables() { - //_fn = @$"{TJAPlayer3.strEXEのあるフォルダ}Databases{Path.DirectorySeparatorChar}SongUnlockables.json"; - //base.tDBInitSavable(); - _fn = @$"{OpenTaiko.strEXEのあるフォルダ}Databases{Path.DirectorySeparatorChar}SongUnlockables.db3"; - - using (var connection = new SqliteConnection(@$"Data Source={_fn}")) { connection.Open(); - // Get songs info var command = connection.CreateCommand(); command.CommandText = @@ -68,15 +62,12 @@ namespace OpenTaiko { foreach (KeyValuePair item in data) { string _npvKey = item.Key; - //string? _songName = CSongDict.tGetNodeFromID(_npvKey)?.ldTitle.GetString(""); - //string _songSubtitle = CSongDict.tGetNodeFromID(_npvKey)?.ldSubtitle.GetString("") ?? ""; CSongListNode? _node = CSongDict.tGetNodeFromID(_npvKey); - if (!_sf.Contains(_npvKey)) { // && _songName != null) { + if (!_sf.Contains(_npvKey)) { var _fulfilled = item.Value.unlockConditions.tConditionMetWrapper(player, DBUnlockables.CUnlockConditions.EScreen.Internal).Item1; if (_fulfilled) { - //_sf.Add(_npvKey, item.Value.nameplateInfo); _sf.Add(_npvKey); _edited = true; diff --git a/OpenTaiko/src/Databases/DBUnlockables.cs b/OpenTaiko/src/Databases/DBUnlockables.cs index 0c30faad..b332c6cb 100644 --- a/OpenTaiko/src/Databases/DBUnlockables.cs +++ b/OpenTaiko/src/Databases/DBUnlockables.cs @@ -95,7 +95,6 @@ namespace OpenTaiko { return CLangManager.LangInstance.GetString(exact ? "UNLOCK_CONDITION_REQUIRE_CLEAR" : "UNLOCK_CONDITION_REQUIRE_CLEAR_MORE"); case (int)EClearStatus.ASSISTED_CLEAR: return CLangManager.LangInstance.GetString(exact ? "UNLOCK_CONDITION_REQUIRE_ASSIST" : "UNLOCK_CONDITION_REQUIRE_ASSIST_MORE"); - case (int)EClearStatus.NONE: default: return CLangManager.LangInstance.GetString(exact ? "UNLOCK_CONDITION_REQUIRE_PLAY" : "UNLOCK_CONDITION_REQUIRE_PLAY_MORE"); } @@ -116,7 +115,7 @@ namespace OpenTaiko { * ap : "AI battle plays", 1 value : [AI battle playcount] * aw : "AI battle wins", 1 value : [AI battle wins count] * ig : "Impossible to Get", (not recommanded) used to be able to have content in database that is impossible to unlock, no values - * + * */ public (bool, string?) tConditionMetWrapper(int player, EScreen screen = EScreen.MyRoom) { if (RequiredArgCount < 0 && RequiredArgs.ContainsKey(Condition)) @@ -510,11 +509,6 @@ namespace OpenTaiko { } #endregion - } - } - - - } diff --git a/OpenTaiko/src/Helpers/HRarity.cs b/OpenTaiko/src/Helpers/HRarity.cs index 000b6d12..9a09d4e2 100644 --- a/OpenTaiko/src/Helpers/HRarity.cs +++ b/OpenTaiko/src/Helpers/HRarity.cs @@ -79,7 +79,5 @@ namespace OpenTaiko { return coinMult; } - - } } diff --git a/OpenTaiko/src/I18N/ILang.cs b/OpenTaiko/src/I18N/ILang.cs index 34997eac..5b932685 100644 --- a/OpenTaiko/src/I18N/ILang.cs +++ b/OpenTaiko/src/I18N/ILang.cs @@ -10,31 +10,6 @@ public static CLang LangInstance { get; private set; } = new CLang(Langcodes.FirstOrDefault("ja")); public static void langAttach(string lang) { LangInstance = CLang.GetCLang(lang); - - //switch (lang) { - // case "zh": - // CLangManager.LangInstance = new CLang_zh(); - // break; - // case "es": - // CLangManager.LangInstance = new CLang_es(); - // break; - // case "fr": - // CLangManager.LangInstance = new CLang_fr(); - // break; - // case "nl": - // CLangManager.LangInstance = new CLang_nl(); - // break; - // case "ko": - // CLangManager.LangInstance = new CLang_ko(); - // break; - // case "en": - // CLangManager.LangInstance = new CLang_en(); - // break; - // case "ja": - // default: - // CLangManager.LangInstance = new CLang_jp(); - // break; - //} CLuaScript.tReloadLanguage(lang); } @@ -43,21 +18,6 @@ } public static string fetchLang() { - //if (LangInstance is CLang_jp) - // return "ja"; - //else if (LangInstance is CLang_en) - // return "en"; - //else if (LangInstance is CLang_fr) - // return "fr"; - //else if (LangInstance is CLang_es) - // return "es"; - //else if (LangInstance is CLang_zh) - // return "zh"; - //else if (LangInstance is CLang_nl) - // return "nl"; - //else if (LangInstance is CLang_ko) - // return "ko"; - //return DefaultLanguage.Item1; return LangInstance.Id; } @@ -65,8 +25,6 @@ return Langcodes[idx]; } - //public static readonly string[] Languages = new string[] { "日本語 (Japanese)", "English", "Français (French)", "Español (Spanish)", "中文 (Chinese)", "nl (WIP)", "ko (WIP)" }; - //public static readonly string[] Langcodes = new string[] { "ja", "en", "fr", "es", "zh", "nl", "ko" }; // temporary garbage code public static string[] Langcodes { get { @@ -123,6 +81,5 @@ private static string[] _languages; private static Dictionary _cachedLocs = new Dictionary(); - //public static ILang LangInstance { get; private set; } = new CLang_jp(); } } diff --git a/OpenTaiko/src/Items/CItemToggle.cs b/OpenTaiko/src/Items/CItemToggle.cs index ac6a6877..298f4b32 100644 --- a/OpenTaiko/src/Items/CItemToggle.cs +++ b/OpenTaiko/src/Items/CItemToggle.cs @@ -7,7 +7,6 @@ public bool bON; - // コンストラクタ public CItemToggle() { diff --git a/OpenTaiko/src/Songs/CBoxDef.cs b/OpenTaiko/src/Songs/CBoxDef.cs index 552e8e26..e9d5b4f7 100644 --- a/OpenTaiko/src/Songs/CBoxDef.cs +++ b/OpenTaiko/src/Songs/CBoxDef.cs @@ -127,20 +127,6 @@ namespace OpenTaiko { } } reader.Close(); - - /* - if (!IsChangedBoxType) - { - this.BoxType = this.nStrジャンルtoNum(this.Genre); - } - if (!IsChangedBgType) - { - this.BgType = this.nStrジャンルtoNum(this.Genre); - } - */ } - - - } } diff --git a/OpenTaiko/src/Songs/CDTX.cs b/OpenTaiko/src/Songs/CDTX.cs index 5b89fd1a..352c847d 100644 --- a/OpenTaiko/src/Songs/CDTX.cs +++ b/OpenTaiko/src/Songs/CDTX.cs @@ -347,11 +347,11 @@ namespace OpenTaiko { //太鼓予備 "??", "??", "??", "??", "??", "??", "??", "??", - "??", "??", "??", "??", "??", "??", "??", "??", + "??", "??", "??", "??", "??", "??", "??", "??", //システム "小節線", "拍線", "??", "??", "AVI", "??", "??", "??", - "??", "??", "??", "??", "??", "??", "??", "??", + "??", "??", "??", "??", "??", "??", "??", "??", //システム(移動予定) "SCROLL", "DELAY", "ゴーゴータイム開始", "ゴーゴータイム終了", "カメラ移動開始(縦)", "カメラ移動終了(縦)", "カメラ移動開始(横)", "カメラ移動終了(横)", @@ -361,7 +361,7 @@ namespace OpenTaiko { "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", - "??", "??", "??", "??", "??", "??", "??", "??", + "??", "??", "??", "??", "??", "??", "??", "??", //太鼓1P、システム(現行) "??", "??", "??", "太鼓_赤", "太鼓_青", "太鼓_赤(大)", "太鼓_青(大)", "太鼓_黄", @@ -374,11 +374,11 @@ namespace OpenTaiko { "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "0xC4", "0xC5", "0xC6", "??", - "??", "??", "0xCA", "??", "??", "??", "??", "0xCF", + "??", "??", "0xCA", "??", "??", "??", "??", "0xCF", //システム(現行) "0xD0", "??", "??", "??", "??", "??", "??", "??", - "??", "??", "ミキサー追加", "ミキサー削除", "DELAY", "譜面分岐リセット", "譜面分岐アニメ", "譜面分岐内部処理", + "??", "??", "ミキサー追加", "ミキサー削除", "DELAY", "譜面分岐リセット", "譜面分岐アニメ", "譜面分岐内部処理", //システム(現行) "小節線ON/OFF", "分岐固定", "判定枠移動", "", "", "", "", "", @@ -1293,39 +1293,11 @@ namespace OpenTaiko { DanSongs.Number = 0; } - /* - public CDTX(string str全入力文字列, int difficulty) - : this() - { - this.On活性化(); - this.t入力_全入力文字列から(str全入力文字列, difficulty); - } - public CDTX(string strファイル名, bool bヘッダのみ, int difficulty) - : this() - { - this.On活性化(); - this.t入力(strファイル名, bヘッダのみ, difficulty); - } - public CDTX(string str全入力文字列, double db再生速度, int nBGMAdjust, int difficulty) - : this() - { - this.On活性化(); - this.t入力_全入力文字列から(str全入力文字列, str全入力文字列, db再生速度, nBGMAdjust, difficulty); - } - */ public CDTX(string strファイル名, bool bヘッダのみ, double db再生速度, int nBGMAdjust, int difficulty) : this() { this.Activate(); this.t入力(strファイル名, bヘッダのみ, db再生速度, nBGMAdjust, 0, 0, false, difficulty); } - /* - public CDTX(string strファイル名, bool bヘッダのみ, double db再生速度, int nBGMAdjust, int nReadVersion, int difficulty) - : this() - { - this.On活性化(); - this.t入力(strファイル名, bヘッダのみ, db再生速度, nBGMAdjust, nReadVersion, 0, false, difficulty); - } - */ public CDTX(string strファイル名, bool bヘッダのみ, double db再生速度, int nBGMAdjust, int nReadVersionUnused, int nPlayerSide, bool bSession, int difficulty) : this() { this.Activate(); @@ -1358,12 +1330,6 @@ namespace OpenTaiko { long nCurrentTime = SoundManager.PlayTimer.SystemTimeMs; if (nCurrentTime > wc.n再生開始時刻[i]) { long nAbsTimeFromStartPlaying = nCurrentTime - wc.n再生開始時刻[i]; - //Trace.TraceInformation( "再生位置自動補正: {0}, seek先={1}ms, 全音長={2}ms", - // Path.GetFileName( wc.rSound[ 0 ].strファイル名 ), - // nAbsTimeFromStartPlaying, - // wc.rSound[ 0 ].n総演奏時間ms - //); - // wc.rSound[ i ].t再生位置を変更する( wc.rSound[ i ].t時刻から位置を返す( nAbsTimeFromStartPlaying ) ); // WASAPI/ASIO用↓ if (!OpenTaiko.stage演奏ドラム画面.bPAUSE) { if (wc.rSound[i].IsPaused) wc.rSound[i].Resume(nAbsTimeFromStartPlaying); @@ -1453,71 +1419,6 @@ namespace OpenTaiko { return new string(new char[] { str[n / 36], str[n % 36] }); } - public static void tManageKusudama(CDTX[] dtxarr) { - if (OpenTaiko.ConfigIni.nPlayerCount == 1) return; - - // Replace non-shared kusudamas by balloons - #region [Sync check] - /* - for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++) - { - CDTX dtx = dtxarr[i]; - if (dtx == null) continue; - foreach (KeyValuePair kvp in dtx.kusudaMAP) - { - for (int j = 0; j < TJAPlayer3.ConfigIni.nPlayerCount; j++) - { - if (j == i) continue; - - CDTX dtxp = dtxarr[j]; - if (dtxp == null) continue; - if (!dtxp.kusudaMAP.ContainsKey(kvp.Key)) - { - kvp.Value.nチャンネル番号 = 0x17; - break; - } - } - } - } - */ - #endregion - - // Stack balloon values to all remining (= existing) kusudamas to player 1 - #region [Accumulation] - /* - CDTX dtx1 = dtxarr[0]; - if (dtx1 == null) return; - foreach (KeyValuePair kvp in dtx1.kusudaMAP) - { - if (!NotesManager.IsKusudama(kvp.Value)) continue; - for (int j = 1; j < TJAPlayer3.ConfigIni.nPlayerCount; j++) - { - CDTX dtxp = dtxarr[j]; - if (dtxp == null) continue; - if (dtxp.kusudaMAP.ContainsKey(kvp.Key) - && NotesManager.IsKusudama(dtxp.kusudaMAP[kvp.Key])) - { - kvp.Value.nBalloon += dtxp.kusudaMAP[kvp.Key].nBalloon; - } - } - // For score normalization - - for (int j = 1; j < TJAPlayer3.ConfigIni.nPlayerCount; j++) - { - CDTX dtxp = dtxarr[j]; - if (dtxp == null) continue; - if (dtxp.kusudaMAP.ContainsKey(kvp.Key) - && NotesManager.IsKusudama(dtxp.kusudaMAP[kvp.Key])) - { - dtxp.kusudaMAP[kvp.Key].nBalloon = kvp.Value.nBalloon; - } - } - - } - */ - #endregion - } - public void tApplyFunMods(int player = 0) { Random rnd = new System.Random(); @@ -1560,7 +1461,6 @@ namespace OpenTaiko { public void tRandomizeTaikoChips(int player = 0) { //2016.02.11 kairera0467 - Random rnd = new System.Random(); var eRandom = OpenTaiko.ConfigIni.eRandom[OpenTaiko.GetActualPlayer(player)]; @@ -1694,10 +1594,7 @@ namespace OpenTaiko { #endregion this.tSenotes_Core_V2(list音符のみのリスト); - } - - } #region [ チップの再生と停止 ] @@ -1768,8 +1665,6 @@ namespace OpenTaiko { foreach (CWAV cwav in this.listWAV.Values) { for (int i = 0; i < nPolyphonicSounds; i++) { if ((cwav.rSound[i] != null) && cwav.rSound[i].IsPaused) { - //long num1 = cwav.n一時停止時刻[ i ]; - //long num2 = cwav.n再生開始時刻[ i ]; cwav.rSound[i].Resume(cwav.n一時停止時刻[i] - cwav.n再生開始時刻[i]); cwav.n再生開始時刻[i] += SoundManager.PlayTimer.SystemTimeMs - cwav.n一時停止時刻[i]; } @@ -1797,43 +1692,25 @@ namespace OpenTaiko { // Unique ID parsing/generation this.uniqueID = new CSongUniqueID(this.strフォルダ名 + @$"{Path.DirectorySeparatorChar}uniqueID.json"); - //if ( this.e種別 != E種別.SMF ) - { - try { - this.nPlayerSide = nPlayerSide; - this.bSession譜面を読み込む = bSession; - //次郎方式 - - //DateTime timeBeginLoad = DateTime.Now; - //TimeSpan span; - - StreamReader reader = new StreamReader(strファイル名, Encoding.GetEncoding(OpenTaiko.sEncType)); - string str2 = reader.ReadToEnd(); - reader.Close(); - - //span = (TimeSpan) ( DateTime.Now - timeBeginLoad ); - //Trace.TraceInformation( "DTXfileload時間: {0}", span.ToString() ); - - this.t入力_全入力文字列から(str2, str2, db再生速度, nBGMAdjust, difficulty); - } catch (Exception ex) { - //MessageBox.Show( "おや?エラーが出たようです。お兄様。" ); - Trace.TraceError("おや?エラーが出たようです。お兄様。"); - Trace.TraceError(ex.ToString()); - Trace.TraceError("例外が発生しましたが処理を継続します。 (79ff8639-9b3c-477f-bc4a-f2eea9784860)"); - } + try { + this.nPlayerSide = nPlayerSide; + this.bSession譜面を読み込む = bSession; + //次郎方式 + StreamReader reader = new StreamReader(strファイル名, Encoding.GetEncoding(OpenTaiko.sEncType)); + string str2 = reader.ReadToEnd(); + reader.Close(); + this.t入力_全入力文字列から(str2, str2, db再生速度, nBGMAdjust, difficulty); + } catch (Exception ex) { + Trace.TraceError("おや?エラーが出たようです。お兄様。"); + Trace.TraceError(ex.ToString()); + Trace.TraceError("例外が発生しましたが処理を継続します。 (79ff8639-9b3c-477f-bc4a-f2eea9784860)"); } } public void t入力_全入力文字列から(string str全入力文字列, string str1Unused, double db再生速度, int nBGMAdjust, int Difficulty) { - //DateTime timeBeginLoad = DateTime.Now; - //TimeSpan span; - if (!string.IsNullOrEmpty(str全入力文字列)) { #region [ 改行カット ] this.db再生速度 = db再生速度; #endregion - //span = (TimeSpan) ( DateTime.Now - timeBeginLoad ); - //Trace.TraceInformation( "改行カット時間: {0}", span.ToString() ); - //timeBeginLoad = DateTime.Now; #region [ 初期化 ] for (int j = 0; j < 36 * 36; j++) { this.n無限管理WAV[j] = -j; @@ -1859,18 +1736,14 @@ namespace OpenTaiko { this.dbNowSCROLL_Expert = new double[] { 1.0, 0.0 }; this.dbNowSCROLL_Master = new double[] { 1.0, 0.0 }; this.n現在のコース = ECourse.eNormal; - #endregion + #endregion this.t入力_V4(str全入力文字列, Difficulty); #endregion - //span = (TimeSpan) ( DateTime.Now - timeBeginLoad ); - //Trace.TraceInformation( "抜き出し時間: {0}", span.ToString() ); - //timeBeginLoad = DateTime.Now; this.n無限管理WAV = null; this.n無限管理BPM = null; this.n無限管理PAN = null; this.n無限管理SIZE = null; - //this.t入力_行解析ヘッダ( str1Unused ); if (!this.bヘッダのみ) { #region [ BPM/BMP初期化 ] int ch; @@ -1902,9 +1775,6 @@ namespace OpenTaiko { this.listChip.Insert(0, chip); } #endregion - //span = (TimeSpan) ( DateTime.Now - timeBeginLoad ); - //Trace.TraceInformation( "前準備完了時間: {0}", span.ToString() ); - //timeBeginLoad = DateTime.Now; #region [ CWAV初期化 ] foreach (CWAV cwav in this.listWAV.Values) { if (cwav.nチップサイズ < 0) { @@ -1915,63 +1785,14 @@ namespace OpenTaiko { } } #endregion - //span = (TimeSpan) ( DateTime.Now - timeBeginLoad ); - //Trace.TraceInformation( "CWAV前準備時間: {0}", span.ToString() ); - //timeBeginLoad = DateTime.Now; #region [ チップ倍率設定 ] // #28145 2012.4.22 yyagi 二重ループを1重ループに変更して高速化) - //foreach ( CWAV cwav in this.listWAV.Values ) - //{ - // foreach( CChip chip in this.listChip ) - // { - // if( chip.n整数値_内部番号 == cwav.n内部番号 ) - // { - // chip.dbチップサイズ倍率 = ( (double) cwav.nチップサイズ ) / 100.0; - // if (chip.nチャンネル番号 == 0x01 ) // BGMだったら - // { - // cwav.bIsOnBGMLane = true; - // } - // } - // } - //} foreach (CChip chip in this.listChip) { if (this.listWAV.TryGetValue(chip.n整数値_内部番号, out CWAV cwav)) - //foreach ( CWAV cwav in this.listWAV.Values ) { - // if ( chip.n整数値_内部番号 == cwav.n内部番号 ) - // { chip.dbチップサイズ倍率 = ((double)cwav.nチップサイズ) / 100.0; - //if ( chip.nチャンネル番号 == 0x01 ) // BGMだったら - //{ - // cwav.bIsOnBGMLane = true; - //} - // } } } #endregion - //span = (TimeSpan) ( DateTime.Now - timeBeginLoad ); - //Trace.TraceInformation( "CWAV全準備時間: {0}", span.ToString() ); - //timeBeginLoad = DateTime.Now; - #region [ 必要に応じて空打ち音を0小節に定義する ] - //for ( int m = 0xb1; m <= 0xbc; m++ ) // #28146 2012.4.21 yyagi; bb -> bc - //{ - // foreach ( CChip chip in this.listChip ) - // { - // if ( chip.nチャンネル番号 == m ) - // { - // CChip c = new CChip(); - // c.n発声位置 = 0; - // c.nチャンネル番号 = chip.nチャンネル番号; - // c.n整数値 = chip.n整数値; - // c.n整数値_内部番号 = chip.n整数値_内部番号; - // this.listChip.Insert( 0, c ); - // break; - // } - // } - //} - #endregion - //span = (TimeSpan) ( DateTime.Now - timeBeginLoad ); - //Trace.TraceInformation( "空打確認時間: {0}", span.ToString() ); - //timeBeginLoad = DateTime.Now; #region [ 拍子_拍線の挿入 ] if (this.listChip.Count > 0) { this.listChip.Sort(); // 高速化のためにはこれを削りたいが、listChipの最後がn発声位置の終端である必要があるので、 @@ -1979,28 +1800,8 @@ namespace OpenTaiko { // なお、093時点では、このソートを削除しても動作するようにはしてある。 // (ここまでの一部チップ登録を、listChip.Add(c)から同Insert(0,c)に変更してある) // これにより、数ms程度ながらここでのソートも高速化されている。 - - //double barlength = 1.0; - //int nEndOfSong = ( this.listChip[ this.listChip.Count - 1 ].n発声位置 + 384 ) - ( this.listChip[ this.listChip.Count - 1 ].n発声位置 % 384 ); - //for ( int tick384 = 0; tick384 <= nEndOfSong; tick384 += 384 ) // 小節線の挿入 (後に出てくる拍子線とループをまとめようとするなら、forループの終了条件の微妙な違いに注意が必要) - //{ - // CChip chip = new CChip(); - // chip.n発声位置 = tick384; - // chip.nチャンネル番号 = 0x50; // 小節線 - // chip.n整数値 = 36 * 36 - 1; - // chip.dbSCROLL = 1.0; - // this.listChip.Add( chip ); - //} - ////this.listChip.Sort(); // ここでのソートは不要。ただし最後にソートすること - //int nChipNo_BarLength = 0; - //int nChipNo_C1 = 0; - - //this.listChip.Sort(); } #endregion - //span = (TimeSpan) ( DateTime.Now - timeBeginLoad ); - //Trace.TraceInformation( "拍子_拍線挿入時間: {0}", span.ToString() ); - //timeBeginLoad = DateTime.Now; #region [ C2 [拍線_小節線表示指定] の処理 ] // #28145 2012.4.21 yyagi; 2重ループをほぼ1重にして高速化 bool bShowBeatBarLine = true; for (int i = 0; i < this.listChip.Count; i++) { @@ -2032,14 +1833,10 @@ namespace OpenTaiko { } } #endregion - //span = (TimeSpan) ( DateTime.Now - timeBeginLoad ); - //Trace.TraceInformation( "C2 [拍線_小節線表示指定]: {0}", span.ToString() ); - //timeBeginLoad = DateTime.Now; this.n内部番号BRANCH1to = 0; this.n内部番号JSCROLL1to = 0; #region [ 発声時刻の計算 ] double bpm = 120.0; - //double dbBarLength = 1.0; int n発声位置 = 0; int ms = 0; int nBar = 0; @@ -2053,7 +1850,6 @@ namespace OpenTaiko { foreach (CChip chip in this.listChip) { if (chip.nチャンネル番号 == 0x02) { } - //else if( chip.nチャンネル番号 == 0x03 ){} else if (chip.nチャンネル番号 == 0x01) { } else if (chip.nチャンネル番号 == 0x08) { } else if (chip.nチャンネル番号 >= 0x11 && chip.nチャンネル番号 <= 0x1F) { } else if (chip.nチャンネル番号 == 0x50) { } else if (chip.nチャンネル番号 == 0x51) { } else if (chip.nチャンネル番号 == 0x54) { } else if (chip.nチャンネル番号 == 0x08) { } else if (chip.nチャンネル番号 == 0xF1) { } else if (chip.nチャンネル番号 == 0xF2) { } else if (chip.nチャンネル番号 == 0xFF) { } else if (chip.nチャンネル番号 == 0xDD) { chip.n発声時刻ms = ms + ((int)(((625 * (chip.n発声位置 - n発声位置)) * this.dbBarLength) / bpm)); } else if (chip.nチャンネル番号 == 0xDF) { chip.n発声時刻ms = ms + ((int)(((625 * (chip.n発声位置 - n発声位置)) * this.dbBarLength) / bpm)); } else if (chip.nチャンネル番号 < 0x93) chip.n発声時刻ms = ms + ((int)(((625 * (chip.n発声位置 - n発声位置)) * this.dbBarLength) / bpm)); else if ((chip.nチャンネル番号 > 0x9F && chip.nチャンネル番号 < 0xA0) || (chip.nチャンネル番号 >= 0xF0 && chip.nチャンネル番号 < 0xFE)) @@ -2146,10 +1942,6 @@ namespace OpenTaiko { case 0x50: { if (this.bOFFSETの値がマイナスである) chip.n発声時刻ms += this.nOFFSET; - //chip.n発声時刻ms += this.nDELAY; - //chip.dbBPM = this.dbNowBPM; - //chip.dbSCROLL = this.dbNowSCROLL; - if (this.n内部番号BRANCH1to + 1 > this.listBRANCH.Count) continue; @@ -2158,29 +1950,6 @@ namespace OpenTaiko { this.n内部番号BRANCH1to++; } - //switch (this.n現在のコース) - //{ - // case 0: - // chip.dbSCROLL = this.dbNowSCROLL_Normal; - // break; - // case 1: - // chip.dbSCROLL = this.dbNowSCROLL_Expert; - // break; - // case 2: - // chip.dbSCROLL = this.dbNowSCROLL_Master; - // break; - //} - - //if( this.bBarLine == true ) - // chip.b可視 = true; - //else - // chip.b可視 = false; - - //if( this.b次の小節が分岐である ) - //{ - // chip.bBranch = true; - // this.b次の小節が分岐である = false; - //} continue; } @@ -2224,32 +1993,8 @@ namespace OpenTaiko { chip.n発声時刻ms += this.nOFFSET; chip.nノーツ終了時刻ms += this.nOFFSET; } - - //chip.dbBPM = this.dbNowBPM; - //chip.dbSCROLL = this.dbNowSCROLL; this.nNowRoll = this.nNowRollCount - 1; - //chip.nノーツ終了時刻ms = ms + ( (int) ( ( ( 0x271 * ( chip.nノーツ終了位置 - n発声位置 ) ) * dbBarLength ) / bpm ) ); - - #region[チップ番号を記録] - //switch(chip.nコース) - //{ - // case 0: - // this.n連打チップ_temp[0] = this.nNowRoll; - // this.dbSCROLL_temp[0] = this.dbNowSCROLL; - // break; - // case 1: - // this.n連打チップ_temp[1] = this.nNowRoll; - // this.dbSCROLL_temp[1] = this.dbNowSCROLL; - // break; - // case 2: - // this.n連打チップ_temp[2] = this.nNowRoll; - // this.dbSCROLL_temp[2] = this.dbNowSCROLL; - // break; - //} - - #endregion - continue; } case 0x9A: { @@ -2257,71 +2002,14 @@ namespace OpenTaiko { if (this.bOFFSETの値がマイナスである) { chip.n発声時刻ms += this.nOFFSET; } - //chip.n発声時刻ms += this.nDELAY; - //chip.dbBPM = this.dbNowBPM; - //chip.dbSCROLL = this.dbNowSCROLL; - - #region[チップ番号を記録] - //風船は現時点では未実装のため処理しない。 - - - //switch (chip.nコース) - //{ - // case 0: - // if (this.listChip[this.n連打チップ_temp[0]].nチャンネル番号 == 0x99) break; - // this.listChip[this.n連打チップ_temp[0]].nノーツ終了時刻ms = chip.n発声時刻ms; - // this.listChip[this.n連打チップ_temp[0]].dbSCROLL = this.dbSCROLL_temp[0]; - // break; - // case 1: - // if (this.listChip[this.n連打チップ_temp[1]].nチャンネル番号 == 0x99) break; - // this.listChip[this.n連打チップ_temp[1]].nノーツ終了時刻ms = chip.n発声時刻ms; - // this.listChip[this.n連打チップ_temp[1]].dbSCROLL = this.dbSCROLL_temp[1]; - // break; - // case 2: - // if (this.listChip[this.n連打チップ_temp[2]].nチャンネル番号 == 0x99) break; - // this.listChip[this.n連打チップ_temp[2]].nノーツ終了時刻ms = chip.n発声時刻ms; - // this.listChip[this.n連打チップ_temp[2]].dbSCROLL = this.dbSCROLL_temp[2]; - // break; - //} - - #endregion - - //this.listChip[this.nNowRoll].nノーツ終了時刻ms = chip.n発声時刻ms; - //this.listChip[this.nNowRoll].dbSCROLL = this.dbNowSCROLL; - //this.listChip[this.nNowRoll].dbBPM = this.dbNowBPM; continue; } case 0x9D: { - //if ( this.listSCROLL.ContainsKey( chip.n整数値_内部番号 ) ) - //{ - //this.dbNowSCROLL = ( ( this.listSCROLL[ chip.n整数値_内部番号 ].n表記上の番号 == 0 ) ? 0.0 : 1.0 ) + this.listSCROLL[ chip.n整数値_内部番号 ].dbSCROLL値; - //} - - //switch (chip.nコース) - //{ - // case 0: - // this.dbNowSCROLL_Normal = this.dbNowSCROLL; - // this.n現在のコース = 0; - // break; - // case 1: - // this.dbNowSCROLL_Expert = this.dbNowSCROLL; - // this.n現在のコース = 1; - // break; - // case 2: - // this.dbNowSCROLL_Master = this.dbNowSCROLL; - // this.n現在のコース = 2; - // break; - //} - continue; } case 0xDC: { if (this.bOFFSETの値がマイナスである) chip.n発声時刻ms += this.nOFFSET; - //if ( this.listDELAY.ContainsKey( chip.n整数値_内部番号 ) ) - //{ - // this.nDELAY = ( ( this.listDELAY[ chip.n整数値_内部番号 ].n表記上の番号 == 0 ) ? 0 : 0 ) + this.listDELAY[ chip.n整数値_内部番号 ].nDELAY値; - //} continue; } case 0xDE: { @@ -2343,31 +2031,15 @@ namespace OpenTaiko { case 0xDF: { if (this.bOFFSETの値がマイナスである) chip.n発声時刻ms += this.nOFFSET; - //if ( this.listBRANCH.ContainsKey( chip.n整数値_内部番号 ) ) - //{ - //this.listBRANCH[chip.n整数値_内部番号].db分岐時間ms = chip.n発声時刻ms + ( this.bOFFSETの値がマイナスである ? this.nOFFSET : 0 ); - //} - continue; } case 0xE0: { - //if (this.bOFFSETの値がマイナスである) - // chip.n発声時刻ms += this.nOFFSET; - - //chip.dbBPM = this.dbNowBPM; - //chip.dbSCROLL = this.dbNowSCROLL; - //if( chip.n整数値_内部番号 == 1 ) - // this.bBarLine = false; - //else - // this.bBarLine = true; continue; } default: { if (this.bOFFSETの値がマイナスである) chip.n発声時刻ms += this.nOFFSET; - //chip.n発声時刻ms += this.nDELAY; chip.dbBPM = this.dbNowBPM; - //chip.dbSCROLL = this.dbNowSCROLL; continue; } } @@ -2381,9 +2053,6 @@ namespace OpenTaiko { } } #endregion - //span = (TimeSpan) ( DateTime.Now - timeBeginLoad ); - //Trace.TraceInformation( "発声時刻計算: {0}", span.ToString() ); - //timeBeginLoad = DateTime.Now; #region[listlyricを時間順に並び替え。] this.listLyric2 = tmplistlyric; @@ -2392,9 +2061,6 @@ namespace OpenTaiko { this.nBGMAdjust = 0; this.t各自動再生音チップの再生時刻を変更する(nBGMAdjust); - //span = (TimeSpan) ( DateTime.Now - timeBeginLoad ); - //Trace.TraceInformation( "再生時刻変更: {0}", span.ToString() ); - //timeBeginLoad = DateTime.Now; #region [ 可視チップ数カウント ] for (int n = 0; n < 14; n++) { @@ -2410,9 +2076,6 @@ namespace OpenTaiko { } } #endregion - //span = (TimeSpan) ( DateTime.Now - timeBeginLoad ); - //Trace.TraceInformation( "可視チップ数カウント {0}", span.ToString() ); - //timeBeginLoad = DateTime.Now; #region [ チップの種類を分類し、対応するフラグを立てる ] foreach (CChip chip in this.listChip) { if ((chip.nチャンネル番号 == 0x01 && this.listWAV.TryGetValue(chip.n整数値_内部番号, out CWAV cwav)) && !cwav.listこのWAVを使用するチャンネル番号の集合.Contains(chip.nチャンネル番号)) { @@ -2440,9 +2103,6 @@ namespace OpenTaiko { } } #endregion - //span = (TimeSpan) ( DateTime.Now - timeBeginLoad ); - //Trace.TraceInformation( "ch番号集合確認: {0}", span.ToString() ); - //timeBeginLoad = DateTime.Now; #region[ seNotes計算 ] if (this.listBRANCH.Count != 0) this.tSetSenotes_branch(); @@ -2463,20 +2123,6 @@ namespace OpenTaiko { } } #endregion - - //ソートっぽい - //this.listChip.Sort(delegate(CChip pchipA, CChip pchipB) { return pchipA.n発声時刻ms - pchipB.n発声時刻ms; } ); - //Random ran1 = new Random(); - //for (int n = 0; n < this.listChip.Count; n++ ) - //{ - - // if (CDTXMania.ConfigIni.bHispeedRandom) - // { - - // int nRan = ran1.Next(5, 40); - // this.listChip[n].dbSCROLL = nRan / 10.0; - // } - //} int n整数値管理 = 0; foreach (CChip chip in this.listChip) { if (chip.nチャンネル番号 != 0x54) @@ -2517,7 +2163,7 @@ namespace OpenTaiko { if (!string.IsNullOrEmpty(input[n]) && (input[n].Substring(0, 1) == "#" || input[n].StartsWith("EXAM") - || NotesManager.FastFlankedParsing(input[n])))//this.CharConvertNote(input[n].Substring(0, 1)) != -1)) + || NotesManager.FastFlankedParsing(input[n]))) { if (input[n].StartsWith("BALLOON") || input[n].StartsWith("BPM")) { //A~Fで始まる命令が削除されない不具合の対策 @@ -2526,7 +2172,7 @@ namespace OpenTaiko { } } } else if (nMode == 2) { - if (!string.IsNullOrEmpty(input[n]) && NotesManager.FastFlankedParsing(input[n]))//this.CharConvertNote(input[n].Substring(0, 1)) != -1) + if (!string.IsNullOrEmpty(input[n]) && NotesManager.FastFlankedParsing(input[n])) { if (input[n].StartsWith("BALLOON") || input[n].StartsWith("BPM")) { //A~Fで始まる命令が削除されない不具合の対策 @@ -2575,7 +2221,7 @@ namespace OpenTaiko { } /// - /// + /// /// /// /// 1小節内の文字数 @@ -2584,7 +2230,7 @@ namespace OpenTaiko { } /// - /// + /// /// /// /// 1小節内の文字数 @@ -2608,16 +2254,12 @@ namespace OpenTaiko { return; } - var line = new CLine(); line.nコース = this.nLineCountCourseTemp; line.n文字数 = InputText.Length - 1; line.n小節番号 = this.n現在の小節数; - this.listLine.Add(line); - this.n現在の小節数++; - } /// @@ -2630,8 +2272,6 @@ namespace OpenTaiko { private object str改行文字を削除する(string strInput, int nMode) { string str = ""; str = strInput; - // str = strInput.Replace(Environment.NewLine, "\n"); - // str = str.Replace('\t', ' '); unsafe { fixed (char* s = str) { @@ -2682,11 +2322,7 @@ namespace OpenTaiko { if (this.strConvertCourse(nNC) != -1) { nCourse = this.strConvertCourse(nNC); strCourseTJA[nCourse] = strTemp[n]; - } else { - } - //strCourseTJA[ ]; - } } else { strCourseTJA[3] = strTJA; @@ -2701,8 +2337,6 @@ namespace OpenTaiko { @"^(?!(TITLE|LEVEL|BPM|WAVE|OFFSET|BALLOON|EXAM1|EXAM2|EXAM3|EXAM4|EXAM5|EXAM6|EXAM7|DANTICK|DANTICKCOLOR|RENREN22|RENREN23|RENREN32|RENREN33|RENREN42|RENREN43|BALLOONNOR|BALLOONEXP|BALLOONMAS|SONGVOL|SEVOL|SCOREINIT|SCOREDIFF|COURSE|STYLE|TOWERTYPE|GAME|LIFE|DEMOSTART|SIDE|SUBTITLE|SCOREMODE|GENRE|MAKER|SELECTBG|MOVIEOFFSET|BGIMAGE|BGMOVIE|HIDDENBRANCH|GAUGEINCR|LYRICFILE|#HBSCROLL|#BMSCROLL)).+\n", RegexOptions.Multiline | RegexOptions.Compiled); - // private static readonly HashSet valableTokens = new HashSet(@"TIT|LEV|BPM|WAV|OFF|BAL|EXA|DAN|REN|BAL|SON|SEV|SCO|COU|STY|TOW|GAM|LIF|DEM|SID|SUB|GEN|MOV|BGI|BGM|HID|GAU|LYR|#HB|#BM".Split('|')); - private int nDifficulty; /// @@ -2710,7 +2344,7 @@ namespace OpenTaiko { /// ○未実装 /// _「COURSE」定義が無い譜面は未対応 ///  →ver2015082200で対応完了。 - /// + /// /// /// 譜面のデータ private void t入力_V4(string strInput, int difficulty) { @@ -2728,19 +2362,12 @@ namespace OpenTaiko { } string strInputHeader = strInput.Remove(startIndex); strInput = strInput.Remove(0, startIndex); - - // Regex called here - // strInputHeader = regexForStrippingHeadingLines.Replace(strInputHeader, ""); - - strInput = strInputHeader + "\n" + strInput; //どうせ使わないので先にSplitしてコメントを削除。 var strSplitした譜面 = (string[])this.str改行文字を削除する(strInput, 1); for (int i = 0; strSplitした譜面.Length > i; i++) { - // strSplitした譜面[i] = this.tコメントを削除する(strSplitした譜面[i]); - int idx = strSplitした譜面[i].IndexOf("//"); if (idx >= 0) strSplitした譜面[i] = strSplitした譜面[i].Substring(0, idx); @@ -2765,8 +2392,6 @@ namespace OpenTaiko { int n読み込むコース = 3; int n譜面数 = 0; //2017.07.22 kairera0467 tjaに含まれる譜面の数 - - bool b新処理 = false; //まずはコースごとに譜面を分割。 @@ -2851,31 +2476,16 @@ namespace OpenTaiko { //0:ヘッダー情報 1:#START以降 となる。個数の定義は後からされるため、ここでは省略。 var strSplitした後の譜面 = strSplit読み込むコース; //strSplitした譜面[ n読み込むコース ].Split( this.dlmtEnter, StringSplitOptions.RemoveEmptyEntries ); strSplitした後の譜面 = this.tコマンド行を削除したTJAを返す(strSplitした後の譜面, 1); - //string str命令消去譜面temp = this.StringArrayToString( this.str命令消去譜面 ); - //string[] strDelimiter = { "," }; - //this.str命令消去譜面 = str命令消去譜面temp.Split( strDelimiter, StringSplitOptions.RemoveEmptyEntries ); - this.n現在の小節数 = 1; try { #region[ 最初の処理 ] //1小節の時間を挿入して開始時間を調節。 this.dbNowTime += ((15000.0 / 120.0 * (4.0 / 4.0)) * 16.0); - //this.dbNowBMScollTime += (( this.dbBarLength ) * 16.0 ); #endregion - //string strWrite = ""; for (int i = 0; strSplitした後の譜面.Length > i; i++) { nNowReadLine++; str = strSplitした後の譜面[i]; - //strWrite += str; - //if( !str.StartsWith( "#" ) && !string.IsNullOrEmpty( this.strTemp ) ) - //{ - // str = this.strTemp + str; - //} - - // Check line - this.t入力_行解析譜面_V4(str); - } // Retrieve all the global exams (non individual) at the end @@ -2891,11 +2501,6 @@ namespace OpenTaiko { Trace.TraceError(ex.ToString()); Trace.TraceError("例外が発生しましたが処理を継続します。 (2da1e880-6b63-4e82-b018-bf18c3568335)"); } - //if( stream != null ) - //{ - // stream.Flush(); - // stream.Close(); - //} #endregion } } @@ -2975,12 +2580,6 @@ namespace OpenTaiko { return result.ToArray(); } - - - - - - /// /// 譜面読み込みメソッドV4で使用。 /// @@ -3053,8 +2652,6 @@ namespace OpenTaiko { var chip1 = new CChip(); chip1.nチャンネル番号 = 0x54; - //chip1.n発声位置 = 384; - //chip1.n発声時刻ms = (int)this.dbNowTime; if (this.nMOVIEOFFSET == 0) chip1.n発声時刻ms = (int)this.dbNowTime; else @@ -3075,7 +2672,6 @@ namespace OpenTaiko { chip.nチャンネル番号 = 0xFF; chip.n発声位置 = ((this.n現在の小節数 + 2) * 384); - //chip.n発声時刻ms = (int)( this.dbNowTime + ((15000.0 / this.dbNowBPM * ( 4.0 / 4.0 )) * 16.0) * 2 ); chip.n発声時刻ms = (int)(this.dbNowTime + 1000); //2016.07.16 kairera0467 終了時から1秒後に設置するよう変更。 chip.fNow_Measure_m = this.fNow_Measure_m; chip.fNow_Measure_s = this.fNow_Measure_s; @@ -3085,7 +2681,6 @@ namespace OpenTaiko { if (n参照中の難易度 == (int)Difficulty.Dan) { for (int i = listChip.Count - 1; i >= 0; i--) { - //if (listChip[i].nチャンネル番号 >= 0x11 && listChip[i].nチャンネル番号 <= 0x18) if (NotesManager.IsHittableNote(listChip[i])) { if (DanSongs.Number != 0) { Array.Resize(ref this.pDan_LastChip, this.pDan_LastChip.Length + 1); @@ -3241,10 +2836,6 @@ namespace OpenTaiko { this.listChip.Add(chip); } - - - - this.n内部番号SCROLL1to++; } else if (command == "#MEASURE") { strArray = argument.Split(new char[] { '/' }); @@ -3276,8 +2867,6 @@ namespace OpenTaiko { // チップを配置。 this.listChip.Add(chip); - - //lbMaster.Items.Add( ";拍子変更 " + strArray[0] + "/" + strArray[1] ); } else if (command == "#DELAY") { double nDELAY = 0; if (!double.TryParse(argument, out nDELAY)) { @@ -3286,10 +2875,7 @@ namespace OpenTaiko { } nDELAY *= 1000; - this.listDELAY.Add(this.n内部番号DELAY1to, new CDELAY() { n内部番号 = this.n内部番号DELAY1to, n表記上の番号 = 0, nDELAY値 = (int)nDELAY, delay_bmscroll_time = this.dbLastBMScrollTime, delay_bpm = this.dbNowBPM, delay_course = this.n現在のコース, delay_time = this.dbLastTime }); - - //チップ追加して割り込んでみる。 var chip = new CChip(); @@ -3418,8 +3004,6 @@ namespace OpenTaiko { case "LINEAR": eType = Easing.CalcType.Linear; break; - default: - break; } chip.fCamMoveType = eType; @@ -3594,8 +3178,6 @@ namespace OpenTaiko { case "LINEAR": eType = Easing.CalcType.Linear; break; - default: - break; } chip.fCamMoveType = eType; @@ -4524,8 +4106,6 @@ namespace OpenTaiko { case "LINEAR": eType = Easing.CalcType.Linear; break; - default: - break; } chip.objCalcType = eType; @@ -4710,8 +4290,6 @@ namespace OpenTaiko { case "LINEAR": eType = Easing.CalcType.Linear; break; - default: - break; } chip.objCalcType = eType; @@ -5177,7 +4755,7 @@ namespace OpenTaiko { // チップを配置。 this.listChip.Add(chip); } else if (command == "#BRANCHSTART") { - #region [ 譜面分岐のパース方法を作り直し ] + #region [ 譜面分岐のパース方法を作り直し ] this.bチップがある.Branch = true; this.b最初の分岐である = false; this.b分岐を一回でも開始した = true; @@ -5503,7 +5081,6 @@ namespace OpenTaiko { nextSongnextSongChip.nチャンネル番号 = 0x01; nextSongnextSongChip.n発声位置 = 384; - //nextSongnextSongChip.n発声時刻ms = (int)this.dbNowTime - (bOFFSETの値がマイナスである ? -nOFFSET : nOFFSET); nextSongnextSongChip.n発声時刻ms = (int)this.dbNowTime; nextSongnextSongChip.fNow_Measure_m = this.fNow_Measure_m; nextSongnextSongChip.fNow_Measure_s = this.fNow_Measure_s; @@ -5568,7 +5145,7 @@ namespace OpenTaiko { } } void t現在のチップ情報を記録する(bool bInPut) { - //2020.04.21 こうなってしまったのは仕方がないな。。 + //2020.04.21 こうなってしまったのは仕方がないな。。 if (bInPut) { #region [ 記録する ] cBranchStart.dbTime = this.dbNowTime; @@ -5692,7 +5269,7 @@ namespace OpenTaiko { chip.b可視 = true; chip.bHideBarLine = this.bBARLINECUE[0] == 1; - #region [ 作り直し ] + #region [ 作り直し ] if (IsEndedBranching) { if (this.IsBranchBarDraw[i]) chip.bBranch = true; @@ -5704,7 +5281,7 @@ namespace OpenTaiko { this.listChip.Add(chip); - #region [ 作り直し ] + #region [ 作り直し ] if (IsEndedBranching) this.IsBranchBarDraw[i] = false; else this.IsBranchBarDraw[(int)n現在のコース] = false; @@ -5724,7 +5301,6 @@ namespace OpenTaiko { hakusen.n発声位置 = ((this.n現在の小節数) * 384); hakusen.n発声時刻ms = (int)(this.dbNowTime + (((db1拍 * 4.0)) * measure) * 1000.0); hakusen.nチャンネル番号 = 0x51; - //hakusen.n発声時刻ms = (int)this.dbNowTime; hakusen.fBMSCROLLTime = this.dbNowBMScollTime; hakusen.n整数値_内部番号 = this.n現在の小節数; hakusen.n整数値 = 0; @@ -5735,11 +5311,7 @@ namespace OpenTaiko { hakusen.dbSCROLL_Y = this.dbNowScrollY; hakusen.nコース = n現在のコース; hakusen.eScrollMode = eScrollMode; - this.listChip.Add(hakusen); - //--全ての拍線の時間を出力する-- - //Trace.WriteLine( string.Format( "|| {0,3:##0} Time:{1} Beat:{2}", this.n現在の小節数, hakusen.n発声時刻ms, measure ) ); - //-------------------------------- } #endregion @@ -5892,11 +5464,8 @@ namespace OpenTaiko { listChip_Branch[i][nNowRollCountBranch[i]].fBMSCROLLTime_end = (int)this.dbNowBMScollTime; } - //listChip[ nNowRollCount ].dbBPM = this.dbNowBPM; - //listChip[ nNowRollCount ].dbSCROLL = this.dbNowSCROLL; if (!IsEndedBranching || i == 2) nNowRoll = 0; - //continue; } if (IsEnabledFixSENote) { @@ -5992,8 +5561,6 @@ namespace OpenTaiko { Array.Resize(ref nDan_NotesCount, nDan_NotesCount.Length + 1); Array.Resize(ref nDan_BalloonCount, nDan_BalloonCount.Length + 1); - // Array.Resize(ref nDan_BallonCount, nDan_BallonCount.Length + 1); - if (IsEndedBranching) { this.listChip_Branch[i].Add(chip); if (i == 0) @@ -6078,19 +5645,7 @@ namespace OpenTaiko { this.nScoreDiff[this.n参照中の難易度] = value; this.b配点が指定されている[1, this.n参照中の難易度] = true; }); - } - - //if( this.nScoreModeTmp == 99 ) //2017.01.28 DD SCOREMODEを入力していない場合のみConfigで設定したモードにする - //{ - // this.nScoreModeTmp = CDTXMania.ConfigIni.nScoreMode; - //} - //if( CDTXMania.ConfigIni.nScoreMode == 3 && !this.b配点が指定されている[ 2, this.n参照中の難易度 ] ){ //2017.06.04 kairera0467 - // this.nScoreModeTmp = 3; - //} - - - - else if (strCommandName.Equals("SCOREMODE")) { + } else if (strCommandName.Equals("SCOREMODE")) { if (!string.IsNullOrEmpty(strCommandParam)) { this.nScoreModeTmp = Convert.ToInt16(strCommandParam); } @@ -6647,7 +6202,7 @@ namespace OpenTaiko { } } if (this.nScoreModeTmp == 99) { - //2017.01.28 DD + //2017.01.28 DD this.nScoreModeTmp = OpenTaiko.ConfigIni.nScoreMode; } } @@ -6755,34 +6310,9 @@ namespace OpenTaiko { /// 複素数のパースもどき /// private void tParsedComplexNumber(string strScroll, ref double[] dbScroll) { - /* - bool bFirst = true; //最初の数値か - bool bUse = false; //数値扱い中 - string[] arScroll = new string[2]; - char[] c = strScroll.ToCharArray(); - //1.0-1.0i - for (int i = 0; i < strScroll.Length; i++) - { - if (bFirst) - arScroll[0] += c[i]; - else - arScroll[1] += c[i]; - - //次の文字が'i'なら脱出。 - if (c[i + 1] == 'i') - break; - else if (c[i + 1] == '-' || c[i + 1] == '+') - bFirst = false; - - } - dbScroll[0] = Convert.ToDouble(arScroll[0]); - dbScroll[1] = Convert.ToDouble(arScroll[1]); - */ - var cpx = strScroll.ParseComplex(); dbScroll[0] = cpx[0]; dbScroll[1] = cpx[1]; - return; } private void tSetSenotes() { @@ -6804,7 +6334,6 @@ namespace OpenTaiko { //逆にしてしまうと計算がとてつもないことになるので注意。 try { - //this.tSenotes_Core( list音符のみのリスト ); this.tSenotes_Core_V2(list音符のみのリスト, true); } catch (Exception ex) { Trace.TraceError(ex.ToString()); @@ -6863,7 +6392,6 @@ namespace OpenTaiko { break; } - //this.tSenotes_Core( list音符のみのリスト ); this.tSenotes_Core_V2(list音符のみのリスト, true); } @@ -7073,25 +6601,9 @@ namespace OpenTaiko { } } #endregion - #region [ BGMチップならば即ミキサーに追加 ] - //if ( pChip.nチャンネル番号 == 0x01 ) // BGMチップは即ミキサーに追加 - //{ - // if ( listWAV.ContainsKey( pChip.n整数値_内部番号 ) ) - // { - // CDTX.CWAV wc = CDTXMania.DTX.listWAV[ pChip.n整数値_内部番号 ]; - // if ( wc.rSound[ 0 ] != null ) - // { - // CDTXMania.Sound管理.AddMixer( wc.rSound[ 0 ] ); // BGMは多重再生しない仕様としているので、1個目だけミキサーに登録すればよい - // } - // } - //} - #endregion #region [ 発音1秒前のタイミングを算出 ] int nAddMixer時刻ms, nAddMixer位置 = 0; - //Debug.WriteLine("=================================================================="); - //Debug.WriteLine( "Start: ch=" + pChip.nチャンネル番号.ToString("x2") + ", nWAV番号=" + pChip.n整数値 + ", time=" + pChip.n発声時刻ms + ", lasttime=" + listChip[ listChip.Count - 1 ].n発声時刻ms ); t発声時刻msと発声位置を取得する(pChip.n発声時刻ms - n発音前余裕ms, out nAddMixer時刻ms, out nAddMixer位置); - //Debug.WriteLine( "nAddMixer時刻ms=" + nAddMixer時刻ms + ",nAddMixer位置=" + nAddMixer位置 ); CChip c_AddMixer = new CChip() { nチャンネル番号 = 0xDA, @@ -7102,8 +6614,6 @@ namespace OpenTaiko { b演奏終了後も再生が続くチップである = false }; listAddMixerChannel.Add(c_AddMixer); - //Debug.WriteLine("listAddMixerChannel:" ); - //DebugOut_CChipList( listAddMixerChannel ); #endregion int duration = 0; @@ -7111,40 +6621,26 @@ namespace OpenTaiko { double _db再生速度 = (OpenTaiko.DTXVmode.Enabled) ? this.dbDTXVPlaySpeed : this.db再生速度; duration = (wc.rSound[0] == null) ? 0 : (int)(wc.rSound[0].TotalPlayTime / _db再生速度); // #23664 durationに再生速度が加味されておらず、低速再生でBGMが途切れる問題を修正 (発声時刻msは、DTX読み込み時に再生速度加味済) } - //Debug.WriteLine("duration=" + duration ); int n新RemoveMixer時刻ms, n新RemoveMixer位置; t発声時刻msと発声位置を取得する(pChip.n発声時刻ms + duration + n発音後余裕ms, out n新RemoveMixer時刻ms, out n新RemoveMixer位置); - //Debug.WriteLine( "n新RemoveMixer時刻ms=" + n新RemoveMixer時刻ms + ",n新RemoveMixer位置=" + n新RemoveMixer位置 ); if (n新RemoveMixer時刻ms < pChip.n発声時刻ms + duration) // 曲の最後でサウンドが切れるような場合は { CChip c_AddMixer_noremove = c_AddMixer; c_AddMixer_noremove.b演奏終了後も再生が続くチップである = true; listAddMixerChannel[listAddMixerChannel.Count - 1] = c_AddMixer_noremove; - //continue; // 発声位置の計算ができないので、Mixer削除をあきらめる___のではなく - // #32248 2013.10.15 yyagi 演奏終了後も再生を続けるチップであるというフラグをpChip内に立てる break; } - #region [ 未使用コード ] - //if ( n新RemoveMixer時刻ms < pChip.n発声時刻ms + duration ) // 曲の最後でサウンドが切れるような場合 - //{ - // n新RemoveMixer時刻ms = pChip.n発声時刻ms + duration; - // // 「位置」は比例計算で求めてお茶を濁す...このやり方だと誤動作したため対応中止 - // n新RemoveMixer位置 = listChip[ listChip.Count - 1 ].n発声位置 * n新RemoveMixer時刻ms / listChip[ listChip.Count - 1 ].n発声時刻ms; - //} - #endregion #region [ 発音終了2秒後にmixerから削除するが、その前に再発音することになるのかを確認(再発音ならmixer削除タイミングを延期) ] int n整数値 = pChip.n整数値; int index = listRemoveTiming.FindIndex( delegate (CChip cchip) { return cchip.n整数値 == n整数値; } ); - //Debug.WriteLine( "index=" + index ); if (index >= 0) // 過去に同じチップで発音中のものが見つかった場合 { // 過去の発音のmixer削除を確定させるか、延期するかの2択。 int n旧RemoveMixer時刻ms = listRemoveTiming[index].n発声時刻ms; int n旧RemoveMixer位置 = listRemoveTiming[index].n発声位置; - //Debug.WriteLine( "n旧RemoveMixer時刻ms=" + n旧RemoveMixer時刻ms + ",n旧RemoveMixer位置=" + n旧RemoveMixer位置 ); if (pChip.n発声時刻ms - n発音前余裕ms <= n旧RemoveMixer時刻ms) // mixer削除前に、同じ音の再発音がある場合は、 { // mixer削除時刻を遅延させる(if-else後に行う) //Debug.WriteLine( "remove TAIL of listAddMixerChannel. TAIL INDEX=" + listAddMixerChannel.Count ); @@ -7154,7 +6650,6 @@ namespace OpenTaiko { //DebugOut_CChipList( listAddMixerChannel ); } else // 逆に、時間軸上、mixer削除後に再発音するような流れの場合は { - //Debug.WriteLine( "Publish the value(listRemoveTiming[index] to listRemoveMixerChannel." ); listRemoveMixerChannel.Add(listRemoveTiming[index]); // mixer削除を確定させる //Debug.WriteLine( "listRemoveMixerChannel:" ); //DebugOut_CChipList( listRemoveMixerChannel ); @@ -7169,10 +6664,6 @@ namespace OpenTaiko { n発声位置 = n新RemoveMixer位置 }; listRemoveTiming[index] = c; - //listRemoveTiming[ index ].n発声時刻ms = n新RemoveMixer時刻ms; // mixer削除時刻を更新(遅延)する - //listRemoveTiming[ index ].n発声位置 = n新RemoveMixer位置; - //Debug.WriteLine( "listRemoveTiming: modified" ); - //DebugOut_CChipList( listRemoveTiming ); } else // 過去に同じチップを発音していないor { // 発音していたが既にmixer削除確定していたなら CChip c = new CChip() // 新しくmixer削除候補として追加する @@ -7183,25 +6674,12 @@ namespace OpenTaiko { n発声時刻ms = n新RemoveMixer時刻ms, n発声位置 = n新RemoveMixer位置 }; - //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); - //Debug.WriteLine( "listRemoveTiming:" ); - //DebugOut_CChipList( listRemoveTiming ); } #endregion break; } } - //Debug.WriteLine("=================================================================="); - //Debug.WriteLine( "Result:" ); - //Debug.WriteLine( "listAddMixerChannel:" ); - //DebugOut_CChipList( listAddMixerChannel ); - //Debug.WriteLine( "listRemoveMixerChannel:" ); - //DebugOut_CChipList( listRemoveMixerChannel ); - //Debug.WriteLine( "listRemoveTiming:" ); - //DebugOut_CChipList( listRemoveTiming ); - //Debug.WriteLine( "==================================================================" ); listChip.AddRange(listAddMixerChannel); listChip.AddRange(listRemoveMixerChannel); @@ -7209,7 +6687,6 @@ namespace OpenTaiko { listChip.Sort(); } private void DebugOut_CChipList(List c) { - //Debug.WriteLine( "Count=" + c.Count ); for (int i = 0; i < c.Count; i++) { Debug.WriteLine(i + ": ch=" + c[i].nチャンネル番号.ToString("x2") + ", WAV番号=" + c[i].n整数値 + ", time=" + c[i].n発声時刻ms); } @@ -7221,11 +6698,6 @@ namespace OpenTaiko { if (n希望発声時刻ms < 0) { n希望発声時刻ms = 0; } - //else if ( n希望発声時刻ms > listChip[ listChip.Count - 1 ].n発声時刻ms ) // BGMの最後の余韻を殺してしまうので、この条件は外す - //{ - // n希望発声時刻ms = listChip[ listChip.Count - 1 ].n発声時刻ms; - //} - int index_min = -1, index_max = -1; for (int i = 0; i < listChip.Count; i++) // 希望発声位置前後の「前」の方のチップを検索 { @@ -7239,8 +6711,6 @@ namespace OpenTaiko { // listの最終項目の時刻をそのまま使用する //___のではダメ。BGMが尻切れになる。 // そこで、listの最終項目の発声時刻msと発生位置から、希望発声時刻に相当する希望発声位置を比例計算して求める。 - //n新発声時刻ms = n希望発声時刻ms; - //n新発声位置 = listChip[ listChip.Count - 1 ].n発声位置 * n希望発声時刻ms / listChip[ listChip.Count - 1 ].n発声時刻ms; n新発声時刻ms = listChip[listChip.Count - 1].n発声時刻ms; n新発声位置 = listChip[listChip.Count - 1].n発声位置; return false; diff --git a/OpenTaiko/src/Songs/CScoreIni_Importer.cs b/OpenTaiko/src/Songs/CScoreIni_Importer.cs index 35c87736..fdb60a69 100644 --- a/OpenTaiko/src/Songs/CScoreIni_Importer.cs +++ b/OpenTaiko/src/Songs/CScoreIni_Importer.cs @@ -241,8 +241,7 @@ namespace OpenTaiko { } catch (Exception ex) { Trace.TraceWarning($"Failed to import {_score} into new database. More details:\n{ex}"); errorcount++; - } - finally { totalcount++; } + } finally { totalcount++; } } Trace.TraceInformation($"Imported {successcount} of {_scoreFiles.Count} scores from score.ini files. ({errorcount} failed imports; {skipcount} skipped imports;)"); Status = ""; diff --git a/OpenTaiko/src/Songs/CSong管理.cs b/OpenTaiko/src/Songs/CSong管理.cs index f16223ec..ef0cd487 100644 --- a/OpenTaiko/src/Songs/CSong管理.cs +++ b/OpenTaiko/src/Songs/CSong管理.cs @@ -8,16 +8,6 @@ namespace OpenTaiko { internal class CSongs管理 { // プロパティ - /*public int nSongsDBから取得できたスコア数 - { - get; - set; - } - public int nSongsDBへ出力できたスコア数 - { - get; - set; - }*/ public int nスコアキャッシュから反映できたスコア数 { get; set; @@ -51,17 +41,6 @@ namespace OpenTaiko { } [NonSerialized] public AutoResetEvent AutoReset; - /*public AutoResetEvent AutoReset - { - get - { - return autoReset; - } - private set - { - autoReset = value; - } - }*/ private int searchCount; // #PREMOVIE中は検索n回実行したら少しスリープする @@ -110,18 +89,6 @@ namespace OpenTaiko { if (flatten.Count > 0) { int index = list曲ルート.IndexOf(flatten[0]); - - /* - if (!list曲ルート.Contains(downloadBox)) - { - for (int i = 0; i < flatten.Count; i++) - { - this.list曲ルート.Remove(flatten[i]); - } - list曲ルート.Insert(index, downloadBox); - } - */ - if (!list曲ルート.Contains(downloadBox)) { this.list曲ルート = this.list曲ルート.Except(flatten).ToList(); list曲ルート.Insert(index, downloadBox); @@ -221,25 +188,7 @@ namespace OpenTaiko { } c曲リストノード.nTotalFloor++; - - /* - switch (c曲リストノード.strジャンル) - { - case "J-POP": - c曲リストノード.strジャンル = "ポップス"; - break; - case "ゲームミュージック": - c曲リストノード.strジャンル = "ゲームバラエティ"; - break; - case "どうよう": - c曲リストノード.strジャンル = "キッズ"; - break; - } - */ - c曲リストノード.str本当のジャンル = c曲リストノード.strジャンル; - - c曲リストノード.arスコア[n] = new Cスコア(); c曲リストノード.arスコア[n].ファイル情報.ファイルの絶対パス = str基点フォルダ + fileinfo.Name; c曲リストノード.arスコア[n].ファイル情報.フォルダの絶対パス = str基点フォルダ; @@ -277,15 +226,6 @@ namespace OpenTaiko { if ((strExt.Equals(".tja") || strExt.Equals(".dtx"))) { // 2017.06.02 kairera0467 廃止。 - //if( strExt.Equals( ".tja" ) ) - //{ - // //tja、dtxが両方存在していた場合、tjaを読み込まずにdtxだけ使う。 - // string[] dtxscoreini = Directory.GetFiles( str基点フォルダ, "*.dtx"); - // if(dtxscoreini.Length != 0 ) - // { - // continue; - // } - //} #region[ 新処理 ] @@ -489,31 +429,6 @@ namespace OpenTaiko { this.n検索された曲ノード数++; b = true; } - - if (OpenTaiko.ConfigIni.bLog曲検索ログ出力) { - // Trace.Indent(); - // try - // { - // 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 ) ); - // } - // else - // { - // 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() ); - // } - // finally - // { - // Trace.Unindent(); - // } - } } } } @@ -750,7 +665,6 @@ namespace OpenTaiko { this.nファイルから反映できたスコア数++; cdtx.DeActivate(); - //Debug.WriteLine( "★" + this.nファイルから反映できたスコア数 + " " + c曲リストノード.arスコア[ i ].譜面情報.タイトル ); #region [ 曲検索ログ出力 ] //----------------- if (OpenTaiko.ConfigIni.bLog曲検索ログ出力) { @@ -801,44 +715,6 @@ namespace OpenTaiko { } } - // Removed the pre-made recently played songs folder, so players will have total control on it's shape and visuals - - /* - #region [ "最近遊んだ曲"BOXを生成する ] - - if(list曲ルート.Count > 0) - { - C曲リストノード crecentryplaysong = new C曲リストノード(); - crecentryplaysong.eノード種別 = C曲リストノード.Eノード種別.BOX; - - // 最近あそんだ曲 - crecentryplaysong.strタイトル = CLangManager.LangInstance.GetString(201); - - crecentryplaysong.strBoxText[0] = ""; - crecentryplaysong.strBoxText[1] = CLangManager.LangInstance.GetString(202); - crecentryplaysong.strBoxText[2] = ""; - - crecentryplaysong.strジャンル = "最近遊んだ曲"; - crecentryplaysong.nスコア数 = 1; - crecentryplaysong.list子リスト = new List(); - crecentryplaysong.BackColor = ColorTranslator.FromHtml("#164748"); - crecentryplaysong.BoxColor = Color.White; - crecentryplaysong.BgColor = Color.White; - - crecentryplaysong.arスコア[0] = new Cスコア(); - crecentryplaysong.arスコア[0].ファイル情報.フォルダの絶対パス = ""; - crecentryplaysong.arスコア[0].譜面情報.タイトル = crecentryplaysong.strタイトル; - crecentryplaysong.arスコア[0].譜面情報.コメント = - (CultureInfo.CurrentCulture.TwoLetterISOLanguageName == "ja") ? - "最近遊んだ曲" : - "Recentry play songs"; - - list曲ルート.Add(crecentryplaysong); - } - - #endregion - */ - this.t曲リストへ後処理を適用する(this.list曲ルート); for (int p = 0; p < list曲ルート.Count; p++) { @@ -852,16 +728,6 @@ namespace OpenTaiko { // Add to dojo list曲ルート_Dan = c曲リストノード.list子リスト; - /* - for (int i = 0; i < c曲リストノード.list子リスト.Count; i++) - { - if(c曲リストノード.list子リスト[i].eノード種別 == C曲リストノード.Eノード種別.SCORE) - { - list曲ルート_Dan.Add(c曲リストノード.list子リスト[i]); - continue; - } - } - */ } else if (c曲リストノード.strジャンル == "太鼓タワー") { if (OpenTaiko.ConfigIni.bDanTowerHide) { list曲ルート.Remove(c曲リストノード); @@ -884,22 +750,10 @@ namespace OpenTaiko { if (OpenTaiko.ConfigIni.bDanTowerHide) c曲リストノード.list子リスト.Remove(c曲リストノード.list子リスト[i]); - continue; } } } - } else { - // ??????? - - /* - if (c曲リストノード.arスコア[5] != null) - { - c曲リストノード.list子リスト.Remove(c曲リストノード); - list曲ルート_Dan.Add(c曲リストノード); - continue; - } - */ } } @@ -928,7 +782,6 @@ namespace OpenTaiko { } - // Don't sort songs if the folder isn't global // Call back reinsert back folders if sort called ? if (isGlobal) { @@ -1004,142 +857,6 @@ namespace OpenTaiko { //----------------- #endregion - // Songs DB here - - /*#region [ スコアキャッシュを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曲ルート ); - bw.Close(); - } - catch (Exception e) - { - Trace.TraceError( "songs.dbの出力に失敗しました。" ); - Trace.TraceError( e.ToString() ); - Trace.TraceError( "例外が発生しましたが処理を継続します。 (ca70d133-f092-4351-8ebd-0906d8f1cffa)" ); - } - } - private void tSongsDBにノードを1つ出力する( BinaryWriter bw, C曲リストノード node ) - { - for( int i = 0; i < (int)Difficulty.Total; i++ ) - { - // ここではsuspendに応じないようにしておく(深い意味はない。ファイルの書き込みオープン状態を長時間維持したくないだけ) - //if ( this.bIsSuspending ) // #27060 中断要求があったら、解除要求が来るまで待機 - //{ - // autoReset.WaitOne(); - //} - - 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].譜面情報.演奏履歴.行6); - bw.Write(node.arスコア[i].譜面情報.演奏履歴.行7); - 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 ].譜面情報.strBGMファイル名 ); - bw.Write( node.arスコア[ i ].譜面情報.SongVol ); - var songLoudnessMetadata = node.arスコア[ i ].譜面情報.SongLoudnessMetadata; - bw.Write( songLoudnessMetadata.HasValue ); - bw.Write( songLoudnessMetadata?.Integrated.ToDouble() ?? 0.0 ); - bw.Write( songLoudnessMetadata?.TruePeak.HasValue ?? false ); - bw.Write( songLoudnessMetadata?.TruePeak?.ToDouble() ?? 0.0 ); - bw.Write( node.arスコア[ i ].譜面情報.nデモBGMオフセット ); - bw.Write( node.arスコア[ i ].譜面情報.b譜面分岐[0] ); - bw.Write( node.arスコア[ i ].譜面情報.b譜面分岐[1] ); - bw.Write( node.arスコア[ i ].譜面情報.b譜面分岐[2] ); - bw.Write( node.arスコア[ i ].譜面情報.b譜面分岐[3] ); - bw.Write( node.arスコア[ i ].譜面情報.b譜面分岐[4] ); - bw.Write(node.arスコア[i].譜面情報.b譜面分岐[5]); - bw.Write( node.arスコア[ i ].譜面情報.b譜面分岐[6] ); - bw.Write( node.arスコア[ i ].譜面情報.ハイスコア ); - bw.Write( node.arスコア[ i ].譜面情報.nハイスコア[0] ); - bw.Write( node.arスコア[ i ].譜面情報.nハイスコア[1] ); - bw.Write( node.arスコア[ i ].譜面情報.nハイスコア[2] ); - bw.Write( node.arスコア[ i ].譜面情報.nハイスコア[3] ); - bw.Write( node.arスコア[ i ].譜面情報.nハイスコア[4] ); - bw.Write(node.arスコア[i].譜面情報.nハイスコア[5]); - bw.Write(node.arスコア[i].譜面情報.nハイスコア[6]); - bw.Write( node.arスコア[ i ].譜面情報.strサブタイトル ); - bw.Write( node.arスコア[ i ].譜面情報.nレベル[0] ); - bw.Write( node.arスコア[ i ].譜面情報.nレベル[1] ); - bw.Write( node.arスコア[ i ].譜面情報.nレベル[2] ); - bw.Write( node.arスコア[ i ].譜面情報.nレベル[3] ); - bw.Write( node.arスコア[ i ].譜面情報.nレベル[4] ); - bw.Write(node.arスコア[i].譜面情報.nレベル[5]); - bw.Write(node.arスコア[i].譜面情報.nレベル[6]); - bw.Write(node.arスコア[i].譜面情報.nクリア[0]); - bw.Write(node.arスコア[i].譜面情報.nクリア[1]); - bw.Write(node.arスコア[i].譜面情報.nクリア[2]); - bw.Write(node.arスコア[i].譜面情報.nクリア[3]); - bw.Write(node.arスコア[i].譜面情報.nクリア[4]); - bw.Write(node.arスコア[i].譜面情報.nスコアランク[0]); - bw.Write(node.arスコア[i].譜面情報.nスコアランク[1]); - bw.Write(node.arスコア[i].譜面情報.nスコアランク[2]); - bw.Write(node.arスコア[i].譜面情報.nスコアランク[3]); - bw.Write(node.arスコア[i].譜面情報.nスコアランク[4]); - this.nSongsDBへ出力できたスコア数++; - } - } - } - private void tSongsDBにリストを1つ出力する( BinaryWriter bw, List list ) - { - foreach( C曲リストノード c曲リストノード in list ) - { - if( ( c曲リストノード.eノード種別 == C曲リストノード.Eノード種別.SCORE ) - || ( c曲リストノード.eノード種別 == C曲リストノード.Eノード種別.SCORE_MIDI ) ) - { - this.tSongsDBにノードを1つ出力する( bw, c曲リストノード ); - } - if( c曲リストノード.list子リスト != null ) - { - this.tSongsDBにリストを1つ出力する( bw, c曲リストノード.list子リスト ); - } - } - } - //----------------- - #endregion*/ - #region [ 曲リストソート ] //----------------- @@ -1274,7 +991,6 @@ Debug.WriteLine( dBPM + ":" + c曲リストノード.strタイトル ); #region [ private ] //----------------- - //private const string SONGSDB_VERSION = "SongsDB5"; public List listStrBoxDefSkinSubfolderFullName { get; private set; diff --git a/OpenTaiko/src/Songs/Cスコア.cs b/OpenTaiko/src/Songs/Cスコア.cs index 442b6277..80be7737 100644 --- a/OpenTaiko/src/Songs/Cスコア.cs +++ b/OpenTaiko/src/Songs/Cスコア.cs @@ -256,13 +256,7 @@ namespace OpenTaiko { this.譜面情報.nLevelIcon = new CDTX.ELevelIcon[(int)Difficulty.Total] { CDTX.ELevelIcon.eNone, CDTX.ELevelIcon.eNone, CDTX.ELevelIcon.eNone, CDTX.ELevelIcon.eNone, CDTX.ELevelIcon.eNone, CDTX.ELevelIcon.eNone, CDTX.ELevelIcon.eNone }; this.譜面情報.nクリア = new int[5]; this.譜面情報.nスコアランク = new int[5]; - this.譜面情報.nExamResult = new List { }; - //for (int i = 0; i < TJAPlayer3.stage選曲.r確定された曲.DanSongs.Count; i++) - //{ - // 譜面情報.nExamResult.Add(new int[CExamInfo.cMaxExam]); - //} - this.譜面情報.nLife = 5; this.譜面情報.nTotalFloor = 140; } diff --git a/OpenTaiko/src/Songs/VTTParser.cs b/OpenTaiko/src/Songs/VTTParser.cs index faea538f..5f98531c 100644 --- a/OpenTaiko/src/Songs/VTTParser.cs +++ b/OpenTaiko/src/Songs/VTTParser.cs @@ -8,12 +8,7 @@ using static OpenTaiko.CDTX; namespace OpenTaiko { public class VTTParser : IDisposable { - /* - - TO-DO : - - timestamp tag support - - */ + // TODO : timestamp tag support [Flags] private enum ParseMode { None = 0, @@ -23,7 +18,7 @@ namespace OpenTaiko { } internal struct LyricData { - public long timestamp; // WIP, only first timestamp is accounted for + public long timestamp; // TODO: WIP, only first timestamp is accounted for public string Text; public CCachedFontRenderer.FontStyle Style; diff --git a/OpenTaiko/src/Stages/04.Config/CActConfigList.cs b/OpenTaiko/src/Stages/04.Config/CActConfigList.cs index 099ac167..fe5d0e63 100644 --- a/OpenTaiko/src/Stages/04.Config/CActConfigList.cs +++ b/OpenTaiko/src/Stages/04.Config/CActConfigList.cs @@ -71,10 +71,6 @@ namespace OpenTaiko { CLangManager.Languages); this.list項目リスト.Add(this.iSystemLanguage); - //this.iLayoutType = new CItemInteger(CLangManager.LangInstance.GetString(16), 0, (int)eLayoutType.TOTAL - 1, TJAPlayer3.ConfigIni.nLayoutType, - // CLangManager.LangInstance.GetString(17)); - //this.list項目リスト.Add(this.iLayoutType); - this.iTaikoPlayerCount = new CItemInteger(CLangManager.LangInstance.GetString("SETTINGS_SYSTEM_PLAYERCOUNT"), 1, 5, OpenTaiko.ConfigIni.nPlayerCount, CLangManager.LangInstance.GetString("SETTINGS_SYSTEM_PLAYERCOUNT_DESC")); this.list項目リスト.Add(this.iTaikoPlayerCount); @@ -83,12 +79,6 @@ namespace OpenTaiko { CLangManager.LangInstance.GetString("SETTINGS_SYSTEM_HIDEDANTOWER_DESC")); this.list項目リスト.Add(this.iDanTowerHide); - /* - this.iSystemRisky = new CItemInteger(CLangManager.LangInstance.GetString(8), 0, 10, TJAPlayer3.ConfigIni.nRisky, - CLangManager.LangInstance.GetString(9)); - this.list項目リスト.Add( this.iSystemRisky ); - */ - this.iCommonPlaySpeed = new CItemInteger(CLangManager.LangInstance.GetString("MOD_SONGSPEED"), 5, 400, OpenTaiko.ConfigIni.nSongSpeed, CLangManager.LangInstance.GetString("SETTINGS_MOD_SONGSPEED_DESC")); this.list項目リスト.Add(this.iCommonPlaySpeed); @@ -119,14 +109,6 @@ namespace OpenTaiko { CLangManager.LangInstance.GetString("SETTINGS_SYSTEM_BGMOVIE_DESC")); this.list項目リスト.Add(this.iSystemAVI); - //if (CLangManager.fetchLang() == "ja") - //{ - // this.iSystemAVIDisplayMode = new CItemList(CLangManager.LangInstance.GetString(10150), CItemList.EPanelType.Normal, (int)TJAPlayer3.ConfigIni.eClipDispType, - // CLangManager.LangInstance.GetString(10151), - // new string[] {"OFF","背景","ウィンドウ","両方"}); - // this.list項目リスト.Add( this.iSystemAVIDisplayMode ); - //} - //else this.iSystemAVIDisplayMode = new CItemList(CLangManager.LangInstance.GetString("SETTINGS_SYSTEM_BGMOVIEDISPLAY"), CItemList.EPanelType.Normal, (int)OpenTaiko.ConfigIni.eClipDispType, CLangManager.LangInstance.GetString("SETTINGS_SYSTEM_BGMOVIEDISPLAY_DESC"), new string[] { @@ -189,11 +171,6 @@ namespace OpenTaiko { CLangManager.LangInstance.GetString("SETTINGS_SYSTEM_SONGPLAYBACKBUFFER_DESC")); this.list項目リスト.Add(this.MusicPreTimeMs); - //this.iSystemStoicMode = new CItemToggle( "StoicMode", CDTXMania.ConfigIni.bストイックモード, - // "ストイック(禁欲)モード:\n以下をまとめて表示ON/OFFします。\n_プレビュー画像/動画\n_リザルト画像/動画\n_NowLoading画像\n_演奏画面の背景画像\n_BGA 画像 / AVI 動画\n_グラフ画像\n", - // "Turn ON to disable drawing\n * preview image / movie\n * result image / movie\n * nowloading image\n * wallpaper (in playing screen)\n * BGA / AVI (in playing screen)" ); - //this.list項目リスト.Add( this.iSystemStoicMode ); - this.iSystemAutoResultCapture = new CItemToggle(CLangManager.LangInstance.GetString("SETTINGS_SYSTEM_AUTOSCREENSHOT"), OpenTaiko.ConfigIni.bIsAutoResultCapture, CLangManager.LangInstance.GetString("SETTINGS_SYSTEM_AUTOSCREENSHOT_DESC")); this.list項目リスト.Add(this.iSystemAutoResultCapture); @@ -212,7 +189,6 @@ namespace OpenTaiko { // #24820 2013.1.3 yyagi - this.iSystemSoundType = new CItemList(CLangManager.LangInstance.GetString("SETTINGS_SYSTEM_AUDIOPLAYBACK"), CItemList.EPanelType.Normal, OpenTaiko.ConfigIni.nSoundDeviceType, CLangManager.LangInstance.GetString("SETTINGS_SYSTEM_AUDIOPLAYBACK_DESC"), new string[] { "Bass", "ASIO", "WASAPI Exclusive", "WASAPI Shared" }); @@ -239,7 +215,6 @@ namespace OpenTaiko { CLangManager.LangInstance.GetString("SETTINGS_SYSTEM_OSTIMER_DESC")); this.list項目リスト.Add(this.iSystemSoundTimerType); - ShowChara = new CItemToggle(CLangManager.LangInstance.GetString("SETTINGS_SYSTEM_DISPLAYCHARA"), OpenTaiko.ConfigIni.ShowChara, CLangManager.LangInstance.GetString("SETTINGS_SYSTEM_DISPLAYCHARA_DESC")); this.list項目リスト.Add(ShowChara); @@ -276,17 +251,11 @@ namespace OpenTaiko { CLangManager.LangInstance.GetString("SETTINGS_SYSTEM_TEXTUREASYNC_DESC")); this.list項目リスト.Add(ASyncTextureLoad); - - this.iSystemSkinSubfolder = new CItemList(CLangManager.LangInstance.GetString("SETTINGS_SYSTEM_SKIN"), CItemBase.EPanelType.Normal, nSkinIndex, CLangManager.LangInstance.GetString("SETTINGS_SYSTEM_SKIN_DESC"), - //"CONFIGURATIONを抜けると、設定した\n" + - //"スキンに変更されます。", skinNames); this.list項目リスト.Add(this.iSystemSkinSubfolder); - - this.iSystemGoToKeyAssign = new CItemBase(CLangManager.LangInstance.GetString("SETTINGS_KEYASSIGN_SYSTEM"), CItemBase.EPanelType.Normal, CLangManager.LangInstance.GetString("SETTINGS_KEYASSIGN_SYSTEM_DESC")); this.list項目リスト.Add(this.iSystemGoToKeyAssign); @@ -301,7 +270,7 @@ namespace OpenTaiko { #endregion - // Gameplay options + // Gameplay options #region [ t項目リストの設定_Drums() ] public void t項目リストの設定_Drums() { @@ -342,20 +311,10 @@ namespace OpenTaiko { CLangManager.LangInstance.GetString("SETTINGS_GAME_COMBODISPLAY_DESC")); this.list項目リスト.Add(this.iSystemMinComboDrums); - - // #23580 2011.1.3 yyagi - - /* - this.iInputAdjustTimeMs = new CItemInteger(CLangManager.LangInstance.GetString(78), -9999, 9999, TJAPlayer3.ConfigIni.nInputAdjustTimeMs, - CLangManager.LangInstance.GetString(79)); - this.list項目リスト.Add( this.iInputAdjustTimeMs ); - */ - this.iGlobalOffsetMs = new CItemInteger(CLangManager.LangInstance.GetString("SETTINGS_GAME_GLOBALOFFSET"), -9999, 9999, OpenTaiko.ConfigIni.nGlobalOffsetMs, CLangManager.LangInstance.GetString("SETTINGS_GAME_GLOBALOFFSET_DESC")); this.list項目リスト.Add(this.iGlobalOffsetMs); - this.iTaikoDefaultCourse = new CItemList(CLangManager.LangInstance.GetString("SETTINGS_GAME_DEFAULTDIFF"), CItemBase.EPanelType.Normal, OpenTaiko.ConfigIni.nDefaultCourse, CLangManager.LangInstance.GetString("SETTINGS_GAME_DEFAULTDIFF_DESC"), new string[] { @@ -376,7 +335,7 @@ namespace OpenTaiko { CLangManager.LangInstance.GetString("SETTINGS_GAME_SHINUCHI_DESC")); this.list項目リスト.Add(this.ShinuchiMode); - // This does nothing vvv + // FIXME: This does nothing vvv this.iTaikoBranchGuide = new CItemToggle(CLangManager.LangInstance.GetString("SETTINGS_GAME_BRANCHGUIDE"), OpenTaiko.ConfigIni.bBranchGuide, CLangManager.LangInstance.GetString("SETTINGS_GAME_BRANCHGUIDE_DESC")); this.list項目リスト.Add(this.iTaikoBranchGuide); @@ -458,9 +417,6 @@ namespace OpenTaiko { this.b要素値にフォーカス中 = false; } else if (this.list項目リスト[this.n現在の選択項目].e種別 == CItemBase.E種別.整数) { this.b要素値にフォーカス中 = true; - } else if (this.b現在選択されている項目はReturnToMenuである) { - //this.tConfigIniへ記録する(); - //CONFIG中にスキン変化が発生すると面倒なので、一旦マスクした。 } #region [ 個々のキーアサイン ] //太鼓のキー設定。 @@ -606,14 +562,6 @@ namespace OpenTaiko { #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 ) ) ) - //{ - // // 変更禁止(何もしない) - //} - //else - //{ - // // 変更許可 this.list項目リスト[this.n現在の選択項目].tEnter押下(); if (this.list項目リスト[this.n現在の選択項目] == this.iSystemLanguage) { @@ -633,9 +581,6 @@ namespace OpenTaiko { t項目リストの設定_System(refresh: false); OpenTaiko.stageコンフィグ.ReloadMenus(); } - //} - - // Enter押下後の後処理 if (this.list項目リスト[this.n現在の選択項目] == this.iSystemFullscreen) { @@ -686,13 +631,10 @@ namespace OpenTaiko { OpenTaiko.EnumSongs.ChangeEnumeratePriority(ThreadPriority.Normal); OpenTaiko.actEnumSongs.bコマンドでの曲データ取得 = true; OpenTaiko.actEnumSongs.Activate(); - // TJAPlayer3.stage選曲.Refresh(TJAPlayer3.EnumSongs.Songs管理, true); - OpenTaiko.stageSongSelect.actSongList.ResetSongIndex(); } else if (this.list項目リスト[this.n現在の選択項目] == this.iSystemHardReloadDTX) // #32081 2013.10.21 yyagi { if (OpenTaiko.EnumSongs.IsEnumerating) { - // Debug.WriteLine( "バックグラウンドでEnumeratingSongs中だったので、一旦中断します。" ); OpenTaiko.EnumSongs.Abort(); OpenTaiko.actEnumSongs.DeActivate(); } @@ -701,8 +643,6 @@ namespace OpenTaiko { OpenTaiko.EnumSongs.ChangeEnumeratePriority(ThreadPriority.Normal); OpenTaiko.actEnumSongs.bコマンドでの曲データ取得 = true; OpenTaiko.actEnumSongs.Activate(); - // TJAPlayer3.stage選曲.Refresh(TJAPlayer3.EnumSongs.Songs管理, true); - OpenTaiko.stageSongSelect.actSongList.ResetSongIndex(); } else if (this.list項目リスト[this.n現在の選択項目] == this.isSystemImportingScore) { // Running in a separate thread so the game doesn't freeze @@ -721,8 +661,8 @@ namespace OpenTaiko { path = System.IO.Path.Combine(path, @$"Graphics{Path.DirectorySeparatorChar}1_Title{Path.DirectorySeparatorChar}Background.png"); SKBitmap bmSrc = SKBitmap.Decode(path); - int _w = OpenTaiko.Skin.Resolution[0] / 4;// bmSrc.Width / 4; - int _h = OpenTaiko.Skin.Resolution[1] / 4;// bmSrc.Height / 4; + int _w = OpenTaiko.Skin.Resolution[0] / 4; + int _h = OpenTaiko.Skin.Resolution[1] / 4; if (txSkinSample1 != null) { OpenTaiko.tDisposeSafely(ref txSkinSample1); @@ -742,9 +682,7 @@ namespace OpenTaiko { this.eメニュー種別 = Eメニュー種別.Unknown; } public void t項目リストの設定_KeyAssignSystem() { - //this.tConfigIniへ記録する(); this.list項目リスト.Clear(); - // #27029 2012.1.5 from: 説明文は最大9行→13行に変更。 this.iKeyAssignSystemReturnToMenu = new CItemBase(CLangManager.LangInstance.GetString("SETTINGS_MENU_RETURN"), CItemBase.EPanelType.Other, @@ -793,9 +731,7 @@ namespace OpenTaiko { this.eメニュー種別 = Eメニュー種別.KeyAssignSystem; } public void t項目リストの設定_KeyAssignDrums() { - // this.tConfigIniへ記録する(); this.list項目リスト.Clear(); - // #27029 2012.1.5 from: 説明文は最大9行→13行に変更。 this.iKeyAssignDrumsReturnToMenu = new CItemBase(CLangManager.LangInstance.GetString("SETTINGS_MENU_RETURN"), CItemBase.EPanelType.Other, @@ -981,7 +917,6 @@ namespace OpenTaiko { OpenTaiko.Skin.soundカーソル移動音.tPlay(); if (this.b要素値にフォーカス中) { this.list項目リスト[this.n現在の選択項目].t項目値を前へ移動(); - t要素値を上下に変更中の処理(); } else { this.n目標のスクロールカウンタ += 100; } @@ -990,18 +925,10 @@ namespace OpenTaiko { OpenTaiko.Skin.soundカーソル移動音.tPlay(); if (this.b要素値にフォーカス中) { this.list項目リスト[this.n現在の選択項目].t項目値を次へ移動(); - t要素値を上下に変更中の処理(); } else { this.n目標のスクロールカウンタ -= 100; } } - private void t要素値を上下に変更中の処理() { - //if ( this.list項目リスト[ this.n現在の選択項目 ] == this.iSystemMasterVolume ) // #33700 2014.4.26 yyagi - //{ - // CDTXMania.Sound管理.nMasterVolume = this.iSystemMasterVolume.n現在の値; - //} - } - // CActivity 実装 @@ -1033,9 +960,7 @@ namespace OpenTaiko { nSkinSampleIndex = -1; #endregion - // this.listMenu = new List(); - - this.t項目リストの設定_Drums(); // + this.t項目リストの設定_Drums(); this.t項目リストの設定_System(); // 順番として、最後にSystemを持ってくること。設定一覧の初期位置がSystemのため。 this.b要素値にフォーカス中 = false; this.n目標のスクロールカウンタ = 0; @@ -1046,9 +971,8 @@ namespace OpenTaiko { this.iSystemSoundType_initial = this.iSystemSoundType.n現在選択されている項目番号; // CONFIGに入ったときの値を保持しておく this.iSystemBassBufferSizeMs_initial = this.iSystemBassBufferSizeMs.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.Activate(); } public override void DeActivate() { @@ -1072,7 +996,6 @@ namespace OpenTaiko { if (this.iSystemSoundType_initial != this.iSystemSoundType.n現在選択されている項目番号 || this.iSystemBassBufferSizeMs_initial != this.iSystemBassBufferSizeMs.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()) { ESoundDeviceType soundDeviceType; @@ -1097,7 +1020,6 @@ namespace OpenTaiko { this.iSystemBassBufferSizeMs.n現在の値, this.iSystemWASAPIBufferSizeMs.n現在の値, 0, - // this.iSystemASIOBufferSizeMs.n現在の値, this.iSystemASIODevice.n現在選択されている項目番号, this.iSystemSoundTimerType.bON); OpenTaiko.app.ShowWindowTitleWithSoundType(); @@ -1110,21 +1032,12 @@ namespace OpenTaiko { } public override void CreateManagedResource() { this.prvFont = HPrivateFastFont.tInstantiateMainFont(OpenTaiko.Skin.Config_Font_Scale); // t項目リストの設定 の前に必要 - - //this.tx通常項目行パネル = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\4_itembox.png" ), false ); - //this.txその他項目行パネル = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\4_itembox other.png" ), false ); - //this.tx三角矢印 = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\4_triangle arrow.png" ), false ); this.txSkinSample1 = null; // スキン選択時に動的に設定するため、ここでは初期化しない base.CreateManagedResource(); } public override void ReleaseManagedResource() { prvFont.Dispose(); - OpenTaiko.tテクスチャの解放(ref this.txSkinSample1); - //CDTXMania.tテクスチャの解放( ref this.tx通常項目行パネル ); - //CDTXMania.tテクスチャの解放( ref this.txその他項目行パネル ); - //CDTXMania.tテクスチャの解放( ref this.tx三角矢印 ); - base.ReleaseManagedResource(); } private void OnListMenuの初期化() { @@ -1162,7 +1075,6 @@ namespace OpenTaiko { if (base.IsFirstDraw) { this.nスクロール用タイマ値 = (long)(SoundManager.PlayTimer.NowTime * OpenTaiko.ConfigIni.SongPlaybackSpeed); this.ct三角矢印アニメ.Start(0, 9, 50, OpenTaiko.Timer); - base.IsFirstDraw = false; } //----------------- @@ -1241,12 +1153,8 @@ namespace OpenTaiko { this.ct三角矢印アニメ.TickLoop(); //----------------- #endregion - - // 描画 - //this.ptパネルの基本座標[ 4 ].X = this.b項目リスト側にフォーカスがある ? 0x228 : 0x25a; // メニューにフォーカスがあるなら、項目リストの中央は頭を出さない。 - #region [ 計11個の項目パネルを描画する。] //----------------- int nItem = this.n現在の選択項目; @@ -1291,11 +1199,8 @@ namespace OpenTaiko { } else { using (var bmpItem = prvFont.DrawText(this.list項目リスト[nItem].str項目名, Color.White, Color.Black, null, 30)) { listMenu[nItem].txMenuItemRight = OpenTaiko.tテクスチャの生成(bmpItem); - // ctItem.t2D描画( CDTXMania.app.Device, ( x + 0x12 ) * Scale.X, ( y + 12 ) * Scale.Y - 20 ); - // CDTXMania.tテクスチャの解放( ref ctItem ); } } - //CDTXMania.stageコンフィグ.actFont.t文字列描画( x + 0x12, y + 12, this.list項目リスト[ nItem ].str項目名 ); //----------------- #endregion #region [ 現在の行の項目の要素を描画。] @@ -1306,7 +1211,6 @@ namespace OpenTaiko { case CItemBase.E種別.ONorOFFトグル: #region [ *** ] //----------------- - //CDTXMania.stageコンフィグ.actFont.t文字列描画( x + 210, y + 12, ( (CItemToggle) this.list項目リスト[ nItem ] ).bON ? "ON" : "OFF" ); strParam = ((CItemToggle)this.list項目リスト[nItem]).bON ? "ON" : "OFF"; break; //----------------- @@ -1328,7 +1232,6 @@ namespace OpenTaiko { strParam = "OFF"; break; } - //CDTXMania.stageコンフィグ.actFont.t文字列描画( x + 210, y + 12, "ON" ); break; //----------------- #endregion @@ -1338,17 +1241,9 @@ namespace OpenTaiko { //----------------- if (this.list項目リスト[nItem] == this.iCommonPlaySpeed) { double d = ((double)((CItemInteger)this.list項目リスト[nItem]).n現在の値) / 20.0; - //CDTXMania.stageコンフィグ.actFont.t文字列描画( x + 210, y + 12, d.ToString( "0.000" ), ( n行番号 == 0 ) && this.b要素値にフォーカス中 ); strParam = d.ToString("0.000"); } - /*else if ( this.list項目リスト[ nItem ] == this.iDrumsScrollSpeed) - { - float f = ( ( (CItemInteger) this.list項目リスト[ nItem ] ).n現在の値 + 1 ) / 10f; - //CDTXMania.stageコンフィグ.actFont.t文字列描画( x + 210, y + 12, f.ToString( "x0.0" ), ( n行番号 == 0 ) && this.b要素値にフォーカス中 ); - strParam = f.ToString( "x0.0" ); - }*/ else { - //CDTXMania.stageコンフィグ.actFont.t文字列描画( x + 210, y + 12, ( (CItemInteger) this.list項目リスト[ nItem ] ).n現在の値.ToString(), ( n行番号 == 0 ) && this.b要素値にフォーカス中 ); strParam = ((CItemInteger)this.list項目リスト[nItem]).n現在の値.ToString(); } b強調 = centerFlag && this.b要素値にフォーカス中; @@ -1361,7 +1256,6 @@ namespace OpenTaiko { //----------------- { CItemList list = (CItemList)this.list項目リスト[nItem]; - //CDTXMania.stageコンフィグ.actFont.t文字列描画( x + 210, y + 12, list.list項目値[ list.n現在選択されている項目番号 ] ); strParam = list.list項目値[list.n現在選択されている項目番号]; #region [ 必要な場合に、Skinのサンプルを生成・描画する。#28195 2012.5.2 yyagi ] @@ -1579,13 +1473,11 @@ namespace OpenTaiko { private CItemInteger iSystemBassBufferSizeMs; // #24820 2013.1.15 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 int iSystemSoundType_initial; private int iSystemBassBufferSizeMs_initial; private int iSystemWASAPIBufferSizeMs_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 @@ -1597,21 +1489,8 @@ namespace OpenTaiko { private int n現在のスクロールカウンタ; private int n目標のスクロールカウンタ; - /* - private Point[] ptパネルの基本座標 = new Point[] { - new Point(0x25a, 4), new Point(0x25a, 0x4f), new Point(0x25a, 0x9a), new Point(0x25a, 0xe5), - new Point(0x228, 0x130), - new Point(0x25a, 0x17b), new Point(0x25a, 0x1c6), new Point(0x25a, 0x211), new Point(0x25a, 0x25c), new Point(0x25a, 0x2a7) }; - */ - - //private CTexture txその他項目行パネル; - //private CTexture tx三角矢印; - //private CTexture tx通常項目行パネル; - private CCachedFontRenderer prvFont; - //private List list項目リスト_str最終描画名; private struct stMenuItemRight { - // public string strMenuItem; public CTexture txMenuItemRight; public int nParam; public string strParam; @@ -1620,11 +1499,11 @@ namespace OpenTaiko { private stMenuItemRight[] listMenu; private CTexture txSkinSample1; // #28195 2012.5.2 yyagi - private string[] skinSubFolders; // - private string[] skinNames; // - private string skinSubFolder_org; // - private int nSkinSampleIndex; // - private int nSkinIndex; // + private string[] skinSubFolders; + private string[] skinNames; + private string skinSubFolder_org; + private int nSkinSampleIndex; + private int nSkinIndex; private CItemBase iDrumsGoToCalibration; private CItemBase iDrumsGoToKeyAssign; @@ -1679,13 +1558,10 @@ namespace OpenTaiko { private CItemBase iSystemReloadDTX; // #32081 2013.10.21 yyagi private CItemBase iSystemHardReloadDTX; private CItemBase isSystemImportingScore; - //private CItemInteger iSystemMasterVolume; // #33700 2014.4.26 yyagi public Thread ScoreIniImportThread { get; private set; } - public bool ScoreIniImportThreadIsActive - { - get - { + public bool ScoreIniImportThreadIsActive { + get { if (ScoreIniImportThread == null) return false; return ScoreIniImportThread.IsAlive; } @@ -1721,7 +1597,6 @@ namespace OpenTaiko { OpenTaiko.ConfigIni.bFullScreen = this.iSystemFullscreen.bON; OpenTaiko.ConfigIni.bIncludeSubfoldersOnRandomSelect = this.iSystemRandomFromSubBox.bON; - //CDTXMania.ConfigIni.bWave再生位置自動調整機能有効 = this.iSystemAdjustWaves.bON; OpenTaiko.ConfigIni.bEnableVSync = this.iSystemVSyncWait.bON; OpenTaiko.ConfigIni.bBufferedInputs = this.iSystemBufferedInput.bON; OpenTaiko.ConfigIni.bEnableAVI = this.iSystemAVI.bON; @@ -1732,11 +1607,8 @@ namespace OpenTaiko { OpenTaiko.ConfigIni.bDisplayDebugInfo = this.iSystemDebugInfo.bON; OpenTaiko.ConfigIni.n背景の透過度 = this.iSystemBGAlpha.n現在の値; OpenTaiko.ConfigIni.bBGM音を発声する = this.iSystemBGMSound.bON; - OpenTaiko.ConfigIni.bDanTowerHide = this.iDanTowerHide.bON; - // TJAPlayer3.ConfigIni.ApplyLoudnessMetadata = this.iSystemApplyLoudnessMetadata.bON; - // TJAPlayer3.ConfigIni.TargetLoudness = this.iSystemTargetLoudness.n現在の値 / 10.0; OpenTaiko.ConfigIni.ApplySongVol = this.iSystemApplySongVol.bON; OpenTaiko.ConfigIni.SoundEffectLevel = this.iSystemSoundEffectLevel.n現在の値; OpenTaiko.ConfigIni.VoiceLevel = this.iSystemVoiceLevel.n現在の値; @@ -1746,9 +1618,6 @@ namespace OpenTaiko { OpenTaiko.ConfigIni.MusicPreTimeMs = this.MusicPreTimeMs.n現在の値; OpenTaiko.ConfigIni.bOutputLogs = this.iLogOutputLog.bON; - //CDTXMania.ConfigIni.bストイックモード = this.iSystemStoicMode.bON; - - //CDTXMania.ConfigIni.nShowLagType = this.iSystemShowLag.n現在選択されている項目番号; // #25370 2011.6.3 yyagi OpenTaiko.ConfigIni.bIsAutoResultCapture = this.iSystemAutoResultCapture.bON; // #25399 2011.6.9 yyagi OpenTaiko.ConfigIni.SendDiscordPlayingInformation = this.SendDiscordPlayingInformation.bON; @@ -1769,14 +1638,6 @@ namespace OpenTaiko { OpenTaiko.ConfigIni.sLang = CLangManager.intToLang(this.iSystemLanguage.n現在選択されている項目番号); CLangManager.langAttach(OpenTaiko.ConfigIni.sLang); - - - //Trace.TraceInformation( "saved" ); - //Trace.TraceInformation( "Skin現在Current : " + CDTXMania.Skin.GetCurrentSkinSubfolderFullName(true) ); - //Trace.TraceInformation( "Skin現在System : " + CSkin.strSystemSkinSubfolderFullName ); - //Trace.TraceInformation( "Skin現在BoxDef : " + CSkin.strBoxDefSkinSubfolderFullName ); - //CDTXMania.ConfigIni.nMasterVolume = this.iSystemMasterVolume.n現在の値; // #33700 2014.4.26 yyagi - //CDTXMania.ConfigIni.e判定表示優先度 = (E判定表示優先度) this.iSystemJudgeDispPriority.n現在選択されている項目番号; OpenTaiko.ConfigIni.ShowChara = this.ShowChara.bON; OpenTaiko.ConfigIni.ShowDancer = this.ShowDancer.bON; OpenTaiko.ConfigIni.ShowRunner = this.ShowRunner.bON; @@ -1785,47 +1646,31 @@ namespace OpenTaiko { OpenTaiko.ConfigIni.ShowPuchiChara = this.ShowPuchiChara.bON; OpenTaiko.ConfigIni.nPlayerCount = this.iTaikoPlayerCount.n現在の値; - - //TJAPlayer3.ConfigIni.nLayoutType = this.iLayoutType.n現在の値; OpenTaiko.ConfigIni.FastRender = this.FastRender.bON; OpenTaiko.ConfigIni.ASyncTextureLoad = this.ASyncTextureLoad.bON; OpenTaiko.ConfigIni.SimpleMode = this.SimpleMode.bON; } private void tConfigIniへ記録する_Drums() { - //TJAPlayer3.ConfigIni.b太鼓パートAutoPlay = this.iTaikoAutoPlay.bON; - //TJAPlayer3.ConfigIni.b太鼓パートAutoPlay2P = this.iTaikoAutoPlay2P.bON; - //TJAPlayer3.ConfigIni.bAuto先生の連打 = this.iTaikoAutoRoll.bON; OpenTaiko.ConfigIni.nRollsPerSec = this.iRollsPerSec.n現在の値; OpenTaiko.ConfigIni.nDefaultAILevel = this.iAILevel.n現在の値; for (int i = 0; i < 2; i++) OpenTaiko.NamePlate.tNamePlateRefreshTitles(i); - //TJAPlayer3.ConfigIni.nScrollSpeed[TJAPlayer3.SaveFile] = this.iDrumsScrollSpeed.n現在の値; - OpenTaiko.ConfigIni.bTight = this.iDrumsTight.bON; - //TJAPlayer3.ConfigIni.nInputAdjustTimeMs = this.iInputAdjustTimeMs.n現在の値; - OpenTaiko.ConfigIni.nGlobalOffsetMs = this.iGlobalOffsetMs.n現在の値; OpenTaiko.ConfigIni.n表示可能な最小コンボ数.Drums = this.iSystemMinComboDrums.n現在の値; OpenTaiko.ConfigIni.nRisky = this.iSystemRisky.n現在の値; // #23559 2911.7.27 yyagi - //CDTXMania.ConfigIni.e判定表示優先度.Drums = (E判定表示優先度) this.iDrumsJudgeDispPriority.n現在選択されている項目番号; - OpenTaiko.ConfigIni.bBranchGuide = this.iTaikoBranchGuide.bON; OpenTaiko.ConfigIni.nDefaultCourse = this.iTaikoDefaultCourse.n現在選択されている項目番号; OpenTaiko.ConfigIni.nScoreMode = this.iTaikoScoreMode.n現在選択されている項目番号; OpenTaiko.ConfigIni.ShinuchiMode = this.ShinuchiMode.bON; OpenTaiko.ConfigIni.nBranchAnime = this.iTaikoBranchAnime.n現在選択されている項目番号; - //CDTXMania.ConfigIni.bHispeedRandom = this.iTaikoHispeedRandom.bON; OpenTaiko.ConfigIni.bNoInfo = this.iTaikoNoInfo.bON; - //TJAPlayer3.ConfigIni.eRandom.Taiko = (Eランダムモード)this.iTaikoRandom.n現在選択されている項目番号; - //TJAPlayer3.ConfigIni.eSTEALTH = (Eステルスモード)this.iTaikoStealth.n現在選択されている項目番号; - OpenTaiko.ConfigIni.eGameMode = (EGame)this.iTaikoGameMode.n現在選択されている項目番号; - //TJAPlayer3.ConfigIni.bJust = this.iTaikoJust.bON; OpenTaiko.ConfigIni.bJudgeCountDisplay = this.iTaikoJudgeCountDisp.bON; OpenTaiko.ConfigIni.ShowExExtraAnime = this.iShowExExtraAnime.bON; OpenTaiko.ConfigIni.bJudgeBigNotes = this.iTaikoBigNotesJudge.bON; diff --git a/OpenTaiko/src/Stages/04.Config/CStageコンフィグ.cs b/OpenTaiko/src/Stages/04.Config/CStageコンフィグ.cs index 0d52dcfe..d46b1a67 100644 --- a/OpenTaiko/src/Stages/04.Config/CStageコンフィグ.cs +++ b/OpenTaiko/src/Stages/04.Config/CStageコンフィグ.cs @@ -376,8 +376,7 @@ namespace OpenTaiko { actCalibrationMode.Update(); actCalibrationMode.Draw(); - } - else if (actList.ScoreIniImportThreadIsActive) { + } else if (actList.ScoreIniImportThreadIsActive) { if (OpenTaiko.Tx.Tile_Black != null) { OpenTaiko.Tx.Tile_Black.Opacity = 191; for (int i = 0; i <= SampleFramework.GameWindowSize.Width; i += OpenTaiko.Tx.Tile_Black.szTextureSize.Width) { @@ -399,8 +398,8 @@ namespace OpenTaiko { } } } - // 曲データの一覧取得中は、キー入力を無効化する - else if (!OpenTaiko.EnumSongs.IsEnumerating || OpenTaiko.actEnumSongs.bコマンドでの曲データ取得 != true) { + // 曲データの一覧取得中は、キー入力を無効化する + else if (!OpenTaiko.EnumSongs.IsEnumerating || OpenTaiko.actEnumSongs.bコマンドでの曲データ取得 != true) { if (!OpenTaiko.Skin.bgmコンフィグ画面.bIsPlaying) OpenTaiko.Skin.bgmコンフィグ画面.tPlay(); diff --git a/OpenTaiko/src/Stages/06.SongLoading/CStage曲読み込み.cs b/OpenTaiko/src/Stages/06.SongLoading/CStage曲読み込み.cs index ce5a1ea1..958674ff 100644 --- a/OpenTaiko/src/Stages/06.SongLoading/CStage曲読み込み.cs +++ b/OpenTaiko/src/Stages/06.SongLoading/CStage曲読み込み.cs @@ -370,7 +370,7 @@ namespace OpenTaiko { case CStage.EPhase.Common_FADEIN: //if( this.actFI.On進行描画() != 0 ) // #27787 2012.3.10 yyagi 曲読み込み画面のフェードインの省略 // 必ず一度「CStaeg.Eフェーズ.共通_フェードイン」フェーズを経由させること。 - // さもないと、曲読み込みが完了するまで、曲読み込み画面が描画されない。 + // さもないと、曲読み込みが完了するまで、曲読み込み画面が描画されない。 base.ePhaseID = CStage.EPhase.SongLoading_LoadDTXFile; return (int)E曲読込画面の戻り値.継続; @@ -480,7 +480,6 @@ namespace OpenTaiko { _dtx[i]?.tApplyFunMods(i); OpenTaiko.ReplayInstances[i] = new CSongReplay(_dtx[i].strファイル名の絶対パス, i); } - CDTX.tManageKusudama(_dtx); OpenTaiko.stage演奏ドラム画面.Activate();