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

Tower score ranks displayed on result screen and song select screen

This commit is contained in:
0aubsq 2021-12-25 18:31:29 +01:00
parent 05a9369e32
commit 4ad18c157c
2 changed files with 142 additions and 33 deletions

View File

@ -1439,6 +1439,10 @@ namespace TJAPlayer3
int songType = 0;
if (this.stバー情報[nパネル番号].ar難易度[(int)Difficulty.Dan] >= 0)
songType = 1;
else if (this.stバー情報[nパネル番号].ar難易度[(int)Difficulty.Tower] >= 0)
songType = 2;
// TJAPlayer3.act文字コンソール.tPrint(x + -470, y + 30, C文字コンソール.Eフォント種別.白, (this.stバー情報[nパネル番号].ar難易度[(int)Difficulty.Tower]).ToString());
this.tジャンル別選択されていない曲バーの描画(xAnime - (int)Box, y - ((int)Box * 3), this.stバー情報[nパネル番号].strジャンル, stバー情報[nパネル番号].eバー種別, stバー情報[nパネル番号].nクリア, stバー情報[nパネル番号].nスコアランク, boxType, songType);
}
@ -1576,12 +1580,36 @@ namespace TJAPlayer3
if (this.r現在選択中の曲.arスコア[(int)Difficulty.Dan] != null)
{
int[] clear = this.r現在選択中の曲.arスコア[(int)Difficulty.Dan]..nクリア;
//int[] clear = this.r現在選択中の曲.arスコア[(int)Difficulty.Dan].譜面情報.nクリア;
int currentRank = Math.Min(clear[0], 6) - 1;
for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{
int diff = 640 - 354;
int shift = 640 + ((i == 1) ? diff : -diff);
int ap = TJAPlayer3.GetActualPlayer(i);
displayDanStatus(354, (int)(344 - BarAnimeCount / 1.1f), currentRank, 0.2f);
int[] clear = this.r現在選択中の曲.arスコア[(int)Difficulty.Dan].GPInfo[ap].nClear;
int currentRank = Math.Min(clear[0], 6) - 1;
displayDanStatus(shift, (int)(344 - BarAnimeCount / 1.1f), currentRank, 0.2f);
}
}
else if (this.r現在選択中の曲.arスコア[(int)Difficulty.Tower] != null)
{
//int[] clear = this.r現在選択中の曲.arスコア[(int)Difficulty.Tower].譜面情報.nクリア;
for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{
int diff = 640 - 354;
int shift = 640 + ((i == 1) ? diff : -diff);
int ap = TJAPlayer3.GetActualPlayer(i);
int[] clear = this.r現在選択中の曲.arスコア[(int)Difficulty.Tower].GPInfo[ap].nClear;
int currentRank = Math.Min(clear[0], 7) - 1;
displayTowerStatus(shift, (int)(344 - BarAnimeCount / 1.1f), currentRank, 0.3f);
}
}
else if (this.r現在選択中の曲.arスコア[3] != null || this.r現在選択中の曲.arスコア[4] != null)
{
@ -2331,11 +2359,35 @@ namespace TJAPlayer3
if (eバー種別 == Eバー種別.Score)
{
if (_songType == 1)
displayDanStatus(x + 30, y + 30, Math.Min([0][0], 6) - 1, 0.2f);
if (_songType == 1)
{
// displayDanStatus(x + 30, y + 30, Math.Min(クリア[0][0], 6) - 1, 0.2f);
for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{
int diff = 640 - 354;
int shift = 640 + ((i == 1) ? diff : -diff) - 354;
displayDanStatus(x + 30 + shift, y + 30, Math.Min([i][0], 6) - 1, 0.2f);
}
}
else if (_songType == 2)
{
// displayTowerStatus(x + 30, y + 30, Math.Min(クリア[0][0], 6) - 1, 0.2f);
for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{
int diff = 640 - 354;
int shift = 640 + ((i == 1) ? diff : -diff) - 354;
displayTowerStatus(x + 30 + shift, y + 30, Math.Min([i][0], 7) - 1, 0.3f);
// TJAPlayer3.act文字コンソール.tPrint(x + 30 + shift - 50, y + 30, C文字コンソール.Eフォント種別.白, (Math.Min(クリア[i][0], 7) - 1).ToString());
}
}
else
{
var sr = this.r現在選択中の曲.arスコア[n現在のアンカ難易度レベルに最も近い難易度レベルを返す(this.r現在選択中の曲)];
// var sr = this.r現在選択中の曲.arスコア[n現在のアンカ難易度レベルに最も近い難易度レベルを返す(this.r現在選択中の曲)];
for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{
@ -2349,13 +2401,29 @@ namespace TJAPlayer3
}
}
public void displayTowerStatus(int x, int y, int grade, float _resize)
{
if (grade >= 0 && TJAPlayer3.Tx.TowerResult_ScoreRankEffect != null)
{
TJAPlayer3.Tx.TowerResult_ScoreRankEffect.Opacity = 255;
TJAPlayer3.Tx.TowerResult_ScoreRankEffect.vc拡大縮小倍率.X = _resize;
TJAPlayer3.Tx.TowerResult_ScoreRankEffect.vc拡大縮小倍率.Y = _resize;
TJAPlayer3.Tx.TowerResult_ScoreRankEffect.t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, x, y, new Rectangle(grade * 229, 0, 229, 194));
TJAPlayer3.Tx.TowerResult_ScoreRankEffect.vc拡大縮小倍率.X = 1f;
TJAPlayer3.Tx.TowerResult_ScoreRankEffect.vc拡大縮小倍率.Y = 1f;
}
}
public void displayDanStatus(int x, int y, int grade, float _resize)
{
if (grade > 0)
if (grade >= 0 && TJAPlayer3.Tx.DanResult_Rank != null)
{
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.vc拡大縮小倍率.X = 1f;
TJAPlayer3.Tx.DanResult_Rank.vc拡大縮小倍率.Y = 1f;
}
}

View File

@ -65,6 +65,35 @@ namespace TJAPlayer3
|| (player == 1 && !TJAPlayer3.ConfigIni.b太鼓パートAutoPlay2P && TJAPlayer3.ConfigIni.nAILevel == 0));
}
public int GetTowerScoreRank()
{
int tmpClear = 0;
double progress = CFloorManagement.LastRegisteredFloor / (double)TJAPlayer3.stage選曲.r確定された曲.arスコア[5]..nTotalFloor;
// Clear badges : 10% (E), 25% (D), 50% (C), 75% (B), Clear (A), FC (S), DFC (X)
bool[] conditions =
{
progress >= 0.1,
progress >= 0.25,
progress >= 0.5,
progress >= 0.75,
progress == 1 && CFloorManagement.CurrentNumberOfLives > 0,
this.st演奏記録.Drums.nMiss数 == 0,
this.st演奏記録.Drums.nGreat数 == 0
};
for (int i = 0; i < conditions.Length; i++)
{
if (conditions[i] == true)
tmpClear++;
else
break;
}
return tmpClear;
}
// CStage 実装
public override void On活性化()
@ -170,6 +199,7 @@ namespace TJAPlayer3
}
//---------------------
#endregion
@ -282,7 +312,7 @@ namespace TJAPlayer3
{
/* == Specific format for DaniDoujou charts ==
**
** Higher is better, takes the Clear1 spot (Usually the spot allocated for Kantan Clear crowns)
** Higher is better, takes the Clear0 spot (Usually the spot allocated for Kantan Clear crowns)
**
** 0 (Fugoukaku, no insign)
** Silver Iki (Clear) : 1 (Red Goukaku) / 2 (Gold Goukaku)
@ -347,28 +377,7 @@ namespace TJAPlayer3
#region [Tower scores]
int tmpClear = 0;
double progress = CFloorManagement.LastRegisteredFloor / (double)TJAPlayer3.stage選曲.r確定された曲.arスコア[5]..nTotalFloor;
// Clear badges : 10% (E), 25% (D), 50% (C), 75% (B), Clear (A), FC (S), DFC (X)
bool[] conditions =
{
progress >= 0.1,
progress >= 0.25,
progress >= 0.5,
progress >= 0.75,
CFloorManagement.CurrentNumberOfLives > 0,
this.st演奏記録.Drums.nMiss数 == 0,
this.st演奏記録.Drums.nGreat数 == 0
};
for (int i = 0; i < conditions.Length; i++)
{
if (conditions[i] == true)
tmpClear++;
else
break;
}
int tmpClear = GetTowerScoreRank();
if (isAutoDisabled(0))
{
@ -1112,7 +1121,9 @@ namespace TJAPlayer3
this.ctTower_Animation.t進行();
if (TJAPlayer3.Skin.Game_Tower_Ptn_Result > 0)
#region [Tower background]
if (TJAPlayer3.Skin.Game_Tower_Ptn_Result > 0)
{
int xFactor = 0;
float yFactor = 1f;
@ -1132,8 +1143,33 @@ namespace TJAPlayer3
TJAPlayer3.Tx.TowerResult_Tower[currentTowerType]?.t2D描画(TJAPlayer3.app.Device, xFactor, -1 * yFactor * this.ctTower_Animation.n現在の値);
}
#endregion
TJAPlayer3.Tx.TowerResult_Panel?.t2D描画(TJAPlayer3.app.Device, 0, 0);
#region [Score Rank]
int sc = GetTowerScoreRank() - 1;
TJAPlayer3.act文字コンソール.tPrint(0, 40, C文字コンソール.Eフォント種別., sc.ToString());
if (sc >= 0 && TJAPlayer3.Tx.TowerResult_ScoreRankEffect != null)
{
TJAPlayer3.Tx.TowerResult_ScoreRankEffect.Opacity = 255;
TJAPlayer3.Tx.TowerResult_ScoreRankEffect.vc拡大縮小倍率.X = 1f;
TJAPlayer3.Tx.TowerResult_ScoreRankEffect.vc拡大縮小倍率.Y = 1f;
TJAPlayer3.Tx.TowerResult_ScoreRankEffect.t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device,
1000,
220,
new Rectangle(sc * 229, 0, 229, 194));
}
#endregion
#region [Text elements]
int firstRowY = 394;
int secondRowY = firstRowY + 96;
@ -1152,6 +1188,8 @@ namespace TJAPlayer3
TJAPlayer3.Tx.Gauge_Soul?.t2D描画(TJAPlayer3.app.Device, 248, secondRowY - 16, new Rectangle(0, 0, 80, 80));
#endregion
if (!b音声再生 && !TJAPlayer3.Skin.bgmTowerResult.b再生中)
{
TJAPlayer3.Skin.bgmTowerResult.t再生する();
@ -1362,7 +1400,9 @@ namespace TJAPlayer3
Cスコア cスコア = TJAPlayer3.stage選曲.r確定されたスコア;
int actualPlayer = TJAPlayer3.SaveFile;
int tmpClear = 0;
int tmpClear = GetTowerScoreRank();
/*
double progress = CFloorManagement.LastRegisteredFloor / (double)TJAPlayer3.stage選曲.r確定された曲.arスコア[5]..nTotalFloor;
// Clear badges : 10% (E), 25% (D), 50% (C), 75% (B), Clear (A), FC (S), DFC (X)
@ -1384,7 +1424,7 @@ namespace TJAPlayer3
else
break;
}
*/
if (!TJAPlayer3.ConfigIni.b太鼓パートAutoPlay)
{
@ -1521,6 +1561,7 @@ namespace TJAPlayer3
private CPrivateFastFont pfTowerText;
private CPrivateFastFont pfTowerText48;
private CPrivateFastFont pfTowerText72;
private int TowerScoreRank;
// Don medals information
private int[] nEarnedMedalsCount = { 0, 0 };