1
0
mirror of synced 2025-01-19 01:24:08 +01:00

(Pre. v0.5.0) Store the number of the roof floor and display the top section while reaching it in-game, fix multiple counter/animations bugs

This commit is contained in:
0aubsq 2021-10-16 21:22:04 +02:00
parent b00547a96c
commit 1c9f9aed45
6 changed files with 67 additions and 18 deletions

View File

@ -4887,6 +4887,7 @@ namespace TJAPlayer3
}
else if (strCommandName.Equals("LIFE"))
{
// LIFE here
var life = (int)Convert.ToDouble(strCommandParam);
this.LIFE = life;
}

View File

@ -208,6 +208,19 @@ namespace TJAPlayer3
// LIFE here
c曲リストード.nLife = dtx.LIFE;
// Total count of floors for a tower chart
c曲リストード.nTotalFloor = 0;
for (int i = 0; i < dtx.listChip.Count; i++)
{
CDTX.CChip pChip = dtx.listChip[i];
if (pChip.n整数値_内部番号 > c曲リストード.nTotalFloor && pChip.nチャンネル番号 == 0x50) c曲リストード.nTotalFloor = pChip.n整数値_内部番号;
}
c曲リストード.nTotalFloor++;
switch (c曲リストード.strジャンル)
{
case "J-POP":
@ -953,8 +966,19 @@ namespace TJAPlayer3
c曲リストード.arスコア[i]..nレベル[5] = cdtx.LEVELtaiko[5];
c曲リストード.arスコア[i]..nレベル[6] = cdtx.LEVELtaiko[6];
// Tower Lives
c曲リストード.arスコア[i]..nLife = cdtx.LIFE;
// Tower Lives
c曲リストード.arスコア[i]..nLife = cdtx.LIFE;
c曲リストード.arスコア[i]..nTotalFloor = 0;
for (int k = 0; k < cdtx.listChip.Count; k++)
{
CDTX.CChip pChip = cdtx.listChip[k];
if (pChip.n整数値_内部番号 > c曲リストード.arスコア[i]..nTotalFloor && pChip.nチャンネル番号 == 0x50)
c曲リストード.arスコア[i]..nTotalFloor = pChip.n整数値_内部番号;
}
c曲リストード.arスコア[i]..nTotalFloor++;
this.nファイルから反映できたスコア数++;

View File

@ -83,6 +83,7 @@ namespace TJAPlayer3
// Tower lifes
public int nLife;
public int nTotalFloor;
[Serializable]
[StructLayout( LayoutKind.Sequential )]
@ -313,6 +314,9 @@ namespace TJAPlayer3
this..nレベル = new int[(int)Difficulty.Total] { -1, -1, -1, -1, -1, -1, -1};
this..nクリア = new int[5];
this..nスコアランク = new int[5];
this..nLife = 5;
this..nTotalFloor = 140;
}
}
}

View File

@ -62,6 +62,7 @@ namespace TJAPlayer3
// Tower Lives
public int nLife = 5;
public int nTotalFloor = 140;
public string[] strBoxText = new string[3];
public Eジャンル eジャンル = Eジャンル.None;

View File

@ -2009,6 +2009,7 @@ namespace TJAPlayer3
}
}
// To investigate
for ( int j = 0; j < 3; j++ )
this.stバー情報[ i ].nスキル値[ j ] = (int) song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ]..[ j ];

View File

