From 8e271667e172ae243589cc00e13330da4550b648 Mon Sep 17 00:00:00 2001 From: 0aubsq <0aubsq@gmail.com> Date: Thu, 6 Jan 2022 08:30:21 +0100 Subject: [PATCH] Fixed redirection bug for dan charts when played from ensou song select screen, add fugoukaku badge when failing a dan chart --- TJAPlayer3/Common/TJAPlayer3.cs | 64 +++++++++++++++++-- .../05.DaniSelect/CActSelect段位リスト.cs | 4 +- .../05.SongSelect/CActSelect曲リスト.cs | 2 +- TJAPlayer3/Stages/08.Result/CStage結果.cs | 34 +++++----- 4 files changed, 76 insertions(+), 28 deletions(-) diff --git a/TJAPlayer3/Common/TJAPlayer3.cs b/TJAPlayer3/Common/TJAPlayer3.cs index 1d8aa7c6..9e83dc61 100644 --- a/TJAPlayer3/Common/TJAPlayer3.cs +++ b/TJAPlayer3/Common/TJAPlayer3.cs @@ -52,6 +52,12 @@ namespace TJAPlayer3 //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; + private set; + } + public static TJAPlayer3 app { get; @@ -855,7 +861,9 @@ namespace TJAPlayer3 stage選曲.On活性化(); r直前のステージ = r現在のステージ; r現在のステージ = stage選曲; - //----------------------------- + + TJAPlayer3.latestSongSelect = stage選曲; + //----------------------------- #endregion break; @@ -865,10 +873,12 @@ namespace TJAPlayer3 r現在のステージ.On非活性化(); Trace.TraceInformation( "----------------------" ); Trace.TraceInformation( "■ 段位選択" ); - stage段位選択.On活性化(); + stage段位選択.On活性化(); r直前のステージ = r現在のステージ; r現在のステージ = stage段位選択; - //----------------------------- + + TJAPlayer3.latestSongSelect = stage段位選択; + //----------------------------- #endregion break; @@ -1223,7 +1233,11 @@ namespace TJAPlayer3 { //DTX.t全チップの再生停止(); if( DTX != null ) - DTX.On非活性化(); + DTX.On非活性化(); + + // ??? + + /* if (stage選曲.n確定された曲の難易度[0] == (int)Difficulty.Dan) { Trace.TraceInformation("----------------------"); @@ -1240,12 +1254,23 @@ namespace TJAPlayer3 r直前のステージ = r現在のステージ; r現在のステージ = stage選曲; } + */ + + Trace.TraceInformation("----------------------"); + Trace.TraceInformation("■ Return to song select menu"); + TJAPlayer3.latestSongSelect.On活性化(); + r直前のステージ = r現在のステージ; + + // Seek latest registered song select screen + r現在のステージ = TJAPlayer3.latestSongSelect; + foreach ( STPlugin pg in this.listプラグイン ) { Directory.SetCurrentDirectory( pg.strプラグインフォルダ ); pg.plugin.Onステージ変更(); Directory.SetCurrentDirectory( TJAPlayer3.strEXEのあるフォルダ ); } + break; } #endregion @@ -1397,6 +1422,10 @@ for (int i = 0; i < 3; i++) { } else { + + // Play cancelled return screen + + /* if(stage選曲.n確定された曲の難易度[0] == (int)Difficulty.Dan) { Trace.TraceInformation("----------------------"); @@ -1413,9 +1442,18 @@ for (int i = 0; i < 3; i++) { r直前のステージ = r現在のステージ; r現在のステージ = stage選曲; } + */ + Trace.TraceInformation("----------------------"); + Trace.TraceInformation("■ Return to song select menu"); + TJAPlayer3.latestSongSelect.On活性化(); + r直前のステージ = r現在のステージ; + + // Seek latest registered song select screen + r現在のステージ = TJAPlayer3.latestSongSelect; + #region [ プラグイン Onステージ変更() の呼び出し ] - //--------------------- + //--------------------- foreach ( STPlugin pg in this.listプラグイン ) { Directory.SetCurrentDirectory( pg.strプラグインフォルダ ); @@ -1578,7 +1616,11 @@ for (int i = 0; i < 3; i++) { r現在のステージ.On非活性化(); this.tガベージコレクションを実行する(); if ( !bコンパクトモード ) - { + { + + // After result screen + + /* if (stage選曲.n確定された曲の難易度[0] == (int)Difficulty.Dan) { Trace.TraceInformation("----------------------"); @@ -1595,6 +1637,16 @@ for (int i = 0; i < 3; i++) { r直前のステージ = r現在のステージ; r現在のステージ = stage選曲; } + */ + + Trace.TraceInformation("----------------------"); + Trace.TraceInformation("■ Return to song select menu"); + TJAPlayer3.latestSongSelect.On活性化(); + r直前のステージ = r現在のステージ; + + // Seek latest registered song select screen + r現在のステージ = TJAPlayer3.latestSongSelect; + stage選曲.NowSong++; foreach( STPlugin pg in this.listプラグイン ) diff --git a/TJAPlayer3/Stages/05.DaniSelect/CActSelect段位リスト.cs b/TJAPlayer3/Stages/05.DaniSelect/CActSelect段位リスト.cs index 025592c5..2d11a8bf 100644 --- a/TJAPlayer3/Stages/05.DaniSelect/CActSelect段位リスト.cs +++ b/TJAPlayer3/Stages/05.DaniSelect/CActSelect段位リスト.cs @@ -215,7 +215,7 @@ namespace TJAPlayer3 { TJAPlayer3.Tx.DanResult_Rank.vc拡大縮小倍率.X = 0.20f; TJAPlayer3.Tx.DanResult_Rank.vc拡大縮小倍率.Y = 0.20f; - TJAPlayer3.Tx.DanResult_Rank.t2D拡大率考慮上中央基準描画(TJAPlayer3.app.Device, xPos - 2, yPos - 14, new Rectangle(334 * currentRank, 0, 334, 334)); + TJAPlayer3.Tx.DanResult_Rank.t2D拡大率考慮上中央基準描画(TJAPlayer3.app.Device, xPos - 2, yPos - 14, new Rectangle(334 * (currentRank + 1), 0, 334, 334)); } #endregion @@ -356,7 +356,7 @@ namespace TJAPlayer3 { TJAPlayer3.Tx.DanResult_Rank.vc拡大縮小倍率.X = 0.8f; TJAPlayer3.Tx.DanResult_Rank.vc拡大縮小倍率.Y = 0.8f; - TJAPlayer3.Tx.DanResult_Rank.t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, scroll + 173 + Anime, 422, new Rectangle(334 * currentRank, 0, 334, 334)); + TJAPlayer3.Tx.DanResult_Rank.t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, scroll + 173 + Anime, 422, new Rectangle(334 * (currentRank + 1), 0, 334, 334)); } #endregion diff --git a/TJAPlayer3/Stages/05.SongSelect/CActSelect曲リスト.cs b/TJAPlayer3/Stages/05.SongSelect/CActSelect曲リスト.cs index 13e4661a..73c5e460 100644 --- a/TJAPlayer3/Stages/05.SongSelect/CActSelect曲リスト.cs +++ b/TJAPlayer3/Stages/05.SongSelect/CActSelect曲リスト.cs @@ -2475,7 +2475,7 @@ namespace TJAPlayer3 TJAPlayer3.Tx.DanResult_Rank.Opacity = 255; TJAPlayer3.Tx.DanResult_Rank.vc拡大縮小倍率.X = _resize; TJAPlayer3.Tx.DanResult_Rank.vc拡大縮小倍率.Y = _resize; - TJAPlayer3.Tx.DanResult_Rank.t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, x, y, new Rectangle(334 * grade, 0, 334, 334)); + TJAPlayer3.Tx.DanResult_Rank.t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, x, y, new Rectangle(334 * (grade + 1), 0, 334, 334)); TJAPlayer3.Tx.DanResult_Rank.vc拡大縮小倍率.X = 1f; TJAPlayer3.Tx.DanResult_Rank.vc拡大縮小倍率.Y = 1f; } diff --git a/TJAPlayer3/Stages/08.Result/CStage結果.cs b/TJAPlayer3/Stages/08.Result/CStage結果.cs index 2187c316..8955b9ed 100644 --- a/TJAPlayer3/Stages/08.Result/CStage結果.cs +++ b/TJAPlayer3/Stages/08.Result/CStage結果.cs @@ -1104,6 +1104,9 @@ namespace TJAPlayer3 Exam.Status examStatus = TJAPlayer3.stage演奏ドラム画面.actDan.GetExamStatus(TJAPlayer3.stage結果.st演奏記録.Drums.Dan_C); + TJAPlayer3.Tx.DanResult_Rank.vc拡大縮小倍率.X = 1f; + TJAPlayer3.Tx.DanResult_Rank.vc拡大縮小倍率.Y = 1f; + if (examStatus != Exam.Status.Failure) { int successType = 0; @@ -1120,11 +1123,14 @@ namespace TJAPlayer3 comboType += 1; } - TJAPlayer3.Tx.DanResult_Rank.vc拡大縮小倍率.X = 1f; - TJAPlayer3.Tx.DanResult_Rank.vc拡大縮小倍率.Y = 1f; - TJAPlayer3.Tx.DanResult_Rank.t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, 130, 380, new Rectangle(334 * (2 * comboType + successType), 0, 334, 334)); + + TJAPlayer3.Tx.DanResult_Rank.t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, 130, 380, new Rectangle(334 * (2 * comboType + successType + 1), 0, 334, 334)); } + else + { + TJAPlayer3.Tx.DanResult_Rank.t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, 130, 380, new Rectangle(0, 0, 334, 334)); + } #endregion @@ -1250,17 +1256,17 @@ namespace TJAPlayer3 this.bアニメが完了 = false; } - #region ネームプレート + #region Nameplate + for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++) { - // To change while implementing the 2P result screen int pos = i; if (TJAPlayer3.P1IsBlue() && TJAPlayer3.stage選曲.n確定された曲の難易度[0] < (int)Difficulty.Tower) pos = 1; TJAPlayer3.NamePlate.tNamePlateDraw((pos == 1) ? 1280 - 28 - TJAPlayer3.Tx.NamePlateBase.szテクスチャサイズ.Width : 28, 621, i); - // TJAPlayer3.NamePlate.tNamePlateDraw(28, 621, i); } + #endregion if (base.eフェーズID == CStage.Eフェーズ.共通_フェードイン) @@ -1299,7 +1305,7 @@ namespace TJAPlayer3 TJAPlayer3.Skin.sound決定音.t再生する(); actFI.tフェードアウト開始(); - if (TJAPlayer3.stage選曲.n確定された曲の難易度[0] != (int)Difficulty.Dan) + if (TJAPlayer3.latestSongSelect == TJAPlayer3.stage選曲)// TJAPlayer3.stage選曲.n確定された曲の難易度[0] != (int)Difficulty.Dan) if (TJAPlayer3.stage選曲.r現在選択中の曲.r親ノード != null) TJAPlayer3.stage選曲.act曲リスト.tBOXを出る(); @@ -1320,7 +1326,7 @@ namespace TJAPlayer3 { actFI.tフェードアウト開始(); - if (TJAPlayer3.stage選曲.n確定された曲の難易度[0] != (int)Difficulty.Dan) + if (TJAPlayer3.latestSongSelect == TJAPlayer3.stage選曲)// TJAPlayer3.stage選曲.n確定された曲の難易度[0] != (int)Difficulty.Dan) if (TJAPlayer3.stage選曲.r現在選択中の曲.r親ノード != null) TJAPlayer3.stage選曲.act曲リスト.tBOXを出る(); @@ -1385,7 +1391,7 @@ namespace TJAPlayer3 if (!b最近遊んだ曲追加済み) { - #region [ 選曲画面の譜面情報の更新 ] + #region [ Apply new local status for song select screens ] //--------------------- if (!TJAPlayer3.bコンパクトモード) { @@ -1560,9 +1566,6 @@ namespace TJAPlayer3 private CActオプションパネル actOption; private CActResultParameterPanel actParameterPanel; - private CActResultRank actRank; - private CActResultImage actResultImage; - private CActResultSongBar actSongBar; private bool bアニメが完了; private bool bIsCheckedWhetherResultScreenShouldSaveOrNot; // #24509 2011.3.14 yyagi @@ -1606,16 +1609,9 @@ namespace TJAPlayer3 private CPrivateFastFont pfTowerText; private CPrivateFastFont pfTowerText48; private CPrivateFastFont pfTowerText72; - private int TowerScoreRank; // Don medals information private int[] nEarnedMedalsCount = { 0, 0 }; - - private CCounter ctAutoReturn; - //private CTexture txオプションパネル; - //private CTexture tx下部パネル; - //private CTexture tx上部パネル; - //private CTexture tx背景; #region [ #24609 リザルト画像をpngで保存する ] // #24609 2011.3.14 yyagi; to save result screen in case BestRank or HiSkill. ///