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

2P update part 1

This commit is contained in:
0aubsq 2021-12-10 02:08:35 +01:00
parent f60e435916
commit df8384be9d
15 changed files with 57 additions and 28 deletions

View File

@ -26,8 +26,11 @@ namespace TJAPlayer3
return;
for (int i = 0; i < 2; i++)
data.Medals[i] += amounts[i];
{
int p = TJAPlayer3.GetActualPlayer(i);
data.Medals[p] += amounts[i];
}
tSaveFile();
}

View File

@ -391,6 +391,15 @@ namespace TJAPlayer3
// 0 : Hidari, 1 : Migi (1P only)
public static int PlayerSide = 0;
public static int GetActualPlayer(int player)
{
if (SaveFile == 0)
return player;
if (player == 0)
return 1;
return 0;
}
#endregion
// コンストラクタ

View File

@ -395,11 +395,12 @@ namespace TJAPlayer3
#endregion
#region
Taiko_Background = new CTexture[4];
Taiko_Background = new CTexture[5];
Taiko_Background[0] = TxC(GAME + TAIKO + @"1P_Background.png");
Taiko_Background[1] = TxC(GAME + TAIKO + @"2P_Background.png");
Taiko_Background[2] = TxC(GAME + TAIKO + @"Dan_Background.png");
Taiko_Background[3] = TxC(GAME + TAIKO + @"Tower_Background.png");
Taiko_Background[4] = TxC(GAME + TAIKO + @"1P_Background_Right.png");
Taiko_Frame = new CTexture[3];
Taiko_Frame[0] = TxC(GAME + TAIKO + @"1P_Frame.png");
Taiko_Frame[1] = TxC(GAME + TAIKO + @"2P_Frame.png");

View File

@ -203,6 +203,8 @@ namespace TJAPlayer3
TJAPlayer3.SaveFile = 0;
this.ctバナパス読み込み待機.t開始(0, 600, 1, TJAPlayer3.Timer);
this.ctバナパス読み込み待機.n現在の値 = (int)this.ctバナパス読み込み待機.n終了値;
for (int i = 0; i < 2; i++)
TJAPlayer3.NamePlate.tNamePlateRefreshTitles(i);
}
else if (TJAPlayer3.Pad.b押された(E楽器パート.DRUMS, Eパッド.RRed2P) || TJAPlayer3.Pad.b押された(E楽器パート.DRUMS, Eパッド.LRed2P))
{
@ -210,6 +212,8 @@ namespace TJAPlayer3
TJAPlayer3.SaveFile = 1;
this.ctバナパス読み込み待機.t開始(0, 600, 1, TJAPlayer3.Timer);
this.ctバナパス読み込み待機.n現在の値 = (int)this.ctバナパス読み込み待機.n終了値;
for (int i = 0; i < 2; i++)
TJAPlayer3.NamePlate.tNamePlateRefreshTitles(i);
}
else
{

View File

@ -1469,7 +1469,8 @@ namespace TJAPlayer3
TJAPlayer3.ConfigIni.nRollsPerSec = this.iRollsPerSec.n現在の値;
TJAPlayer3.ConfigIni.nAILevel = this.iAILevel.n現在の値;
TJAPlayer3.NamePlate.tNamePlateRefreshTitles(1);
for (int i = 0; i < 2; i++)
TJAPlayer3.NamePlate.tNamePlateRefreshTitles(i);
TJAPlayer3.ConfigIni.n譜面スクロール速度.Drums = this.iDrumsScrollSpeed.n現在の値;

View File

@ -944,11 +944,13 @@ namespace TJAPlayer3
}
if (TJAPlayer3.NamePlateConfig.data.Medals[0] >= 0)
tBoardNumberDraw(this.ptBoardNumber[10].X - 10, this.ptBoardNumber[10].Y, TJAPlayer3.NamePlateConfig.data.Medals[0].ToString());
for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{
int p = TJAPlayer3.GetActualPlayer(i);
if (TJAPlayer3.NamePlateConfig.data.Medals[1] >= 0 && TJAPlayer3.ConfigIni.nPlayerCount > 1)
tBoardNumberDraw(this.ptBoardNumber[10].X - 10 + 1140, this.ptBoardNumber[10].Y, TJAPlayer3.NamePlateConfig.data.Medals[1].ToString());
if (TJAPlayer3.NamePlateConfig.data.Medals[p] >= 0)
tBoardNumberDraw(this.ptBoardNumber[10].X - 10 + i * 1140, this.ptBoardNumber[10].Y, TJAPlayer3.NamePlateConfig.data.Medals[p].ToString());
}
#endregion