@ -161,7 +161,7 @@ namespace TJAPlayer3
this.ctSlideAnimation = new CCounter();
this.ctClimbAnimation = new CCounter();
this.ctDonAnimation = new CCounter(0, 1000, 24000f / (float)TJAPlayer3.stage演奏ドラム画面.actPlayInfo.dbBPM, TJAPlayer3.Timer);
this.ctDonAnimation = new CCounter(0, 1000, 24000f / ((float)TJAPlayer3.stage演奏ドラム画面.actPlayInfo.dbBPM * TJAPlayer3.ConfigIni.n演奏速度 / 20), TJAPlayer3.Timer);
base.OnManagedリソースの作成();
}
@ -233,7 +233,10 @@ namespace TJAPlayer3
this.bFloorChanged = CFloorManagement.LastRegisteredFloor > 0 && (CFloorManagement.LastRegisteredFloor < TJAPlayer3.stage演奏ドラム画面.actPlayInfo.NowMeasure[0] + 1);
currentFloorPositionMax140 = Math.Min(TJAPlayer3.stage演奏ドラム画面.actPlayInfo.NowMeasure[0] / 140f, 1f);
int maxFloor = TJAPlayer3.stage選曲.r確定された曲.arスコア[5]..nTotalFloor;
int nightTime = Math.Max(140, maxFloor / 2);
currentFloorPositionMax140 = Math.Min(TJAPlayer3.stage演奏ドラム画面.actPlayInfo.NowMeasure[0] / (float)nightTime, 1f);
#endregion
@ -560,20 +563,23 @@ namespace TJAPlayer3
#endregion
#region [Lower background]
if (TJAPlayer3.stage選曲.n確定された曲の難易度[0] == (int)Difficulty.Tower)
{
int maxFloor = TJAPlayer3.stage選曲.r確定された曲.arスコア[5]..nTotalFloor;
TJAPlayer3.act文字コンソール.tPrint(0, 0, C文字コンソール.Eフォント種別., maxFloor.ToString());
int nightTime = Math.Max(140, maxFloor / 2);
#region [Tower lower background]
float nextPositionMax140 = Math.Min((TJAPlayer3.stage演奏ドラム画面.actPlayInfo.NowMeasure[0] + 1) / 140f, 1f);
float nextPositionMax140 = Math.Min((TJAPlayer3.stage演奏ドラム画面.actPlayInfo.NowMeasure[0] + 1) / (float)nightTime, 1f);
if (bFloorChanged == true)
ctSlideAnimation.t開始(0, 1000, 120f / (float)TJAPlayer3.stage演奏ドラム画面.actPlayInfo.dbBPM, TJAPlayer3.Timer);
ctSlideAnimation.t開始(0, 1000, 120f / ((float)TJAPlayer3.stage演奏ドラム画面.actPlayInfo.dbBPM * TJAPlayer3.ConfigIni.n演奏速度 / 20), TJAPlayer3.Timer);
float progressFactor = (nextPositionMax140 - currentFloorPositionMax140) * (ctSlideAnimation.n現在の値 / 1000f);
@ -609,19 +615,31 @@ namespace TJAPlayer3
int heightChange = (int)(progressFactor * 288f);
// Current trunk
TJAPlayer3.Tx.Tower_Base[currentTower][towerBase]?.t2D下中央基準描画(TJAPlayer3.app.Device, 640, 676 + heightChange); // 316 + 360
if (TJAPlayer3.stage演奏ドラム画面.actPlayInfo.NowMeasure[0] < maxFloor)
TJAPlayer3.Tx.Tower_Base[currentTower][towerBase]?.t2D下中央基準描画(TJAPlayer3.app.Device, 640, 676 + heightChange); // 316 + 360
else
TJAPlayer3.Tx.Tower_Top[currentTower]?.t2D下中央基準描画(TJAPlayer3.app.Device, 640, 676 + heightChange);
// Current deco
TJAPlayer3.Tx.Tower_Deco[currentTower][currentDeco]?.t2D下中央基準描画(TJAPlayer3.app.Device, 460, 640 + heightChange);
// Next trunk
TJAPlayer3.Tx.Tower_Base[currentTower][nextTowerBase]?.t2D下中央基準描画(TJAPlayer3.app.Device, 640, 388 + heightChange, // Current - 288
new Rectangle(0, 288 - heightChange,
TJAPlayer3.Tx.Tower_Base[currentTower][nextTowerBase].szテクスチャサイズ.Width,
Math.Min(TJAPlayer3.Tx.Tower_Base[currentTower][nextTowerBase].szテクスチャサイズ.Height, heightChange + 28)));
// Next deco
if (heightChange > 46)
// Next trunk
if (TJAPlayer3.stage演奏ドラム画面.actPlayInfo.NowMeasure[0] + 1 < maxFloor)
TJAPlayer3.Tx.Tower_Base[currentTower][nextTowerBase]?.t2D下中央基準描画(TJAPlayer3.app.Device, 640, 388 + heightChange, // Current - 288
new Rectangle(0, 288 - heightChange,
TJAPlayer3.Tx.Tower_Base[currentTower][nextTowerBase].szテクスチャサイズ.Width,
Math.Min(TJAPlayer3.Tx.Tower_Base[currentTower][nextTowerBase].szテクスチャサイズ.Height, heightChange + 28)));
else if (TJAPlayer3.stage演奏ドラム画面.actPlayInfo.NowMeasure[0] + 1 == maxFloor)
{
TJAPlayer3.Tx.Tower_Top[currentTower]?.t2D下中央基準描画(TJAPlayer3.app.Device, 640, 388 + heightChange, // Current - 288
new Rectangle(0, 351 - heightChange,
TJAPlayer3.Tx.Tower_Top[currentTower].szテクスチャサイズ.Width,
Math.Min(TJAPlayer3.Tx.Tower_Top[currentTower].szテクスチャサイズ.Height, heightChange + 28)));
}
// Next deco
if (heightChange > 46 && TJAPlayer3.stage演奏ドラム画面.actPlayInfo.NowMeasure[0] + 1 <= maxFloor)
TJAPlayer3.Tx.Tower_Deco[currentTower][nextDeco]?.t2D下中央基準描画(TJAPlayer3.app.Device, 460, 352 + heightChange);
@ -634,8 +652,8 @@ namespace TJAPlayer3
if (bFloorChanged == true)
{
ctClimbAnimation.t開始(0, 1500, 120f / (float)TJAPlayer3.stage演奏ドラム画面.actPlayInfo.dbBPM, TJAPlayer3.Timer);
ctDonAnimation.t開始(0, 1000, 24000f / (float)TJAPlayer3.stage演奏ドラム画面.actPlayInfo.dbBPM, TJAPlayer3.Timer);
ctClimbAnimation.t開始(0, 1500, 120f / ((float)TJAPlayer3.stage演奏ドラム画面.actPlayInfo.dbBPM * TJAPlayer3.ConfigIni.n演奏速度 / 20), TJAPlayer3.Timer);
ctDonAnimation.t開始(0, 1000, 24000f / ((float)TJAPlayer3.stage演奏ドラム画面.actPlayInfo.dbBPM * TJAPlayer3.ConfigIni.n演奏速度 / 20), TJAPlayer3.Timer);
}