First Characters in result screen update
This commit is contained in:
parent
b86ced57da
commit
aedcec528b
@ -9,5 +9,250 @@ namespace TJAPlayer3
|
||||
{
|
||||
class CResultCharacter
|
||||
{
|
||||
private static CCounter[] ctCharacterNormal = new CCounter[4] { new CCounter(), new CCounter(), new CCounter(), new CCounter() };
|
||||
private static CCounter[] ctCharacterClear = new CCounter[4] { new CCounter(), new CCounter(), new CCounter(), new CCounter() };
|
||||
private static CCounter[] ctCharacterFailed = new CCounter[4] { new CCounter(), new CCounter(), new CCounter(), new CCounter() };
|
||||
private static CCounter[] ctCharacterFailedIn = new CCounter[4] { new CCounter(), new CCounter(), new CCounter(), new CCounter() };
|
||||
|
||||
|
||||
public enum ECharacterResult
|
||||
{
|
||||
// Song select
|
||||
NORMAL,
|
||||
CLEAR,
|
||||
FAILED,
|
||||
FAILED_IN,
|
||||
}
|
||||
|
||||
public static bool tIsCounterProcessing(int player, ECharacterResult eca)
|
||||
{
|
||||
CCounter[] _ctref = _getReferenceCounter(eca);
|
||||
|
||||
if (_ctref[player] != null)
|
||||
return _ctref[player].b進行中;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool tIsCounterEnded(int player, ECharacterResult eca)
|
||||
{
|
||||
CCounter[] _ctref = _getReferenceCounter(eca);
|
||||
|
||||
if (_ctref[player] != null)
|
||||
return _ctref[player].b終了値に達した;
|
||||
return false;
|
||||
}
|
||||
|
||||
private static bool _usesSubstituteTexture(int player, ECharacterResult eca)
|
||||
{
|
||||
int _charaId = TJAPlayer3.NamePlateConfig.data.Character[TJAPlayer3.GetActualPlayer(player)];
|
||||
|
||||
if (_charaId >= 0 && _charaId < TJAPlayer3.Skin.Characters_Ptn)
|
||||
{
|
||||
switch (eca)
|
||||
{
|
||||
case (ECharacterResult.NORMAL):
|
||||
{
|
||||
if (TJAPlayer3.Tx.Characters_Result_Normal[_charaId].Length > 0)
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
case (ECharacterResult.CLEAR):
|
||||
{
|
||||
if (TJAPlayer3.Tx.Characters_Result_Clear[_charaId].Length > 0)
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
case (ECharacterResult.FAILED):
|
||||
{
|
||||
if (TJAPlayer3.Tx.Characters_Result_Failed[_charaId].Length > 0)
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
case (ECharacterResult.FAILED_IN):
|
||||
{
|
||||
if (TJAPlayer3.Tx.Characters_Result_Failed_In[_charaId].Length > 0)
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static CTexture[] _getReferenceArray(int player, ECharacterResult eca)
|
||||
{
|
||||
int _charaId = TJAPlayer3.NamePlateConfig.data.Character[TJAPlayer3.GetActualPlayer(player)];
|
||||
|
||||
if (_charaId >= 0 && _charaId < TJAPlayer3.Skin.Characters_Ptn)
|
||||
{
|
||||
switch (eca)
|
||||
{
|
||||
case (ECharacterResult.NORMAL):
|
||||
{
|
||||
if (TJAPlayer3.Tx.Characters_Result_Normal[_charaId].Length > 0)
|
||||
return TJAPlayer3.Tx.Characters_Result_Normal[_charaId];
|
||||
if (TJAPlayer3.Tx.Characters_Normal[_charaId].Length > 0)
|
||||
return TJAPlayer3.Tx.Characters_Normal[_charaId];
|
||||
break;
|
||||
}
|
||||
case (ECharacterResult.CLEAR):
|
||||
{
|
||||
if (TJAPlayer3.Tx.Characters_Result_Clear[_charaId].Length > 0)
|
||||
return TJAPlayer3.Tx.Characters_Result_Clear[_charaId];
|
||||
if (TJAPlayer3.Tx.Characters_10Combo[_charaId].Length > 0)
|
||||
return TJAPlayer3.Tx.Characters_10Combo[_charaId];
|
||||
break;
|
||||
}
|
||||
case (ECharacterResult.FAILED):
|
||||
{
|
||||
if (TJAPlayer3.Tx.Characters_Result_Failed[_charaId].Length > 0)
|
||||
return TJAPlayer3.Tx.Characters_Result_Failed[_charaId];
|
||||
if (TJAPlayer3.Tx.Characters_Normal[_charaId].Length > 0)
|
||||
return TJAPlayer3.Tx.Characters_Normal[_charaId];
|
||||
break;
|
||||
}
|
||||
case (ECharacterResult.FAILED_IN):
|
||||
{
|
||||
if (TJAPlayer3.Tx.Characters_Result_Failed_In[_charaId].Length > 0)
|
||||
return TJAPlayer3.Tx.Characters_Result_Failed_In[_charaId];
|
||||
if (TJAPlayer3.Tx.Characters_Normal[_charaId].Length > 0)
|
||||
return TJAPlayer3.Tx.Characters_Normal[_charaId];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static CCounter[] _getReferenceCounter(ECharacterResult eca)
|
||||
{
|
||||
switch (eca)
|
||||
{
|
||||
case (ECharacterResult.NORMAL):
|
||||
{
|
||||
return ctCharacterNormal;
|
||||
}
|
||||
case (ECharacterResult.CLEAR):
|
||||
{
|
||||
return ctCharacterClear;
|
||||
}
|
||||
case (ECharacterResult.FAILED):
|
||||
{
|
||||
return ctCharacterFailed;
|
||||
}
|
||||
case (ECharacterResult.FAILED_IN):
|
||||
{
|
||||
return ctCharacterFailedIn;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void tDisableCounter(ECharacterResult eca)
|
||||
{
|
||||
switch (eca)
|
||||
{
|
||||
case (ECharacterResult.NORMAL):
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
ctCharacterNormal[i] = new CCounter();
|
||||
break;
|
||||
}
|
||||
case (ECharacterResult.CLEAR):
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
ctCharacterClear[i] = new CCounter();
|
||||
break;
|
||||
}
|
||||
case (ECharacterResult.FAILED):
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
ctCharacterFailed[i] = new CCounter();
|
||||
break;
|
||||
}
|
||||
case (ECharacterResult.FAILED_IN):
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
ctCharacterFailedIn[i] = new CCounter();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static void tMenuResetTimer(int player, ECharacterResult eca)
|
||||
{
|
||||
CTexture[] _ref = _getReferenceArray(player, eca);
|
||||
CCounter[] _ctref = _getReferenceCounter(eca);
|
||||
|
||||
if (_ref != null && _ref.Length > 0 && _ctref != null)
|
||||
{
|
||||
_ctref[player] = new CCounter(0, _ref.Length - 1, 1000 / (float)_ref.Length, TJAPlayer3.Timer);
|
||||
}
|
||||
}
|
||||
|
||||
public static void tMenuResetTimer(ECharacterResult eca)
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
tMenuResetTimer(i, eca);
|
||||
}
|
||||
}
|
||||
|
||||
public static void tMenuDisplayCharacter(int player, int x, int y, ECharacterResult eca, int pos = 0, int opacity = 255)
|
||||
{
|
||||
CTexture[] _ref = _getReferenceArray(player, eca);
|
||||
CCounter[] _ctref = _getReferenceCounter(eca);
|
||||
bool _substitute = _usesSubstituteTexture(player, eca);
|
||||
|
||||
if (_ctref[player] != null && _ref != null && _ctref[player].n現在の値 < _ref.Length)
|
||||
{
|
||||
if (eca == ECharacterResult.NORMAL
|
||||
|| eca == ECharacterResult.CLEAR
|
||||
|| eca == ECharacterResult.FAILED)
|
||||
_ctref[player].t進行Loop();
|
||||
else
|
||||
_ctref[player].t進行();
|
||||
|
||||
// x0.8 if not substitute
|
||||
if (!_substitute)
|
||||
{
|
||||
_ref[_ctref[player].n現在の値].vc拡大縮小倍率.X = 0.8f;
|
||||
_ref[_ctref[player].n現在の値].vc拡大縮小倍率.Y = 0.8f;
|
||||
}
|
||||
|
||||
_ref[_ctref[player].n現在の値].Opacity = opacity;
|
||||
|
||||
if (pos % 2 == 0)
|
||||
{
|
||||
_ref[_ctref[player].n現在の値].t2D中心基準描画(TJAPlayer3.app.Device,
|
||||
x,
|
||||
y + ((_substitute == true) ? 90 : 0)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
_ref[_ctref[player].n現在の値].t2D中心基準描画Mirrored(TJAPlayer3.app.Device,
|
||||
1340 - x,
|
||||
y + ((_substitute == true) ? 90 : 0)
|
||||
);
|
||||
}
|
||||
|
||||
// Restore if not substitute
|
||||
if (!_substitute)
|
||||
{
|
||||
_ref[_ctref[player].n現在の値].vc拡大縮小倍率.X = 1f;
|
||||
_ref[_ctref[player].n現在の値].vc拡大縮小倍率.Y = 1f;
|
||||
}
|
||||
|
||||
_ref[_ctref[player].n現在の値].Opacity = 255;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -237,17 +237,23 @@ namespace TJAPlayer3
|
||||
ctRotate_Flowers = new CCounter(0, 1500, 1, TJAPlayer3.Timer);
|
||||
ctShine_Plate = new CCounter(0, 1000, 1, TJAPlayer3.Timer);
|
||||
|
||||
/*
|
||||
ctDonchan_Normal = new CCounter[2];
|
||||
ctDonchan_Clear = new CCounter[2];
|
||||
ctDonchan_Failed = new CCounter[2];
|
||||
ctDonchan_Failed_In = new CCounter[2];
|
||||
*/
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
/*
|
||||
ctDonchan_Normal[i] = new CCounter(0, TJAPlayer3.Tx.Result_Donchan_Normal.Length - 1, 1000 / 60, TJAPlayer3.Timer);
|
||||
ctDonchan_Clear[i] = new CCounter();
|
||||
ctDonchan_Failed[i] = new CCounter();
|
||||
ctDonchan_Failed_In[i] = new CCounter();
|
||||
*/
|
||||
|
||||
CResultCharacter.tMenuResetTimer(CResultCharacter.ECharacterResult.NORMAL);
|
||||
}
|
||||
|
||||
|
||||
@ -296,6 +302,7 @@ namespace TJAPlayer3
|
||||
ctBackgroundAnime.t進行Loop();
|
||||
ctMountain_ClearIn.t進行();
|
||||
|
||||
/*
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
ctDonchan_Clear[i].t進行Loop();
|
||||
@ -303,6 +310,7 @@ namespace TJAPlayer3
|
||||
ctDonchan_Failed_In[i].t進行();
|
||||
ctDonchan_Normal[i].t進行Loop();
|
||||
}
|
||||
*/
|
||||
|
||||
ctFlash_Icon.t進行Loop();
|
||||
ctRotate_Flowers.t進行Loop();
|
||||
@ -604,15 +612,28 @@ namespace TJAPlayer3
|
||||
|
||||
if (gaugeValues[p] >= 80.0f)
|
||||
{
|
||||
/*
|
||||
if (!this.ctDonchan_Clear[p].b進行中)
|
||||
this.ctDonchan_Clear[p].t開始(0, TJAPlayer3.Tx.Result_Donchan_Clear.Length - 1, 1000 / 60, TJAPlayer3.Timer);
|
||||
*/
|
||||
|
||||
if (!CResultCharacter.tIsCounterProcessing(p, CResultCharacter.ECharacterResult.CLEAR))
|
||||
CResultCharacter.tMenuResetTimer(p, CResultCharacter.ECharacterResult.CLEAR);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
if (!this.ctDonchan_Failed_In[p].b進行中)
|
||||
this.ctDonchan_Failed_In[p].t開始(0, TJAPlayer3.Tx.Result_Donchan_Failed_In.Length - 1, 1000 / 60, TJAPlayer3.Timer);
|
||||
else if (this.ctDonchan_Failed_In[p].b終了値に達した && !this.ctDonchan_Failed[p].b進行中)
|
||||
this.ctDonchan_Failed[p].t開始(0, TJAPlayer3.Tx.Result_Donchan_Failed.Length - 1, 1000 / 60, TJAPlayer3.Timer);
|
||||
*/
|
||||
|
||||
if (!CResultCharacter.tIsCounterProcessing(p, CResultCharacter.ECharacterResult.FAILED_IN))
|
||||
CResultCharacter.tMenuResetTimer(p, CResultCharacter.ECharacterResult.FAILED_IN);
|
||||
else if (CResultCharacter.tIsCounterEnded(p, CResultCharacter.ECharacterResult.FAILED_IN)
|
||||
&& !CResultCharacter.tIsCounterProcessing(p, CResultCharacter.ECharacterResult.FAILED))
|
||||
CResultCharacter.tMenuResetTimer(p, CResultCharacter.ECharacterResult.FAILED);
|
||||
}
|
||||
|
||||
|
||||
@ -625,7 +646,7 @@ namespace TJAPlayer3
|
||||
|
||||
#region [Character Animations]
|
||||
|
||||
|
||||
/*
|
||||
if (this.ctDonchan_Clear[p].b進行中)
|
||||
{
|
||||
DisplayCharacter(TJAPlayer3.Tx.Result_Donchan_Clear[ctDonchan_Clear[p].n現在の値], 202, 532, pos, 0.8f);
|
||||
@ -642,9 +663,20 @@ namespace TJAPlayer3
|
||||
{
|
||||
DisplayCharacter(TJAPlayer3.Tx.Result_Donchan_Normal[ctDonchan_Normal[p].n現在の値], 202, 532, pos, 0.8f);
|
||||
}
|
||||
*/
|
||||
|
||||
if (CResultCharacter.tIsCounterProcessing(p, CResultCharacter.ECharacterResult.CLEAR))
|
||||
CResultCharacter.tMenuDisplayCharacter(p, 202, 532, CResultCharacter.ECharacterResult.CLEAR, pos);
|
||||
else if (CResultCharacter.tIsCounterProcessing(p, CResultCharacter.ECharacterResult.FAILED))
|
||||
CResultCharacter.tMenuDisplayCharacter(p, 202, 532, CResultCharacter.ECharacterResult.FAILED, pos);
|
||||
else if (CResultCharacter.tIsCounterProcessing(p, CResultCharacter.ECharacterResult.FAILED_IN))
|
||||
CResultCharacter.tMenuDisplayCharacter(p, 202, 532, CResultCharacter.ECharacterResult.FAILED_IN, pos);
|
||||
else
|
||||
CResultCharacter.tMenuDisplayCharacter(p, 202, 532, CResultCharacter.ECharacterResult.NORMAL, pos);
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region [PuchiChara]
|
||||
|
||||
int ttdiff = 640 - 152;
|
||||
@ -808,10 +840,13 @@ namespace TJAPlayer3
|
||||
public CCounter ctMountain_ClearIn;
|
||||
public CCounter ctBackgroundAnime;
|
||||
public CCounter ctBackgroundAnime_Clear;
|
||||
|
||||
/*
|
||||
private CCounter[] ctDonchan_Normal;
|
||||
private CCounter[] ctDonchan_Clear;
|
||||
private CCounter[] ctDonchan_Failed;
|
||||
private CCounter[] ctDonchan_Failed_In;
|
||||
*/
|
||||
|
||||
private int RandomText;
|
||||
|
||||
@ -873,7 +908,7 @@ namespace TJAPlayer3
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
public void DisplayCharacter(CTexture tex, int x, int y, int pos, float ratio)
|
||||
{
|
||||
if (tex == null)
|
||||
@ -889,6 +924,7 @@ namespace TJAPlayer3
|
||||
1340 - x - tex.szテクスチャサイズ.Width / 2,
|
||||
y - tex.szテクスチャサイズ.Height / 2);
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
private void t大文字表示(int x, int y, string str)
|
||||
|
Loading…
Reference in New Issue
Block a user