View File

@ -2907,7 +2907,9 @@ namespace TJAPlayer3
ctChipAnime[i] = new CCounter(0, 3, 60.0 / TJAPlayer3.stage演奏ドラム画面.actPlayInfo.dbBPM * 1 / 4 / (((double)TJAPlayer3.ConfigIni.n演奏速度) / 20.0), CSound管理.rc演奏用タイマ);
}
int chara = Math.Max(0, Math.Min(TJAPlayer3.NamePlateConfig.data.Character[nPlayer], TJAPlayer3.Skin.Characters_Ptn - 1));
int p = TJAPlayer3.GetActualPlayer(nPlayer);
int chara = Math.Max(0, Math.Min(TJAPlayer3.NamePlateConfig.data.Character[p], TJAPlayer3.Skin.Characters_Ptn - 1));
if (TJAPlayer3.Skin.Characters_Normal_Ptn[chara] != 0)
{
@ -3109,7 +3111,9 @@ namespace TJAPlayer3
ctChipAnime[i] = new CCounter(0, 3, 60.0 / TJAPlayer3.stage演奏ドラム画面.actPlayInfo.dbBPM * 1 / 4, CSound管理.rc演奏用タイマ);
}
int chara = Math.Max(0, Math.Min(TJAPlayer3.NamePlateConfig.data.Character[nPlayer], TJAPlayer3.Skin.Characters_Ptn - 1));
int p = TJAPlayer3.GetActualPlayer(nPlayer);
int chara = Math.Max(0, Math.Min(TJAPlayer3.NamePlateConfig.data.Character[p], TJAPlayer3.Skin.Characters_Ptn - 1));
if (TJAPlayer3.Skin.Characters_Normal_Ptn[chara] != 0)
{

View File

@ -92,7 +92,7 @@ namespace TJAPlayer3
if (TJAPlayer3.stage演奏ドラム画面.bDoublePlay)
TJAPlayer3.Tx.Taiko_Background[1]?.t2D描画(TJAPlayer3.app.Device, 0, 360);
if (TJAPlayer3.PlayerSide == 1 && TJAPlayer3.ConfigIni.nPlayerCount == 1)
TJAPlayer3.Tx.Taiko_Background[1]?.t2D描画(TJAPlayer3.app.Device, 0, 183);
TJAPlayer3.Tx.Taiko_Background[4]?.t2D描画(TJAPlayer3.app.Device, 0, 184);
else
TJAPlayer3.Tx.Taiko_Background[0]?.t2D描画(TJAPlayer3.app.Device, 0, 184);
}

View File

