1
0
mirror of synced 2025-01-18 17:14:07 +01:00

Fix dan plate crashing in some cases while playing Dan charts from Ensou song select screen

This commit is contained in:
0aubsq 2022-01-08 03:12:21 +01:00
parent 41fdb54e2d
commit 0bba663711
4 changed files with 33 additions and 10 deletions

View File

@ -270,7 +270,7 @@ namespace TJAPlayer3
static CPrivateFastFont pfDanPlateTitle = null;
public static void tDisplayDanPlate(CTexture givenPlate, STバー情報 songNode, int x, int y)
public static void tDisplayDanPlate(CTexture givenPlate, STバー情報? songNode, int x, int y)
{
if (givenPlate != null)
{
@ -280,8 +280,18 @@ namespace TJAPlayer3
else
{
// Default Dan Plate
int danTick = songNode.nDanTick;
Color danTickColor = songNode.cDanTickColor;
int danTick = TJAPlayer3.stage選曲.r確定されたスコア..nDanTick;
Color danTickColor = TJAPlayer3.stage選曲.r確定されたスコア..cDanTickColor;
if (songNode != null)
{
STバー情報 stNode = (STバー情報)songNode;
danTick = stNode.nDanTick;
danTickColor = stNode.cDanTickColor;
}
int unit = TJAPlayer3.Tx.Dani_DanPlates.szテクスチャサイズ.Width / 6;
@ -300,7 +310,16 @@ namespace TJAPlayer3
if (pfDanPlateTitle == null)
pfDanPlateTitle = new CPrivateFastFont(new FontFamily(TJAPlayer3.ConfigIni.FontName), 60);
TitleTextureKey ttkTmp = new TitleTextureKey(songNode.ttkタイトル[songNode.ttkタイトル.Length - 1].str文字, pfDanPlateTitle, Color.White, Color.Black, 1000);
string titleTmp = TJAPlayer3.stage選曲.r確定された曲.strタイトル;
if (songNode != null)
{
STバー情報 stNode = (STバー情報)songNode;
titleTmp = stNode.ttkタイトル[stNode.ttkタイトル.Length - 1].str文字;
}
TitleTextureKey ttkTmp = new TitleTextureKey(titleTmp, pfDanPlateTitle, Color.White, Color.Black, 1000);
TJAPlayer3.stage選曲.act曲リスト.ResolveTitleTextureTate(ttkTmp).t2D中心基準描画(TJAPlayer3.app.Device, x, y - 50);
}
}

View File

@ -367,8 +367,12 @@ namespace TJAPlayer3
TJAPlayer3.Tx.SongLoading_Bg_Dan.t2D描画(TJAPlayer3.app.Device, 0, 0 - (ct待機.n現在の値 <= 600 ? ct待機.n現在の値 / 10f : 60));
CActSelect段位リスト.tDisplayDanPlate(TJAPlayer3.stage段位選択..stバー情報[TJAPlayer3.stage段位選択..n現在の選択行].txDanPlate,
TJAPlayer3.stage段位選択..stバー情報[TJAPlayer3.stage段位選択..n現在の選択行],
CTexture dp = (TJAPlayer3.stage段位選択..stバー情報 != null)
? TJAPlayer3.stage段位選択..stバー情報[TJAPlayer3.stage段位選択..n現在の選択行].txDanPlate
: null;
CActSelect段位リスト.tDisplayDanPlate(dp,
null,
1121,
213);

View File

@ -428,7 +428,7 @@ namespace TJAPlayer3
for (int i = 0; i < CExamInfo.cMaxExam; i++)
ExamChange[i] = false;
for (int j = 0; j < CExamInfo.cMaxExam; j++) // EXAM1 check for individual conditions added back, so gauge can be EXAM2, 5, 7 whatever
for (int j = 0; j < CExamInfo.cMaxExam; j++)
{
if (TJAPlayer3.stage選曲.r確定された曲.DanSongs[0].Dan_C[j] != null)
{
@ -491,7 +491,7 @@ namespace TJAPlayer3
#region [Dan Plate]
CActSelect段位リスト.tDisplayDanPlate(Dan_Plate,
TJAPlayer3.stage段位選択..stバー情報[TJAPlayer3.stage段位選択..n現在の選択行],
null,
TJAPlayer3.Skin.Game_DanC_Dan_Plate[0],
TJAPlayer3.Skin.Game_DanC_Dan_Plate[1]);

View File

@ -1110,7 +1110,7 @@ namespace TJAPlayer3
int plateOffset = Math.Max(0, 1600 - ctPhase1.n現在の値) * 2;
CActSelect段位リスト.tDisplayDanPlate(Dan_Plate,
TJAPlayer3.stage段位選択..stバー情報[TJAPlayer3.stage段位選択..n現在の選択行],
null,
138,
220 - plateOffset);
@ -1213,7 +1213,7 @@ namespace TJAPlayer3
#endregion
TJAPlayer3.Tx.DanResult_Rank.t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, 130, 380 - (unitsBeforeAppearance / 3f), new Rectangle(0, 0, 334, 334));
TJAPlayer3.Tx.DanResult_Rank.t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, 130, 380 - (unitsBeforeAppearance / 10f), new Rectangle(0, 0, 334, 334));
#endregion
}