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

Coin plate for 2P and Score ranks for Towers

This commit is contained in:
0aubsq 2021-12-25 00:19:46 +01:00
parent ba111f64f4
commit 05a9369e32
4 changed files with 199 additions and 77 deletions

View File

@ -183,6 +183,8 @@ namespace TJAPlayer3
#region 3_
SongSelect_Background = TxC(SONGSELECT + @"Background.png");
SongSelect_Header = TxC(SONGSELECT + @"Header.png");
SongSelect_Coin_Slot = TxC(SONGSELECT + @"Coin_Slot.png");
SongSelect_Auto = TxC(SONGSELECT + @"Auto.png");
SongSelect_Level = TxC(SONGSELECT + @"Level.png");
SongSelect_Branch = TxC(SONGSELECT + @"Branch.png");
@ -828,6 +830,8 @@ namespace TJAPlayer3
TowerResult_Background = TxC(TOWERRESULT + @"Background.png");
TowerResult_Panel = TxC(TOWERRESULT + @"Panel.png");
TowerResult_ScoreRankEffect = TxC(TOWERRESULT + @"ScoreRankEffect.png");
for (int i = 0; i < TJAPlayer3.Skin.Game_Tower_Ptn_Result; i++)
{
TowerResult_Tower[i] = TxC(TOWERRESULT + @"Tower\" + i.ToString() + ".png");
@ -1319,6 +1323,7 @@ namespace TJAPlayer3
public CTexture SongSelect_Background,
SongSelect_Header,
SongSelect_Coin_Slot,
SongSelect_Auto,
SongSelect_Level,
SongSelect_Branch,
@ -1655,6 +1660,7 @@ namespace TJAPlayer3
#region [8_TowerResults]
public CTexture TowerResult_Background,
TowerResult_ScoreRankEffect,
TowerResult_Panel;
public CTexture[]
TowerResult_Tower;

View File

@ -417,8 +417,12 @@ namespace TJAPlayer3
double dbY表示割合 = Math.Sin(Math.PI / 2 * db登場割合);
y = ((int)(TJAPlayer3.Tx.SongSelect_Header.sz画像サイズ.Height * dbY表示割合)) - TJAPlayer3.Tx.SongSelect_Header.sz画像サイズ.Height;
}
if (TJAPlayer3.Tx.SongSelect_Header != null)
TJAPlayer3.Tx.SongSelect_Header.t2D描画(TJAPlayer3.app.Device, 0, 0);
TJAPlayer3.Tx.SongSelect_Header?.t2D描画(TJAPlayer3.app.Device, 0, 0);
TJAPlayer3.Tx.SongSelect_Coin_Slot?.t2D描画(TJAPlayer3.app.Device, 0, 0,
new Rectangle(0, 0, 640 + ((TJAPlayer3.ConfigIni.nPlayerCount > 1) ? 640 : 0), 720));
tTimerDraw((100 - ctTimer.n現在の値).ToString());

View File

@ -39,84 +39,196 @@ namespace TJAPlayer3
base.On非活性化();
}
private void displayScoreRank(int i, int player, float x, int mode = 0)
{
CCounter cct = this.counter[i];
if (player == 1)
cct = this.counterJ2[i];
CTexture tex = TJAPlayer3.Tx.ScoreRank;
if (mode == 1) // tower
tex = TJAPlayer3.Tx.TowerResult_ScoreRankEffect;
if (tex == null)
return;
if (!cct.b進行中)
{
cct.t開始(0, 3000, 1, TJAPlayer3.Timer);
}
if (cct.n現在の値 <= 255)
{
tex.Opacity = cct.n現在の値;
x = 51 - (cct.n現在の値 / 5.0f);
}
if (cct.n現在の値 > 255 && cct.n現在の値 <= 255 + 180)
{
tex.Opacity = 255;
float newSize = 1.0f + (float)Math.Sin((cct.n現在の値 - 255) * (Math.PI / 180)) * 0.2f;
tex.vc拡大縮小倍率.X = newSize;
tex.vc拡大縮小倍率.Y = newSize;
x = 0;
}
if (cct.n現在の値 > 255 + 180 && cct.n現在の値 <= 2745)
{
tex.Opacity = 255;
tex.vc拡大縮小倍率.X = 1.0f;
tex.vc拡大縮小倍率.Y = 1.0f;
x = 0;
}
if (cct.n現在の値 >= 2745 && cct.n現在の値 <= 3000)
{
tex.Opacity = 255 - ((cct.n現在の値 - 2745));
x = -((cct.n現在の値 - 2745) / 5.0f);
}
var ypos = (player == 0) ? 98 + (int)x : 720 - (98 + (int)x);
if (mode == 0)
tex.t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, 87, ypos, new System.Drawing.Rectangle(0, i == 0 ? i * 114 : i * 120, 140, i == 0 ? 114 : 120));
else if (mode == 1 && player == 0)
tex.t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, 87, ypos, new System.Drawing.Rectangle(i * 229, 0, 229, 194));
}
public override int On進行描画()
{
if(TJAPlayer3.stage選曲.n確定された曲の難易度[0] != (int)Difficulty.Dan && TJAPlayer3.stage選曲.n確定された曲の難易度[0] != (int)Difficulty.Tower)
if (TJAPlayer3.stage選曲.n確定された曲の難易度[0] != (int)Difficulty.Dan)
{
float x = 0;
for (int i = 0; i < 7; i++)
{
counter[i].t進行();
if (TJAPlayer3.stage演奏ドラム画面.actScore.GetScore(0) >= ScoreRank[i])
{
if (!this.counter[i].b進行中)
{
this.counter[i].t開始(0, 3000, 1, TJAPlayer3.Timer);
}
if (counter[i].n現在の値 <= 255)
{
TJAPlayer3.Tx.ScoreRank.Opacity = counter[i].n現在の値;
x = 51 - (counter[i].n現在の値 / 5.0f);
}
if (counter[i].n現在の値 > 255 && counter[i].n現在の値 <= 255 + 180)
{
TJAPlayer3.Tx.ScoreRank.Opacity = 255;
TJAPlayer3.Tx.ScoreRank.vc拡大縮小倍率.X = 1.0f + (float)Math.Sin((counter[i].n現在の値 - 255) * (Math.PI / 180)) * 0.2f;
TJAPlayer3.Tx.ScoreRank.vc拡大縮小倍率.Y = 1.0f + (float)Math.Sin((counter[i].n現在の値 - 255) * (Math.PI / 180)) * 0.2f;
x = 0;
}
if (counter[i].n現在の値 > 255 + 180 && counter[i].n現在の値 <= 2745)
{
TJAPlayer3.Tx.ScoreRank.Opacity = 255;
TJAPlayer3.Tx.ScoreRank.vc拡大縮小倍率.X = 1.0f;
TJAPlayer3.Tx.ScoreRank.vc拡大縮小倍率.Y = 1.0f;
x = 0;
}
if (counter[i].n現在の値 >= 2745 && counter[i].n現在の値 <= 3000)
{
TJAPlayer3.Tx.ScoreRank.Opacity = 255 - ((counter[i].n現在の値 - 2745));
x = -((counter[i].n現在の値 - 2745) / 5.0f);
}
TJAPlayer3.Tx.ScoreRank.t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, 87, 98 + (int)x, new System.Drawing.Rectangle(0, i == 0 ? i * 114 : i * 120, 140, i == 0 ? 114 : 120));
}
x = 0;
counterJ2[i].t進行();
if (TJAPlayer3.stage演奏ドラム画面.actScore.GetScore(1) >= ScoreRank2P[i])
{
if (!this.counterJ2[i].b進行中)
{
this.counterJ2[i].t開始(0, 3000, 1, TJAPlayer3.Timer);
}
if (counterJ2[i].n現在の値 <= 255)
{
TJAPlayer3.Tx.ScoreRank.Opacity = counterJ2[i].n現在の値;
x = 51 - (counterJ2[i].n現在の値 / 5.0f);
}
if (counterJ2[i].n現在の値 > 255 && counterJ2[i].n現在の値 <= 255 + 180)
{
TJAPlayer3.Tx.ScoreRank.Opacity = 255;
TJAPlayer3.Tx.ScoreRank.vc拡大縮小倍率.X = 1.0f + (float)Math.Sin((counterJ2[i].n現在の値 - 255) * (Math.PI / 180)) * 0.2f;
TJAPlayer3.Tx.ScoreRank.vc拡大縮小倍率.Y = 1.0f + (float)Math.Sin((counterJ2[i].n現在の値 - 255) * (Math.PI / 180)) * 0.2f;
x = 0;
}
if (counterJ2[i].n現在の値 > 255 + 180 && counterJ2[i].n現在の値 <= 2745)
{
TJAPlayer3.Tx.ScoreRank.Opacity = 255;
TJAPlayer3.Tx.ScoreRank.vc拡大縮小倍率.X = 1.0f;
TJAPlayer3.Tx.ScoreRank.vc拡大縮小倍率.Y = 1.0f;
x = 0;
}
if (counterJ2[i].n現在の値 >= 2745 && counterJ2[i].n現在の値 <= 3000)
{
TJAPlayer3.Tx.ScoreRank.Opacity = 255 - ((counterJ2[i].n現在の値 - 2745));
x = -((counterJ2[i].n現在の値 - 2745) / 5.0f);
}
TJAPlayer3.Tx.ScoreRank.t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, 87, 720 - (98 + (int)x), new System.Drawing.Rectangle(0, i == 0 ? i * 114 : i * 120, 140, i == 0 ? 114 : 120));
}
}
for (int i = 0; i < 7; i++)
{
if (TJAPlayer3.stage選曲.n確定された曲の難易度[0] != (int)Difficulty.Tower)
{
#region [Ensou score ranks]
counter[i].t進行();
if (TJAPlayer3.stage演奏ドラム画面.actScore.GetScore(0) >= ScoreRank[i])
{
displayScoreRank(i, 0, x);
#region [Legacy]
/*
if (!this.counter[i].b進行中)
{
this.counter[i].t開始(0, 3000, 1, TJAPlayer3.Timer);
}
if (counter[i].n現在の値 <= 255)
{
TJAPlayer3.Tx.ScoreRank.Opacity = counter[i].n現在の値;
x = 51 - (counter[i].n現在の値 / 5.0f);
}
if (counter[i].n現在の値 > 255 && counter[i].n現在の値 <= 255 + 180)
{
TJAPlayer3.Tx.ScoreRank.Opacity = 255;
TJAPlayer3.Tx.ScoreRank.vc拡大縮小倍率.X = 1.0f + (float)Math.Sin((counter[i].n現在の値 - 255) * (Math.PI / 180)) * 0.2f;
TJAPlayer3.Tx.ScoreRank.vc拡大縮小倍率.Y = 1.0f + (float)Math.Sin((counter[i].n現在の値 - 255) * (Math.PI / 180)) * 0.2f;
x = 0;
}
if (counter[i].n現在の値 > 255 + 180 && counter[i].n現在の値 <= 2745)
{
TJAPlayer3.Tx.ScoreRank.Opacity = 255;
TJAPlayer3.Tx.ScoreRank.vc拡大縮小倍率.X = 1.0f;
TJAPlayer3.Tx.ScoreRank.vc拡大縮小倍率.Y = 1.0f;
x = 0;
}
if (counter[i].n現在の値 >= 2745 && counter[i].n現在の値 <= 3000)
{
TJAPlayer3.Tx.ScoreRank.Opacity = 255 - ((counter[i].n現在の値 - 2745));
x = -((counter[i].n現在の値 - 2745) / 5.0f);
}
TJAPlayer3.Tx.ScoreRank.t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, 87, 98 + (int)x, new System.Drawing.Rectangle(0, i == 0 ? i * 114 : i * 120, 140, i == 0 ? 114 : 120));
*/
#endregion
}
x = 0;
counterJ2[i].t進行();
if (TJAPlayer3.stage演奏ドラム画面.actScore.GetScore(1) >= ScoreRank2P[i])
{
displayScoreRank(i, 1, x);
#region [Legacy]
/*
if (!this.counterJ2[i].b進行中)
{
this.counterJ2[i].t開始(0, 3000, 1, TJAPlayer3.Timer);
}
if (counterJ2[i].n現在の値 <= 255)
{
TJAPlayer3.Tx.ScoreRank.Opacity = counterJ2[i].n現在の値;
x = 51 - (counterJ2[i].n現在の値 / 5.0f);
}
if (counterJ2[i].n現在の値 > 255 && counterJ2[i].n現在の値 <= 255 + 180)
{
TJAPlayer3.Tx.ScoreRank.Opacity = 255;
TJAPlayer3.Tx.ScoreRank.vc拡大縮小倍率.X = 1.0f + (float)Math.Sin((counterJ2[i].n現在の値 - 255) * (Math.PI / 180)) * 0.2f;
TJAPlayer3.Tx.ScoreRank.vc拡大縮小倍率.Y = 1.0f + (float)Math.Sin((counterJ2[i].n現在の値 - 255) * (Math.PI / 180)) * 0.2f;
x = 0;
}
if (counterJ2[i].n現在の値 > 255 + 180 && counterJ2[i].n現在の値 <= 2745)
{
TJAPlayer3.Tx.ScoreRank.Opacity = 255;
TJAPlayer3.Tx.ScoreRank.vc拡大縮小倍率.X = 1.0f;
TJAPlayer3.Tx.ScoreRank.vc拡大縮小倍率.Y = 1.0f;
x = 0;
}
if (counterJ2[i].n現在の値 >= 2745 && counterJ2[i].n現在の値 <= 3000)
{
TJAPlayer3.Tx.ScoreRank.Opacity = 255 - ((counterJ2[i].n現在の値 - 2745));
x = -((counterJ2[i].n現在の値 - 2745) / 5.0f);
}
TJAPlayer3.Tx.ScoreRank.t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, 87, 720 - (98 + (int)x), new System.Drawing.Rectangle(0, i == 0 ? i * 114 : i * 120, 140, i == 0 ? 114 : 120));
*/
#endregion
}
#endregion
}
else if (TJAPlayer3.stage選曲.n確定された曲の難易度[0] == (int)Difficulty.Tower)
{
#region [Tower score ranks]
double progress = CFloorManagement.LastRegisteredFloor / (double)TJAPlayer3.stage選曲.r確定された曲.arスコア[5]..nTotalFloor;
bool[] conditions =
{
progress >= 0.1,
progress >= 0.25,
progress >= 0.5,
progress >= 0.75,
progress == 1 && CFloorManagement.CurrentNumberOfLives > 0,
TJAPlayer3.stage演奏ドラム画面.CChartScore[0].nMiss == 0,
TJAPlayer3.stage演奏ドラム画面.CChartScore[0].nGood == 0
};
counter[i].t進行();
bool satisfied = true;
for (int j = 0; j <= i; j++)
if (conditions[j] == false)
{
satisfied = false;
break;
}
if (satisfied == true)
{
displayScoreRank(i, 0, x, 1);
}
#endregion
}
}
}
//TJAPlayer3.act文字コンソール.tPrint(0, 0, C文字コンソール.Eフォント種別.白, ScoreRank[6].ToString());

View File

@ -1372,7 +1372,7 @@ namespace TJAPlayer3
progress >= 0.25,
progress >= 0.5,
progress >= 0.75,
CFloorManagement.CurrentNumberOfLives > 0,
progress == 1 && CFloorManagement.CurrentNumberOfLives > 0,
this.st演奏記録.Drums.nMiss数 == 0,
this.st演奏記録.Drums.nGreat数 == 0
};