@ -46,7 +46,9 @@ namespace TJAPlayer3
CharaAction_Balloon_Delay[i] = new CCounter();
// Currently used character
this.iCurrentCharacter[i] = Math.Max(0, Math.Min(TJAPlayer3.NamePlateConfig.data.Character[i], TJAPlayer3.Skin.Characters_Ptn - 1));
int p = TJAPlayer3.GetActualPlayer(i);
this.iCurrentCharacter[i] = Math.Max(0, Math.Min(TJAPlayer3.NamePlateConfig.data.Character[p], TJAPlayer3.Skin.Characters_Ptn - 1));
this.b風船連打中[i] = false;
@ -71,16 +73,6 @@ namespace TJAPlayer3
if (balloonMissPtn > 1) CharaAction_Balloon_FadeOut_StartMs[i][1] /= balloonMissPtn - 1; // - 1はタイマー用
}
// ふうせん系アニメーションの総再生時間は画像枚数 x Tick間隔なので、
// フェードアウトの開始タイミングは、総再生時間 - フェードアウト時間。
//var tick = TJAPlayer3.Skin.Game_Chara_Balloon_Timer;
//int[] tick = new int[2] { TJAPlayer3.Skin.Characters_Balloon_Timer[this.iCurrentCharacter[0]], TJAPlayer3.Skin.Characters_Balloon_Timer[this.iCurrentCharacter[1]] };
// Ballon broke values
//var balloonBrokePtn = TJAPlayer3.Skin.Game_Chara_Ptn_Balloon_Broke;
//var balloonMissPtn = TJAPlayer3.Skin.Game_Chara_Ptn_Balloon_Miss;
base.On活性化();
}
@ -138,7 +130,6 @@ namespace TJAPlayer3
{
for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{
int Character = this.iCurrentCharacter[i];
if (TJAPlayer3.Skin.Characters_Ptn == 0)

View File

@ -225,7 +225,9 @@ namespace TJAPlayer3
for(int nPlayer = 0; nPlayer < 2; nPlayer++)
{
int chara = Math.Max(0, Math.Min(TJAPlayer3.NamePlateConfig.data.Character[nPlayer], TJAPlayer3.Skin.Characters_Ptn - 1));
int p = TJAPlayer3.GetActualPlayer(nPlayer);
int chara = Math.Max(0, Math.Min(TJAPlayer3.NamePlateConfig.data.Character[p], TJAPlayer3.Skin.Characters_Ptn - 1));
if (TJAPlayer3.Skin.Characters_Normal_Ptn[chara] != 0)
{

View File

@ -85,7 +85,9 @@ namespace TJAPlayer3
** - Yellow light color filter when isGrowing is true
*/
int puriChar = TJAPlayer3.NamePlateConfig.data.PuchiChara[player];
int p = TJAPlayer3.GetActualPlayer(player);
int puriChar = TJAPlayer3.NamePlateConfig.data.PuchiChara[p];
// To change later
if (puriChar < 0)

View File

@ -229,7 +229,7 @@ namespace TJAPlayer3
TJAPlayer3.NamePlateConfig.tUpdateDanTitle(TJAPlayer3.stage選曲.r確定された曲.strタイトル.Substring(0, 2),
clearValue % 2 == 0,
(clearValue - 1) / 2,
0);
TJAPlayer3.SaveFile);
}
}
else if (TJAPlayer3.stage選曲.n確定された曲の難易度[0] == (int)Difficulty.Tower)

View File

@ -44,7 +44,7 @@ namespace TJAPlayer3
// 1P, configure later for default 2P
iPlayer = 0;
iPlayer = TJAPlayer3.SaveFile;
#region [Main menu]
@ -538,8 +538,10 @@ namespace TJAPlayer3
private void tResetOpts()
{
// Retrieve titles if they exist
iTitleCurrent = 0;
iDanTitleCurrent = 0;
iCharacterCurrent = TJAPlayer3.NamePlateConfig.data.Character[this.iPlayer];
iPuchiCharaCurrent = TJAPlayer3.NamePlateConfig.data.PuchiChara[this.iPlayer];
}

View File

@ -50,13 +50,15 @@ namespace TJAPlayer3
public void tNamePlateRefreshTitles(int player)
{
int actualPlayer = TJAPlayer3.GetActualPlayer(player);
string[] stages = { "初", "二", "三", "四", "五", "六", "七", "八", "九", "極" };
string name = "AIドン";
string title = "デウス・エクス・マキナ";
string dan = stages[Math.Max(0, TJAPlayer3.ConfigIni.nAILevel - 1)] + "面";
if (TJAPlayer3.ConfigIni.nAILevel == 0 || player == 0)
if (TJAPlayer3.ConfigIni.nAILevel == 0 || actualPlayer == 0)
{
name = TJAPlayer3.NamePlateConfig.data.Name[player];
title = TJAPlayer3.NamePlateConfig.data.Title[player];
@ -76,6 +78,9 @@ namespace TJAPlayer3
public void tNamePlateDraw(int x, int y, int player, bool bTitle = false, int Opacity = 255)
{
int basePlayer = player;
player = TJAPlayer3.GetActualPlayer(player);
ctNamePlateEffect.t進行Loop();
ctAnimatedNamePlateTitle.t進行Loop();
@ -190,7 +195,10 @@ namespace TJAPlayer3
tNamePlateDraw(player, x, y, Opacity);
TJAPlayer3.Tx.NamePlateBase.t2D描画(TJAPlayer3.app.Device, x, y, new RectangleF(0, player == 1 ? 2 * 54 : 0, 220, 54));
if (TJAPlayer3.PlayerSide == 0 || TJAPlayer3.ConfigIni.nPlayerCount > 1)
TJAPlayer3.Tx.NamePlateBase.t2D描画(TJAPlayer3.app.Device, x, y, new RectangleF(0, basePlayer == 1 ? 2 * 54 : 0, 220, 54));
else
TJAPlayer3.Tx.NamePlateBase.t2D描画(TJAPlayer3.app.Device, x, y, new RectangleF(0, 1 * 54, 220, 54));
if (TJAPlayer3.NamePlateConfig.data.Dan[player] != "" && TJAPlayer3.NamePlateConfig.data.Dan[player] != null)
{

Binary file not shown.