From ecbfe490507f6ecc54fe3e98d98cc80eb70fa1e1 Mon Sep 17 00:00:00 2001 From: Takkkom <76614532+Takkkom@users.noreply.github.com> Date: Tue, 28 Feb 2023 10:27:10 +0900 Subject: [PATCH] =?UTF-8?q?=E8=89=B2=E3=80=85=E6=94=B9=E5=96=84=20(#444)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TJAPlayer3/Common/CSkin.cs | 10 +- .../Stages/04.Config/CStageコンフィグ.cs | 9 +- .../05.SongSelect/CActSelect曲リスト.cs | 68 +++++++++++--- TJAPlayer3/Stages/05.SongSelect/CStage選曲.cs | 93 ++++++++++++++++++- .../07.Game/Taiko/CStage演奏ドラム画面.cs | 12 +-- 5 files changed, 160 insertions(+), 32 deletions(-) diff --git a/TJAPlayer3/Common/CSkin.cs b/TJAPlayer3/Common/CSkin.cs index a4a54c31..7abd713d 100644 --- a/TJAPlayer3/Common/CSkin.cs +++ b/TJAPlayer3/Common/CSkin.cs @@ -746,9 +746,6 @@ namespace TJAPlayer3 this.soundステージクリア音 = new Cシステムサウンド(@"Sounds\Stage clear.ogg", false, true, true, ESoundGroup.Voice); this.soundフルコンボ音 = new Cシステムサウンド(@"Sounds\Full combo.ogg", false, false, true, ESoundGroup.Voice); this.sound曲読込開始音 = new Cシステムサウンド(@"Sounds\Now loading.ogg", false, true, true, ESoundGroup.Unknown); - this.bgm起動画面 = new Cシステムサウンド(@"Sounds\Setup BGM.ogg", true, true, false, ESoundGroup.SongPlayback); - this.bgmオプション画面 = new Cシステムサウンド(@"Sounds\Option BGM.ogg", true, true, false, ESoundGroup.SongPlayback); - this.bgmコンフィグ画面 = new Cシステムサウンド(@"Sounds\Config BGM.ogg", true, true, false, ESoundGroup.SongPlayback); //this.bgm選曲画面 = new Cシステムサウンド(@"Sounds\Select BGM.ogg", true, true, false, ESoundGroup.SongPlayback); //this.soundSongSelectChara = new Cシステムサウンド(@"Sounds\SongSelect Chara.ogg", false, false, false, ESoundGroup.SongPlayback); this.soundSkip = new Cシステムサウンド(@"Sounds\Skip.ogg", false, false, false, ESoundGroup.SoundEffect); @@ -762,10 +759,13 @@ namespace TJAPlayer3 //this.soundBlue = new Cシステムサウンド( @"Sounds\ka.ogg", false, false, true, ESoundType.SoundEffect ); this.soundBalloon = new Cシステムサウンド(@"Sounds\balloon.ogg", false, false, true, ESoundGroup.SoundEffect); this.sound曲決定音 = new Cシステムサウンド(@"Sounds\SongDecide.ogg", false, false, true, ESoundGroup.Voice); - this.soundSongDecide_AI = new Cシステムサウンド(@"Sounds\SongDecide_AI.ogg", false, false, true, ESoundGroup.Voice); - + this.soundSongDecide_AI = new Cシステムサウンド(@"Sounds\SongDecide_AI.ogg", false, false, true, ESoundGroup.Voice); + + this.bgm起動画面 = new Cシステムサウンド(@"Sounds\BGM\Setup.ogg", true, true, false, ESoundGroup.SongPlayback); this.bgmタイトルイン = new Cシステムサウンド(@"Sounds\BGM\Title_Start.ogg", false, false, true, ESoundGroup.SongPlayback); this.bgmタイトル = new Cシステムサウンド(@"Sounds\BGM\Title.ogg", true, false, true, ESoundGroup.SongPlayback); + this.bgmオプション画面 = new Cシステムサウンド(@"Sounds\BGM\Option.ogg", true, true, false, ESoundGroup.SongPlayback); + this.bgmコンフィグ画面 = new Cシステムサウンド(@"Sounds\BGM\Config.ogg", true, true, false, ESoundGroup.SongPlayback); this.bgm選曲画面イン = new Cシステムサウンド(@"Sounds\BGM\SongSelect_Start.ogg", false, false, true, ESoundGroup.SongPlayback); this.bgm選曲画面 = new Cシステムサウンド(@"Sounds\BGM\SongSelect.ogg", true, false, true, ESoundGroup.SongPlayback); this.bgmSongSelect_AI_In = new Cシステムサウンド(@"Sounds\BGM\SongSelect_AI_Start.ogg", false, false, true, ESoundGroup.SongPlayback); diff --git a/TJAPlayer3/Stages/04.Config/CStageコンフィグ.cs b/TJAPlayer3/Stages/04.Config/CStageコンフィグ.cs index 28ea62c0..41645fde 100644 --- a/TJAPlayer3/Stages/04.Config/CStageコンフィグ.cs +++ b/TJAPlayer3/Stages/04.Config/CStageコンフィグ.cs @@ -57,7 +57,9 @@ namespace TJAPlayer3 Trace.TraceInformation( "コンフィグステージを活性化します。" ); Trace.Indent(); try - { + { + TJAPlayer3.Skin.bgmコンフィグ画面.t再生する(); + this.n現在のメニュー番号 = 0; // if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName)) { @@ -86,7 +88,9 @@ namespace TJAPlayer3 Trace.TraceInformation( "コンフィグステージを非活性化します。" ); Trace.Indent(); try - { + { + TJAPlayer3.Skin.bgmコンフィグ画面.t停止する(); + TJAPlayer3.ConfigIni.t書き出し( TJAPlayer3.strEXEのあるフォルダ + "Config.ini" ); // CONFIGだけ if( this.ftフォント != null ) // 以下OPTIONと共通 { @@ -373,7 +377,6 @@ namespace TJAPlayer3 case CStage.Eフェーズ.共通_フェードイン: if( this.actFIFO.On進行描画() != 0 ) { - TJAPlayer3.Skin.bgmコンフィグ画面.t再生する(); base.eフェーズID = CStage.Eフェーズ.共通_通常状態; } break; diff --git a/TJAPlayer3/Stages/05.SongSelect/CActSelect曲リスト.cs b/TJAPlayer3/Stages/05.SongSelect/CActSelect曲リスト.cs index 9f219bb2..ca1c6abd 100644 --- a/TJAPlayer3/Stages/05.SongSelect/CActSelect曲リスト.cs +++ b/TJAPlayer3/Stages/05.SongSelect/CActSelect曲リスト.cs @@ -73,7 +73,7 @@ namespace TJAPlayer3 public C曲リストノード r現在選択中の曲 { get; - private set; + set; } public void ResetSongIndex() @@ -272,6 +272,12 @@ namespace TJAPlayer3 } } + public void tResetTitleKey() + { + this.ttk選択している曲の曲名 = null; + this.ttk選択している曲のサブタイトル = null; + } + public bool tBOXに入る() { //Trace.TraceInformation( "box enter" ); @@ -2036,10 +2042,10 @@ namespace TJAPlayer3 // Fonts here //----------------- - if (this.stバー情報[nパネル番号].strタイトル文字列 != "" && this.ttk選択している曲の曲名 == null) - this.ttk選択している曲の曲名 = this.ttk曲名テクスチャを生成する(this.stバー情報[nパネル番号].strタイトル文字列, this.stバー情報[nパネル番号].ForeColor, this.stバー情報[nパネル番号].BackColor, stバー情報[nパネル番号].eバー種別 == Eバー種別.Box ? this.pfBoxName : this.pfMusicName); - if (this.stバー情報[nパネル番号].strサブタイトル != "" && this.ttk選択している曲のサブタイトル == null) - this.ttk選択している曲のサブタイトル = this.ttkサブタイトルテクスチャを生成する(this.stバー情報[nパネル番号].strサブタイトル, this.stバー情報[nパネル番号].ForeColor, this.stバー情報[nパネル番号].BackColor); + if (r現在選択中の曲.strタイトル != "" && this.ttk選択している曲の曲名 == null) + this.ttk選択している曲の曲名 = this.ttk曲名テクスチャを生成する(r現在選択中の曲.strタイトル, r現在選択中の曲.ForeColor, r現在選択中の曲.BackColor, r現在選択中の曲.eノード種別 == C曲リストノード.Eノード種別.BOX ? this.pfBoxName : this.pfMusicName); + if (r現在選択中の曲.strサブタイトル != "" && this.ttk選択している曲のサブタイトル == null) + this.ttk選択している曲のサブタイトル = this.ttkサブタイトルテクスチャを生成する(r現在選択中の曲.strサブタイトル, r現在選択中の曲.ForeColor, r現在選択中の曲.BackColor); if (this.ttk選択している曲のサブタイトル != null) tx選択している曲のサブタイトル = ResolveTitleTexture(ttk選択している曲のサブタイトル, TJAPlayer3.Skin.SongSelect_VerticalText); @@ -2074,17 +2080,17 @@ namespace TJAPlayer3 } tx選択している曲のサブタイトル.t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, - xAnime + TJAPlayer3.Skin.SongSelect_Bar_SubTitle_Offset[0] + (this.stバー情報[nパネル番号].eバー種別 == Eバー種別.Box ? centerMoveX : centerMoveX / 1.1f), - y + TJAPlayer3.Skin.SongSelect_Bar_SubTitle_Offset[1] - (this.stバー情報[nパネル番号].eバー種別 == Eバー種別.Box ? centerMove : centerMove / 1.1f)); + xAnime + TJAPlayer3.Skin.SongSelect_Bar_SubTitle_Offset[0] + (r現在選択中の曲.eノード種別 == C曲リストノード.Eノード種別.BOX ? centerMoveX : centerMoveX / 1.1f), + y + TJAPlayer3.Skin.SongSelect_Bar_SubTitle_Offset[1] - (r現在選択中の曲.eノード種別 == C曲リストノード.Eノード種別.BOX ? centerMove : centerMove / 1.1f)); if (this.ttk選択している曲の曲名 != null) { ResolveTitleTexture(this.ttk選択している曲の曲名, TJAPlayer3.Skin.SongSelect_VerticalText).t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, - xAnime + GetTitleOffsetX(this.stバー情報[nパネル番号].eバー種別) + - (r現在選択中の曲.eノード種別 != C曲リストノード.Eノード種別.BACKBOX ? (this.stバー情報[nパネル番号].eバー種別 == Eバー種別.Box ? centerMoveX : centerMoveX / 1.1f) : 0), + xAnime + GetTitleOffsetX(r現在選択中の曲.eノード種別) + + (r現在選択中の曲.eノード種別 != C曲リストノード.Eノード種別.BACKBOX ? (r現在選択中の曲.eノード種別 == C曲リストノード.Eノード種別.BOX ? centerMoveX : centerMoveX / 1.1f) : 0), - y + GetTitleOffsetY(this.stバー情報[nパネル番号].eバー種別) - - (r現在選択中の曲.eノード種別 != C曲リストノード.Eノード種別.BACKBOX ? (this.stバー情報[nパネル番号].eバー種別 == Eバー種別.Box ? centerMove : centerMove / 1.1f) : 0)); + y + GetTitleOffsetY(r現在選択中の曲.eノード種別) - + (r現在選択中の曲.eノード種別 != C曲リストノード.Eノード種別.BACKBOX ? (r現在選択中の曲.eノード種別 == C曲リストノード.Eノード種別.BOX ? centerMove : centerMove / 1.1f) : 0)); } } else @@ -2093,10 +2099,10 @@ namespace TJAPlayer3 { ResolveTitleTexture(this.ttk選択している曲の曲名, TJAPlayer3.Skin.SongSelect_VerticalText).t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, xAnime + GetTitleOffsetX(this.stバー情報[nパネル番号].eバー種別) + - (r現在選択中の曲.eノード種別 != C曲リストノード.Eノード種別.BACKBOX ? (this.stバー情報[nパネル番号].eバー種別 == Eバー種別.Box ? centerMoveX : centerMoveX / 1.1f) : 0), + (r現在選択中の曲.eノード種別 != C曲リストノード.Eノード種別.BACKBOX ? (r現在選択中の曲.eノード種別 == C曲リストノード.Eノード種別.BOX ? centerMoveX : centerMoveX / 1.1f) : 0), y + GetTitleOffsetY(this.stバー情報[nパネル番号].eバー種別) - - (r現在選択中の曲.eノード種別 != C曲リストノード.Eノード種別.BACKBOX ? (this.stバー情報[nパネル番号].eバー種別 == Eバー種別.Box ? centerMove : centerMove / 1.1f) : 0)); + (r現在選択中の曲.eノード種別 != C曲リストノード.Eノード種別.BACKBOX ? (r現在選択中の曲.eノード種別 == C曲リストノード.Eノード種別.BOX ? centerMove : centerMove / 1.1f) : 0)); } } //----------------- @@ -2487,6 +2493,23 @@ namespace TJAPlayer3 } } + private int GetTitleOffsetX(C曲リストノード.Eノード種別 node) + { + switch (node) + { + case C曲リストノード.Eノード種別.SCORE: + return TJAPlayer3.Skin.SongSelect_Bar_Title_Offset[0]; + case C曲リストノード.Eノード種別.BOX: + return TJAPlayer3.Skin.SongSelect_Bar_Box_Offset[0]; + case C曲リストノード.Eノード種別.BACKBOX: + return TJAPlayer3.Skin.SongSelect_Bar_BackBox_Offset[0]; + case C曲リストノード.Eノード種別.RANDOM: + return TJAPlayer3.Skin.SongSelect_Bar_Random_Offset[0]; + default: + return TJAPlayer3.Skin.SongSelect_Bar_Title_Offset[0]; + } + } + private int GetTitleOffsetY(Eバー種別 bar) { switch (bar) @@ -2504,6 +2527,23 @@ namespace TJAPlayer3 } } + private int GetTitleOffsetY(C曲リストノード.Eノード種別 node) + { + switch (node) + { + case C曲リストノード.Eノード種別.SCORE: + return TJAPlayer3.Skin.SongSelect_Bar_Title_Offset[1]; + case C曲リストノード.Eノード種別.BOX: + return TJAPlayer3.Skin.SongSelect_Bar_Box_Offset[1]; + case C曲リストノード.Eノード種別.BACKBOX: + return TJAPlayer3.Skin.SongSelect_Bar_BackBox_Offset[1]; + case C曲リストノード.Eノード種別.RANDOM: + return TJAPlayer3.Skin.SongSelect_Bar_Random_Offset[1]; + default: + return TJAPlayer3.Skin.SongSelect_Bar_Title_Offset[1]; + } + } + private void DrawBarCenter(CTexture texture, int x, int y, int moveX, int move, bool changeColor, bool drawOverlay, bool fullScaleOverlay) { if (changeColor) @@ -2772,7 +2812,7 @@ namespace TJAPlayer3 return list[index]; } - private void tバーの初期化() + public void tバーの初期化() { stバー情報 = new STバー情報[TJAPlayer3.Skin.SongSelect_Bar_Count]; diff --git a/TJAPlayer3/Stages/05.SongSelect/CStage選曲.cs b/TJAPlayer3/Stages/05.SongSelect/CStage選曲.cs index 64fb2842..8508dfc3 100644 --- a/TJAPlayer3/Stages/05.SongSelect/CStage選曲.cs +++ b/TJAPlayer3/Stages/05.SongSelect/CStage選曲.cs @@ -173,6 +173,10 @@ namespace TJAPlayer3 { return this.act曲リスト.r現在選択中の曲; } + set + { + this.act曲リスト.r現在選択中の曲 = value; + } } // コンストラクタ @@ -769,7 +773,14 @@ namespace TJAPlayer3 { #region [Trigger context box] - this.tSelectSongRandomly(); + this.tSetSongRandomly(); + + // Called here + TJAPlayer3.Skin.sound決定音.t再生する(); + this.act難易度選択画面.bIsDifficltSelect = true; + this.act難易度選択画面.t選択画面初期化(); + this.act曲リスト.ctBarFlash.t開始(0, 2700, TJAPlayer3.Skin.SongSelect_Box_Opening_Interval, TJAPlayer3.Timer); + this.act曲リスト.ctDifficultyIn.t開始(0, 3200, TJAPlayer3.Skin.SongSelect_Box_Opening_Interval, TJAPlayer3.Timer); //this.ctDonchan_Select.t開始(0, TJAPlayer3.Tx.SongSelect_Donchan_Select.Length - 1, 1000 / 45, TJAPlayer3.Timer); CMenuCharacter.tMenuResetTimer(CMenuCharacter.ECharacterAnimation.SELECT); @@ -1704,8 +1715,84 @@ namespace TJAPlayer3 #endregion - CSongSelectSongManager.stopSong(); - + CSongSelectSongManager.stopSong(); + + } + private void tSetSongRandomly() + { + var usedDiffs = new int[] { -1, -1, -1, -1, -1 }; + var mandatoryDiffs = new List(); + + #region [Fetch context informations] + + if (this.act曲リスト.latestContext == eMenuContext.Random) + { + for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++) + { + var diff = this.act曲リスト.tMenuContextGetVar(i); + usedDiffs[i] = diff; + if (!mandatoryDiffs.Contains(diff)) + mandatoryDiffs.Add(diff); + } + } + + #endregion + + C曲リストノード song = this.act曲リスト.r現在選択中の曲; + + song.stackランダム演奏番号.Clear(); + song.listランダム用ノードリスト = null; + + if ((song.stackランダム演奏番号.Count == 0) || (song.listランダム用ノードリスト == null)) + { + if (song.listランダム用ノードリスト == null) + { + song.listランダム用ノードリスト = this.t指定された曲が存在する場所の曲を列挙する_子リスト含む(song, ref mandatoryDiffs); + } + int count = song.listランダム用ノードリスト.Count; + if (count == 0) + { + return; + } + int[] numArray = new int[count]; + for (int i = 0; i < count; i++) + { + numArray[i] = i; + } + for (int j = 0; j < (count * 1.5); j++) + { + int index = TJAPlayer3.Random.Next(count); + int num5 = TJAPlayer3.Random.Next(count); + int num6 = numArray[num5]; + numArray[num5] = numArray[index]; + numArray[index] = num6; + } + for (int k = 0; k < count; k++) + { + song.stackランダム演奏番号.Push(numArray[k]); + } + + if (TJAPlayer3.ConfigIni.bLogDTX詳細ログ出力) + { + StringBuilder builder = new StringBuilder(0x400); + builder.Append(string.Format("ランダムインデックスリストを作成しました: {0}曲: ", song.stackランダム演奏番号.Count)); + for (int m = 0; m < count; m++) + { + builder.Append(string.Format("{0} ", numArray[m])); + } + Trace.TraceInformation(builder.ToString()); + } + } + + // Third assignment + this.r現在選択中の曲 = song.listランダム用ノードリスト[song.stackランダム演奏番号.Pop()]; + + act曲リスト.t現在選択中の曲を元に曲バーを再構成する(); + act曲リスト.t選択曲が変更された(false); + act曲リスト.tUpdateCurSong(); + act曲リスト.tResetTitleKey(); + act曲リスト.tバーの初期化(); + t選択曲変更通知(); } private void t曲を選択する() { diff --git a/TJAPlayer3/Stages/07.Game/Taiko/CStage演奏ドラム画面.cs b/TJAPlayer3/Stages/07.Game/Taiko/CStage演奏ドラム画面.cs index a2d8ab59..7f00a6bb 100644 --- a/TJAPlayer3/Stages/07.Game/Taiko/CStage演奏ドラム画面.cs +++ b/TJAPlayer3/Stages/07.Game/Taiko/CStage演奏ドラム画面.cs @@ -478,11 +478,11 @@ namespace TJAPlayer3 if( !TJAPlayer3.ConfigIni.bNoInfo && !TJAPlayer3.ConfigIni.bTokkunMode) this.t進行描画_ゲージ(); - this.actLaneTaiko.ゴーゴー炎(); - - // bIsFinishedPlaying was dependent on 2P in this case - - + this.actLaneTaiko.ゴーゴー炎(); + + // bIsFinishedPlaying was dependent on 2P in this case + + this.actDan.On進行描画(); for ( int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++ ) { @@ -507,8 +507,6 @@ namespace TJAPlayer3 if (!ifp[i]) bIsFinishedPlaying = false; } - this.actDan.On進行描画(); - this.actMtaiko.On進行描画(); if (TJAPlayer3.ConfigIni.bAIBattleMode)