1
0
mirror of synced 2024-11-24 07:30:21 +01:00

(Pre. v.0.4.3) Parse and display LIFE parameter while playing Tower charts

This commit is contained in:
0aubsq 2021-10-14 02:48:44 +02:00
parent 81058bde0d
commit 818f3966e3
7 changed files with 96 additions and 7 deletions

View File

@ -1185,6 +1185,10 @@ namespace TJAPlayer3
public STDGBVALUE<int> LEVEL;
public bool bLyrics;
public int[] LEVELtaiko = new int[(int)Difficulty.Total] { -1, -1, -1, -1, -1, -1, -1 };
// Tower lifes
public int LIFE;
public Dictionary<int, CAVI> listAVI;
public Dictionary<int, CAVIPAN> listAVIPAN;
public Dictionary<int, CDirectShow> listDS;
@ -4881,6 +4885,11 @@ namespace TJAPlayer3
this.LEVEL.Taiko = level;
this.LEVELtaiko[this.n参照中の難易度] = level;
}
else if (strCommandName.Equals("LIFE"))
{
var life = (int)Convert.ToDouble(strCommandParam);
this.LIFE = life;
}
else if (strCommandName.Equals("BPM"))
{
if (strCommandParam.IndexOf(",") != -1)

View File

@ -203,9 +203,12 @@ namespace TJAPlayer3
{
c曲リストード.strジャンル = c曲リストード.r親ード.strジャンル;
}
c曲リストード.nLevel = dtx.LEVELtaiko;
switch (c曲リストード.strジャンル)
c曲リストード.nLevel = dtx.LEVELtaiko;
// LIFE here
c曲リストード.nLife = dtx.LIFE;
switch (c曲リストード.strジャンル)
{
case "J-POP":
c曲リストード.strジャンル = "ポップス";
@ -949,7 +952,12 @@ namespace TJAPlayer3
c曲リストード.arスコア[ i ]..nレベル[4] = cdtx.LEVELtaiko[4];
c曲リストード.arスコア[i]..nレベル[5] = cdtx.LEVELtaiko[5];
c曲リストード.arスコア[i]..nレベル[6] = cdtx.LEVELtaiko[6];
this.nファイルから反映できたスコア数++;
// Tower Lives
c曲リストード.arスコア[i]..nLife = cdtx.LIFE;
this.nファイルから反映できたスコア数++;
cdtx.On非活性化();
//Debug.WriteLine( "★" + this.nファイルから反映できたスコア数 + " " + c曲リストード.arスコア[ i ].譜面情報.タイトル );
#region [ ]

View File

@ -79,7 +79,10 @@ namespace TJAPlayer3
public string strサブタイトル;
public int[] nレベル;
public int[] nクリア; //0:未クリア 1:クリア 2:フルコンボ 3:ドンダフルコンボ
public int[] nスコアランク; //0:未取得 1:白粋 2:銅粋 3:銀粋 4:金雅 5:桃雅 6:紫雅 7:虹極
public int[] nスコアランク; //0:未取得 1:白粋 2:銅粋 3:銀粋 4:金雅 5:桃雅 6:紫雅 7:虹極
// Tower lifes
public int nLife;
[Serializable]
[StructLayout( LayoutKind.Sequential )]

View File

@ -59,6 +59,10 @@ namespace TJAPlayer3
public string strSkinPath = ""; // #28195 2012.5.4 yyagi; box.defでのスキン切り替え対応
public bool bBranch = false;
public int[] nLevel = new int[(int)Difficulty.Total]{ 0, 0, 0, 0, 0, 0, 0 };
// Tower Lives
public int nLife = 5;
public string[] strBoxText = new string[3];
public Eジャンル eジャンル = Eジャンル.None;

View File

@ -670,6 +670,9 @@ namespace TJAPlayer3
{
if (TJAPlayer3.ConfigIni.nPlayerCount == 1)
{
// Init tower variables
CFloorManagement.reinitialize(this.r現在選択中の曲.arスコア[(int)Difficulty.Tower]..nLife);
TJAPlayer3.Skin.sound決定音.t再生する();
this.t曲を選択する();
}

View File

@ -379,7 +379,7 @@ namespace TJAPlayer3
}
#endregion
// Soul fire here
if(TJAPlayer3.Tx.Gauge_Soul_Fire != null )
{
//仮置き

View File

@ -6,6 +6,21 @@ using static TJAPlayer3.CActSelect曲リスト;
namespace TJAPlayer3
{
// Small static class which refers to the latest encountered floor, would allow more control later
static internal class CFloorManagement
{
public static void reinitialize(int life)
{
CFloorManagement.LastRegisteredFloor = 1;
CFloorManagement.MaxNumberOfLives = life;
CFloorManagement.CurrentNumberOfLives = life;
}
public static int LastRegisteredFloor = 1;
public static int MaxNumberOfLives = 5;
public static int CurrentNumberOfLives = 5;
}
internal class CAct演奏Drums背景 : CActivity
{
// 本家っぽい背景を表示させるメソッド。
@ -54,6 +69,8 @@ namespace TJAPlayer3
this.ttkTouTatsuKaiSuu = new TitleTextureKey("到達階数", pfTowerText, Color.White, Color.Black, 700);
this.ttkKai = new TitleTextureKey("階", pfTowerText, Color.White, Color.Black, 700);
this.ct炎 = new CCounter(0, 6, 50, TJAPlayer3.Timer);
base.On活性化();
}
@ -328,9 +345,13 @@ namespace TJAPlayer3
TJAPlayer3.stage選曲.act曲リスト.ResolveTitleTexture(ttkTouTatsuKaiSuu).t2D描画(TJAPlayer3.app.Device, 550, 32);
TJAPlayer3.stage選曲.act曲リスト.ResolveTitleTexture(ttkKai).t2D描画(TJAPlayer3.app.Device, 750, 104);
this.ct炎.t進行Loop();
#region [Floor number]
string floorStr = TJAPlayer3.stage演奏ドラム画面.actPlayInfo.NowMeasure[0].ToString();
CFloorManagement.LastRegisteredFloor = TJAPlayer3.stage演奏ドラム画面.actPlayInfo.NowMeasure[0] + 1;
string floorStr = CFloorManagement.LastRegisteredFloor.ToString();
int len = floorStr.Length;
@ -350,6 +371,45 @@ namespace TJAPlayer3
digitLength, TJAPlayer3.Tx.Taiko_Combo[0].szテクスチャサイズ.Height));
}
#endregion
#region [Life Tamashii icon]
int baseX = 886;
int baseY = 22;
TJAPlayer3.Tx.Gauge_Soul_Fire?.t2D描画(TJAPlayer3.app.Device, baseX, baseY, new Rectangle(230 * (this.ct炎.n現在の値), 0, 230, 230));
TJAPlayer3.Tx.Gauge_Soul?.t2D描画(TJAPlayer3.app.Device, baseX + 72, baseY + 73, new Rectangle(0, 0, 80, 80));
#endregion
#region [Life number]
string lifeStr = CFloorManagement.CurrentNumberOfLives.ToString();
len = lifeStr.Length;
bool lifeSpecialCase = CFloorManagement.CurrentNumberOfLives == 1 && CFloorManagement.MaxNumberOfLives != 1;
float lifeRatio = CFloorManagement.CurrentNumberOfLives / (float)CFloorManagement.MaxNumberOfLives;
Color4 lifeColor = (lifeRatio > 0.5f && !lifeSpecialCase) ? new Color4(0.2f, 1f, 0.2f)
: ((lifeRatio >= 0.2f && !lifeSpecialCase) ? new Color4(1f, 1f, 0.2f)
: new Color4(1f, 0.2f, 0.2f));
TJAPlayer3.Tx.Taiko_Combo[0].color4 = lifeColor;
TJAPlayer3.Tx.Taiko_Combo[0].vc拡大縮小倍率.X = 1.1f;
TJAPlayer3.Tx.Taiko_Combo[0].vc拡大縮小倍率.Y = 1.1f;
for (int idx = 0; idx < len; idx++)
{
int currentNum = int.Parse(lifeStr[len - idx - 1].ToString());
TJAPlayer3.Tx.Taiko_Combo[0].t2D描画(TJAPlayer3.app.Device, 996 + ((digitLength - 8) * (len - idx) * 1.1f),
106,
new Rectangle(digitLength * currentNum, 0,
digitLength, TJAPlayer3.Tx.Taiko_Combo[0].szテクスチャサイズ.Height));
}
TJAPlayer3.Tx.Taiko_Combo[0].color4 = new Color4(1f, 1f, 1f);
#endregion
@ -443,6 +503,8 @@ namespace TJAPlayer3
private TitleTextureKey ttkKai;
private CPrivateFastFont pfTowerText;
private CCounter ct炎;
private EFIFOモード eFadeMode;
//-----------------
#endregion