1
0
mirror of synced 2024-11-28 09:20:53 +01:00

Externalize notes visual to NotesManager.cs

This commit is contained in:
0aubsq 2022-05-10 16:48:18 +02:00
parent 0e14e367ed
commit b420f70de3
6 changed files with 220 additions and 194 deletions

View File

@ -2058,6 +2058,7 @@ namespace TJAPlayer3
/// <param name="player">プレイヤー。</param> /// <param name="player">プレイヤー。</param>
/// <param name="don">ドンかどうか。</param> /// <param name="don">ドンかどうか。</param>
/// <returns>最も判定枠に近いノーツ。</returns> /// <returns>最も判定枠に近いノーツ。</returns>
/*
protected CDTX.CChip GetChipOfNearest(long nowTime, int player, bool don) protected CDTX.CChip GetChipOfNearest(long nowTime, int player, bool don)
{ {
var nearestChip = new CDTX.CChip(); var nearestChip = new CDTX.CChip();
@ -2191,6 +2192,7 @@ namespace TJAPlayer3
return nearestChip; return nearestChip;
} }
*/
protected CDTX.CChip r指定時刻に一番近い未ヒットChip( long nTime, int nChannel, int nInputAdjustTime, int n検索範囲時間ms, int nPlayer ) protected CDTX.CChip r指定時刻に一番近い未ヒットChip( long nTime, int nChannel, int nInputAdjustTime, int n検索範囲時間ms, int nPlayer )

View File

@ -79,20 +79,27 @@ namespace TJAPlayer3
st[i].b使用中 = false; st[i].b使用中 = false;
} }
EGameType _gt = TJAPlayer3.ConfigIni.nGameType[TJAPlayer3.GetActualPlayer(st[i].nプレイヤー)];
switch (st[i].nプレイヤー) switch (st[i].nプレイヤー)
{ {
case 0: case 0:
TJAPlayer3.Tx.Gauge_Soul_Explosion[TJAPlayer3.P1IsBlue() ? 1 : 0]?.t2D中心基準描画(TJAPlayer3.app.Device, TJAPlayer3.Skin.Game_Effect_FlyingNotes_EndPoint_X[0], TJAPlayer3.Skin.Game_Effect_FlyingNotes_EndPoint_Y[0], new Rectangle(st[i].ct進行.n現在の値 * TJAPlayer3.Skin.Game_Effect_NotesFlash[0], 0, TJAPlayer3.Skin.Game_Effect_NotesFlash[0], TJAPlayer3.Skin.Game_Effect_NotesFlash[1])); TJAPlayer3.Tx.Gauge_Soul_Explosion[TJAPlayer3.P1IsBlue() ? 1 : 0]?.t2D中心基準描画(TJAPlayer3.app.Device, TJAPlayer3.Skin.Game_Effect_FlyingNotes_EndPoint_X[0], TJAPlayer3.Skin.Game_Effect_FlyingNotes_EndPoint_Y[0], new Rectangle(st[i].ct進行.n現在の値 * TJAPlayer3.Skin.Game_Effect_NotesFlash[0], 0, TJAPlayer3.Skin.Game_Effect_NotesFlash[0], TJAPlayer3.Skin.Game_Effect_NotesFlash[1]));
if (this.st[i].ctChipEffect.n現在の値 < 13) if (this.st[i].ctChipEffect.n現在の値 < 13)
TJAPlayer3.Tx.Notes[(int)_gt]?.t2D中心基準描画(TJAPlayer3.app.Device, TJAPlayer3.Skin.Game_Effect_FlyingNotes_EndPoint_X[0], TJAPlayer3.Skin.Game_Effect_FlyingNotes_EndPoint_Y[0], new Rectangle(st[i].Lane * 130, 390, 130, 130)); NotesManager.DisplayNote(
st[i].nプレイヤー,
TJAPlayer3.Skin.Game_Effect_FlyingNotes_EndPoint_X[0],
TJAPlayer3.Skin.Game_Effect_FlyingNotes_EndPoint_Y[0],
st[i].Lane);
break; break;
case 1: case 1:
TJAPlayer3.Tx.Gauge_Soul_Explosion[1]?.t2D中心基準描画(TJAPlayer3.app.Device, TJAPlayer3.Skin.Game_Effect_FlyingNotes_EndPoint_X[1], TJAPlayer3.Skin.Game_Effect_FlyingNotes_EndPoint_Y[1], new Rectangle(st[i].ct進行.n現在の値 * TJAPlayer3.Skin.Game_Effect_NotesFlash[0], 0, TJAPlayer3.Skin.Game_Effect_NotesFlash[0], TJAPlayer3.Skin.Game_Effect_NotesFlash[1])); TJAPlayer3.Tx.Gauge_Soul_Explosion[1]?.t2D中心基準描画(TJAPlayer3.app.Device, TJAPlayer3.Skin.Game_Effect_FlyingNotes_EndPoint_X[1], TJAPlayer3.Skin.Game_Effect_FlyingNotes_EndPoint_Y[1], new Rectangle(st[i].ct進行.n現在の値 * TJAPlayer3.Skin.Game_Effect_NotesFlash[0], 0, TJAPlayer3.Skin.Game_Effect_NotesFlash[0], TJAPlayer3.Skin.Game_Effect_NotesFlash[1]));
if (this.st[i].ctChipEffect.n現在の値 < 13) if (this.st[i].ctChipEffect.n現在の値 < 13)
TJAPlayer3.Tx.Notes[(int)_gt]?.t2D中心基準描画(TJAPlayer3.app.Device, TJAPlayer3.Skin.Game_Effect_FlyingNotes_EndPoint_X[1], TJAPlayer3.Skin.Game_Effect_FlyingNotes_EndPoint_Y[1], new Rectangle(st[i].Lane * 130, 390, 130, 130)); NotesManager.DisplayNote(
st[i].nプレイヤー,
TJAPlayer3.Skin.Game_Effect_FlyingNotes_EndPoint_X[1],
TJAPlayer3.Skin.Game_Effect_FlyingNotes_EndPoint_Y[1],
st[i].Lane);
break; break;
} }

View File

@ -674,7 +674,7 @@ namespace TJAPlayer3
public void () public void ()
{ {
//判定枠 //判定枠
if (TJAPlayer3.Tx.Notes[0] != null) if (TJAPlayer3.Tx.Judge_Frame != null)
{ {
int nJudgeX = TJAPlayer3.Skin.nScrollFieldX[0] - (130 / 2); //元の値は349なんだけど... int nJudgeX = TJAPlayer3.Skin.nScrollFieldX[0] - (130 / 2); //元の値は349なんだけど...
int nJudgeY = TJAPlayer3.Skin.nScrollFieldY[0]; //元の値は349なんだけど... int nJudgeY = TJAPlayer3.Skin.nScrollFieldY[0]; //元の値は349なんだけど...

View File

@ -1847,103 +1847,49 @@ namespace TJAPlayer3
x = ( x ) - ( ( int ) ( ( 130.0 * pChip.dbチップサイズ倍率 ) / 2.0 ) ); x = ( x ) - ( ( int ) ( ( 130.0 * pChip.dbチップサイズ倍率 ) / 2.0 ) );
TJAPlayer3.Tx.Notes[(int)_gt].b加算合成 = false;
TJAPlayer3.Tx.SENotes.b加算合成 = false; //TJAPlayer3.Tx.Notes[(int)_gt].b加算合成 = false;
//TJAPlayer3.Tx.SENotes.b加算合成 = false;
var device = TJAPlayer3.app.Device; var device = TJAPlayer3.app.Device;
switch ( pChip.nチャンネル番号 ) switch (pChip.nチャンネル番号)
{ {
case 0x11: case 0x11:
if( TJAPlayer3.Tx.Notes[(int)_gt] != null && pChip.bShow)
{
if( TJAPlayer3.ConfigIni.eSTEALTH != Eステルスモード.DORON )
TJAPlayer3.Tx.Notes[(int)_gt].t2D描画( device, x, y, new Rectangle( 130, num9, 130, 130 ) );
TJAPlayer3.Tx.SENotes.t2D描画( device, x - 2, y + nSenotesY, new Rectangle( 0, 30 * pChip.nSenote, 136, 30 ) );
//CDTXMania.act文字コンソール.tPrint( x + 60, y + 140, C文字コンソール.Eフォント種別.白, pChip.nSenote.ToString() );
}
break;
case 0x12: case 0x12:
if( TJAPlayer3.Tx.Notes[(int)_gt] != null && pChip.bShow)
{
if( TJAPlayer3.ConfigIni.eSTEALTH != Eステルスモード.DORON )
TJAPlayer3.Tx.Notes[(int)_gt].t2D描画( device, x, y, new Rectangle( 260, num9, 130, 130) );
TJAPlayer3.Tx.SENotes.t2D描画( device, x - 2, y + nSenotesY, new Rectangle( 0, 30 * pChip.nSenote, 136, 30 ) );
//CDTXMania.act文字コンソール.tPrint( x + 60, y + 140, C文字コンソール.Eフォント種別.白, pChip.nSenote.ToString() );
}
nLane = 1;
break;
case 0x13: case 0x13:
if( TJAPlayer3.Tx.Notes[(int)_gt] != null && pChip.bShow)
{
if( TJAPlayer3.ConfigIni.eSTEALTH != Eステルスモード.DORON )
{
TJAPlayer3.Tx.Notes[(int)_gt].t2D描画( device, x, y, new Rectangle( 390, num9, 130, 130 ) );
//CDTXMania.Tx.Notes.t3D描画( device, mat, new Rectangle( 390, num9, 130, 130 ) );
}
TJAPlayer3.Tx.SENotes.t2D描画( device, x - 2, y + nSenotesY, new Rectangle( 0, 30 * pChip.nSenote, 136, 30 ) );
//CDTXMania.act文字コンソール.tPrint( x + 60, y + 140, C文字コンソール.Eフォント種別.白, pChip.nSenote.ToString() );
}
break;
case 0x14: case 0x14:
if( TJAPlayer3.Tx.Notes[(int)_gt] != null && pChip.bShow)
{ {
if( TJAPlayer3.ConfigIni.eSTEALTH != Eステルスモード.DORON ) NotesManager.DisplayNote(nPlayer, x, y, pChip, num9);
TJAPlayer3.Tx.Notes[(int)_gt].t2D描画( device, x, y, new Rectangle( 520, num9, 130, 130 ) ); TJAPlayer3.Tx.SENotes?.t2D描画(device, x - 2, y + nSenotesY, new Rectangle(0, 30 * pChip.nSenote, 136, 30));
TJAPlayer3.Tx.SENotes.t2D描画( device, x - 2, y + nSenotesY, new Rectangle( 0, 30 * pChip.nSenote, 136, 30 ) ); break;
//CDTXMania.act文字コンソール.tPrint( x + 60, y + 140, C文字コンソール.Eフォント種別.白, pChip.nSenote.ToString() );
} }
nLane = 1;
break;
case 0x1A: case 0x1A:
if( TJAPlayer3.Tx.Notes[(int)_gt] != null )
{
if( TJAPlayer3.ConfigIni.eSTEALTH != Eステルスモード.DORON )
{
if( nPlayer == 0 )
{
TJAPlayer3.Tx.Notes_Arm.t2D上下反転描画( device, x + 25, ( y + 74 ) + nHand );
TJAPlayer3.Tx.Notes_Arm.t2D上下反転描画( device, x + 60, ( y + 104 ) - nHand );
}
else if( nPlayer == 1 )
{
TJAPlayer3.Tx.Notes_Arm.t2D描画( device, x + 25, ( y - 44 ) + nHand );
TJAPlayer3.Tx.Notes_Arm.t2D描画( device, x + 60, ( y - 14 ) - nHand );
}
TJAPlayer3.Tx.Notes[(int)_gt].t2D描画( device, x, y, new Rectangle( 1690, num9, 130, 130 ) );
//CDTXMania.Tx.Notes.t3D描画( device, mat, new Rectangle( 390, num9, 130, 130 ) );
}
TJAPlayer3.Tx.SENotes.t2D描画( device, x - 2, y + nSenotesY, new Rectangle( 0, 390, 136, 30 ) );
}
break;
case 0x1B: case 0x1B:
if( TJAPlayer3.Tx.Notes[(int)_gt] != null )
{ {
if( TJAPlayer3.ConfigIni.eSTEALTH != Eステルスモード.DORON ) if (TJAPlayer3.ConfigIni.eSTEALTH == Eステルスモード.OFF && pChip.bShow)
{ {
if( nPlayer == 0 ) if (nPlayer == 0)
{ {
TJAPlayer3.Tx.Notes_Arm.t2D上下反転描画( device, x + 25, ( y + 74 ) + nHand ); TJAPlayer3.Tx.Notes_Arm?.t2D上下反転描画(device, x + 25, (y + 74) + nHand);
TJAPlayer3.Tx.Notes_Arm.t2D上下反転描画( device, x + 60, ( y + 104 ) - nHand ); TJAPlayer3.Tx.Notes_Arm?.t2D上下反転描画(device, x + 60, (y + 104) - nHand);
} }
else if( nPlayer == 1 ) else if (nPlayer == 1)
{ {
TJAPlayer3.Tx.Notes_Arm.t2D描画( device, x + 25, ( y - 44 ) + nHand ); TJAPlayer3.Tx.Notes_Arm?.t2D描画(device, x + 25, (y - 44) + nHand);
TJAPlayer3.Tx.Notes_Arm.t2D描画( device, x + 60, ( y - 14 ) - nHand ); TJAPlayer3.Tx.Notes_Arm?.t2D描画(device, x + 60, (y - 14) - nHand);
} }
TJAPlayer3.Tx.Notes[(int)_gt].t2D描画( device, x, y, new Rectangle( 1820, num9, 130, 130 ) ); NotesManager.DisplayNote(nPlayer, x, y, pChip, num9);
TJAPlayer3.Tx.SENotes?.t2D描画(device, x - 2, y + nSenotesY,
new Rectangle(0, pChip.nチャンネル番号 == 0x1A ? 390 : 420, 136, 30));
} }
TJAPlayer3.Tx.SENotes.t2D描画( device, x - 2, y + nSenotesY, new Rectangle( 0, 420, 136, 30 ) ); break;
} }
nLane = 1;
break;
case 0x1F: case 0x1F:
default:
break; break;
} }
//CDTXMania.act文字コンソール.tPrint( x + 60, y + 160, C文字コンソール.Eフォント種別.白, pChip.nPlayerSide.ToString() ); //CDTXMania.act文字コンソール.tPrint( x + 60, y + 160, C文字コンソール.Eフォント種別.白, pChip.nPlayerSide.ToString() );
} }
@ -2172,91 +2118,24 @@ namespace TJAPlayer3
var normalColor = new Color4(1.0f, 1.0f, 1.0f, 1f); var normalColor = new Color4(1.0f, 1.0f, 1.0f, 1f);
float f末端ーツのテクスチャ位置調整 = 65f; float f末端ーツのテクスチャ位置調整 = 65f;
if (pChip.nチャンネル番号 == 0x15 && pChip.bShow) //連打(小)
if (NotesManager.IsRoll(pChip))
{ {
int index = x末端 - x; //連打の距離 NotesManager.DisplayRoll(nPlayer, x, y, pChip, num9, normalColor, effectedColor, x末端);
if (TJAPlayer3.ConfigIni.eSTEALTH != Eステルスモード.DORON)
if (TJAPlayer3.Tx.SENotes != null)
{ {
#region[] int _shift = NotesManager.IsBigRoll(pChip) ? 26 : 0;
//CDTXMania.Tx.Notes.color4 = new Color4(1.0f, f減少するカラー, f減少するカラー); TJAPlayer3.Tx.SENotes.vc拡大縮小倍率.X = x末端 - x - 44 - _shift;
//CDTXMania.Tx.Notes.vc拡大縮小倍率.X = (index - 65.0f + f末端ーツのテクスチャ位置調整+1) / 128.0f; TJAPlayer3.Tx.SENotes.t2D描画(TJAPlayer3.app.Device, x + 90 + _shift, y + nSenotesY, new Rectangle(60, 240, 1, 30));
//CDTXMania.Tx.Notes.t2D描画(CDTXMania.app.Device, x + 64, y, new Rectangle(781, 0, 128, 130)); TJAPlayer3.Tx.SENotes.vc拡大縮小倍率.X = 1.0f;
//CDTXMania.Tx.Notes.vc拡大縮小倍率.X = 1.0f; TJAPlayer3.Tx.SENotes.t2D描画(TJAPlayer3.app.Device, x + 30 + _shift, y + nSenotesY, new Rectangle(0, 240, 60, 30));
//CDTXMania.Tx.Notes.t2D描画(CDTXMania.app.Device, x末端, y, 0, new Rectangle(910, num9, 130, 130)); TJAPlayer3.Tx.SENotes.t2D描画(TJAPlayer3.app.Device, x - (_shift / 13), y + nSenotesY, new Rectangle(0, 30 * pChip.nSenote, 136, 30));
//CDTXMania.Tx.Notes.color4 = new Color4(1.0f, 1.0f, 1.0f); //先端シンボルは色を変えない
//CDTXMania.Tx.Notes.t2D描画(CDTXMania.app.Device, x, y, 0, new Rectangle(650, num9, 130, 130));
#endregion
#region[]
if (TJAPlayer3.Skin.Game_RollColorMode != CSkin.RollColorMode.None)
TJAPlayer3.Tx.Notes[(int)_gt].color4 = effectedColor;
else
TJAPlayer3.Tx.Notes[(int)_gt].color4 = normalColor;
TJAPlayer3.Tx.Notes[(int)_gt].vc拡大縮小倍率.X = (index - 65.0f + f末端ーツのテクスチャ位置調整 + 1) / 128.0f;
TJAPlayer3.Tx.Notes[(int)_gt].t2D描画(TJAPlayer3.app.Device, x + 64, y, new Rectangle(781, 0, 128, 130));
TJAPlayer3.Tx.Notes[(int)_gt].vc拡大縮小倍率.X = 1.0f;
TJAPlayer3.Tx.Notes[(int)_gt].t2D描画(TJAPlayer3.app.Device, x末端 + f末端ーツのテクスチャ位置調整, y, 0, new Rectangle(910, num9, 130, 130));
if (TJAPlayer3.Skin.Game_RollColorMode == CSkin.RollColorMode.All)
TJAPlayer3.Tx.Notes[(int)_gt].color4 = effectedColor;
else
TJAPlayer3.Tx.Notes[(int)_gt].color4 = normalColor;
TJAPlayer3.Tx.Notes[(int)_gt].t2D描画(TJAPlayer3.app.Device, x, y, 0, new Rectangle(650, num9, 130, 130));
TJAPlayer3.Tx.Notes[(int)_gt].color4 = normalColor;
#endregion
} }
TJAPlayer3.Tx.SENotes.vc拡大縮小倍率.X = index - 44;
TJAPlayer3.Tx.SENotes.t2D描画(TJAPlayer3.app.Device, x + 90, y + nSenotesY, new Rectangle(60, 240, 1, 30));
TJAPlayer3.Tx.SENotes.vc拡大縮小倍率.X = 1.0f;
TJAPlayer3.Tx.SENotes.t2D描画(TJAPlayer3.app.Device, x + 30, y + nSenotesY, new Rectangle(0, 240, 60, 30));
TJAPlayer3.Tx.SENotes.t2D描画(TJAPlayer3.app.Device, x, y + nSenotesY, new Rectangle(0, 30 * pChip.nSenote, 136, 30));
} }
if (pChip.nチャンネル番号 == 0x16 && pChip.bShow)
{
int index = x末端 - x; //連打の距離
if (TJAPlayer3.ConfigIni.eSTEALTH != Eステルスモード.DORON)
{
#region[]
//CDTXMania.Tx.Notes.color4 = new Color4(1.0f, f減少するカラー, f減少するカラー);
//CDTXMania.Tx.Notes.vc拡大縮小倍率.X = (index - 65.0f + f末端ーツのテクスチャ位置調整+1) / 128f;
//CDTXMania.Tx.Notes.t2D描画(CDTXMania.app.Device, x + 64, y, new Rectangle(1171, 0, 128, 130));
//CDTXMania.Tx.Notes.vc拡大縮小倍率.X = 1.0f;
//CDTXMania.Tx.Notes.t2D描画(CDTXMania.app.Device, x末端, y, 0, new Rectangle(1300, num9, 130, 130));
//CDTXMania.Tx.Notes.color4 = new Color4(1.0f, 1.0f, 1.0f); //先端シンボルは色を変えない
//CDTXMania.Tx.Notes.t2D描画(CDTXMania.app.Device, x, y, new Rectangle(1040, num9, 130, 130));
#endregion
#region[]
if (TJAPlayer3.Skin.Game_RollColorMode != CSkin.RollColorMode.None)
TJAPlayer3.Tx.Notes[(int)_gt].color4 = effectedColor;
else
TJAPlayer3.Tx.Notes[(int)_gt].color4 = normalColor;
TJAPlayer3.Tx.Notes[(int)_gt].vc拡大縮小倍率.X = (index - 65 + f末端ーツのテクスチャ位置調整 + 1) / 128f;
TJAPlayer3.Tx.Notes[(int)_gt].t2D描画(TJAPlayer3.app.Device, x + 64, y, new Rectangle(1171, 0, 128, 130));
TJAPlayer3.Tx.Notes[(int)_gt].vc拡大縮小倍率.X = 1.0f;
TJAPlayer3.Tx.Notes[(int)_gt].t2D描画(TJAPlayer3.app.Device, x末端 + f末端ーツのテクスチャ位置調整, y, 0, new Rectangle(1300, num9, 130, 130));
if (TJAPlayer3.Skin.Game_RollColorMode == CSkin.RollColorMode.All)
TJAPlayer3.Tx.Notes[(int)_gt].color4 = effectedColor;
else
TJAPlayer3.Tx.Notes[(int)_gt].color4 = normalColor;
TJAPlayer3.Tx.Notes[(int)_gt].t2D描画(TJAPlayer3.app.Device, x, y, new Rectangle(1040, num9, 130, 130));
TJAPlayer3.Tx.Notes[(int)_gt].color4 = normalColor;
#endregion
}
TJAPlayer3.Tx.SENotes.vc拡大縮小倍率.X = index - 70;
TJAPlayer3.Tx.SENotes.t2D描画(TJAPlayer3.app.Device, x + 116, y + nSenotesY, new Rectangle(60, 240, 1, 30));
TJAPlayer3.Tx.SENotes.vc拡大縮小倍率.X = 1.0f;
TJAPlayer3.Tx.SENotes.t2D描画(TJAPlayer3.app.Device, x + 56, y + nSenotesY, new Rectangle(0, 240, 60, 30));
TJAPlayer3.Tx.SENotes.t2D描画(TJAPlayer3.app.Device, x - 2, y + nSenotesY, new Rectangle(0, 30 * pChip.nSenote, 136, 30));
}
if (pChip.nチャンネル番号 == 0x17) if (pChip.nチャンネル番号 == 0x17)
{ {
if (pChip.bShow) if (pChip.bShow)
@ -2266,8 +2145,12 @@ namespace TJAPlayer3
else if ((long)(CSound管理.rc演奏用タイマ.n現在時刻ms * (((double)TJAPlayer3.ConfigIni.n演奏速度) / 20.0)) >= pChip.nーツ終了時刻ms) else if ((long)(CSound管理.rc演奏用タイマ.n現在時刻ms * (((double)TJAPlayer3.ConfigIni.n演奏速度) / 20.0)) >= pChip.nーツ終了時刻ms)
x = (349 + pChip.nバーからのーツ末端距離dot); x = (349 + pChip.nバーからのーツ末端距離dot);
NotesManager.DisplayNote(nPlayer, x, y, pChip, num9, 260);
/*
if (TJAPlayer3.ConfigIni.eSTEALTH != Eステルスモード.DORON) if (TJAPlayer3.ConfigIni.eSTEALTH != Eステルスモード.DORON)
TJAPlayer3.Tx.Notes[(int)_gt].t2D描画(TJAPlayer3.app.Device, x, y, new Rectangle(1430, num9, 260, 130)); TJAPlayer3.Tx.Notes[(int)_gt].t2D描画(TJAPlayer3.app.Device, x, y, new Rectangle(1430, num9, 260, 130));
*/
TJAPlayer3.Tx.SENotes.t2D描画(TJAPlayer3.app.Device, x - 2, y + nSenotesY, new Rectangle(0, 30 * pChip.nSenote, 136, 30)); TJAPlayer3.Tx.SENotes.t2D描画(TJAPlayer3.app.Device, x - 2, y + nSenotesY, new Rectangle(0, 30 * pChip.nSenote, 136, 30));
} }
@ -2275,7 +2158,8 @@ namespace TJAPlayer3
if (pChip.nチャンネル番号 == 0x18) if (pChip.nチャンネル番号 == 0x18)
{ {
//大きい連打か小さい連打かの区別方法を考えてなかったよちくしょう //大きい連打か小さい連打かの区別方法を考えてなかったよちくしょう
TJAPlayer3.Tx.Notes[(int)_gt].vc拡大縮小倍率.X = 1.0f; if (TJAPlayer3.Tx.Notes[(int)_gt] != null)
TJAPlayer3.Tx.Notes[(int)_gt].vc拡大縮小倍率.X = 1.0f;
int n = 0; int n = 0;
switch (pChip.n連打音符State) switch (pChip.n連打音符State)
{ {
@ -2296,13 +2180,6 @@ namespace TJAPlayer3
TJAPlayer3.Tx.SENotes.t2D描画(TJAPlayer3.app.Device, x + 56, y + nSenotesY, new Rectangle(58, 270, 78, 30)); TJAPlayer3.Tx.SENotes.t2D描画(TJAPlayer3.app.Device, x + 56, y + nSenotesY, new Rectangle(58, 270, 78, 30));
} }
//CDTXMania.act文字コンソール.tPrint(x, y - 10, C文字コンソール.Eフォント種別.白, pChip.n発声時刻ms.ToString());
//CDTXMania.act文字コンソール.tPrint(x, y - 26, C文字コンソール.Eフォント種別.白, pChip.n連打音符State.ToString());
//CDTXMania.act文字コンソール.tPrint(x, y - 42, C文字コンソール.Eフォント種別.白, pChip.dbSCROLL.ToString());
//CDTXMania.act文字コンソール.tPrint(x, y - 58, C文字コンソール.Eフォント種別.白, pChip.dbBPM.ToString());
} }
} }
} }

View File

@ -144,9 +144,13 @@ namespace TJAPlayer3
} }
//Flying[i].OldValue = Flying[i].Counter.n現在の値; //Flying[i].OldValue = Flying[i].Counter.n現在の値;
NotesManager.DisplayNote(Flying[i].Player, (int)Flying[i].X, (int)Flying[i].Y, Flying[i].Lane);
/*
EGameType _gt = TJAPlayer3.ConfigIni.nGameType[TJAPlayer3.GetActualPlayer(Flying[i].Player)]; EGameType _gt = TJAPlayer3.ConfigIni.nGameType[TJAPlayer3.GetActualPlayer(Flying[i].Player)];
TJAPlayer3.Tx.Notes[(int)_gt]?.t2D中心基準描画(TJAPlayer3.app.Device, (int)Flying[i].X, (int)Flying[i].Y, new Rectangle(Flying[i].Lane * 130, 0, 130, 130)); TJAPlayer3.Tx.Notes[(int)_gt]?.t2D中心基準描画(TJAPlayer3.app.Device, (int)Flying[i].X, (int)Flying[i].Y, new Rectangle(Flying[i].Lane * 130, 0, 130, 130));
*/
/* /*
if (Flying[i].Player == 0) if (Flying[i].Player == 0)

View File

@ -3,6 +3,8 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Drawing;
using FDK;
namespace TJAPlayer3 namespace TJAPlayer3
{ {
@ -10,6 +12,9 @@ namespace TJAPlayer3
// Simple class containing functions to simplify readability of CChip elements // Simple class containing functions to simplify readability of CChip elements
class NotesManager class NotesManager
{ {
#region [Parsing]
public static Dictionary<string, int> NoteCorrespondanceDictionnary = new Dictionary<string, int>() public static Dictionary<string, int> NoteCorrespondanceDictionnary = new Dictionary<string, int>()
{ {
["0"] = 0, // Empty ["0"] = 0, // Empty
@ -26,9 +31,9 @@ namespace TJAPlayer3
["B"] = 11, // Joint Big Ka (2P) ["B"] = 11, // Joint Big Ka (2P)
["C"] = 0, // Mine (Coming soon) ["C"] = 0, // Mine (Coming soon)
["D"] = 0, // Unused ["D"] = 0, // Unused
["E"] = 6, // Konga clap roll (Coming soon) ["E"] = 14, // Konga clap roll (Coming soon)
["F"] = 15, // ADLib ["F"] = 15, // ADLib
["G"] = 3, // Green (Purple) double hit note (Coming soon) ["G"] = 0xF1, // Green (Purple) double hit note (Coming soon)
["H"] = 5, // Konga red roll (Coming soon) ["H"] = 5, // Konga red roll (Coming soon)
["I"] = 5, // Konga yellow roll (Coming soon) ["I"] = 5, // Konga yellow roll (Coming soon)
}; };
@ -40,6 +45,10 @@ namespace TJAPlayer3
return -1; return -1;
} }
#endregion
#region [Gameplay]
public static bool IsExpectedPad(int stored, int hit, CDTX.CChip chip, EGameType gt) public static bool IsExpectedPad(int stored, int hit, CDTX.CChip chip, EGameType gt)
{ {
var inPad = (Eパッド)hit; var inPad = (Eパッド)hit;
@ -73,6 +82,10 @@ namespace TJAPlayer3
return false; return false;
} }
#endregion
#region [General]
public static bool IsCommonNote(CDTX.CChip chip) public static bool IsCommonNote(CDTX.CChip chip)
{ {
if (chip == null) return false; if (chip == null) return false;
@ -112,18 +125,141 @@ namespace TJAPlayer3
{ {
if (chip == null) return false; if (chip == null) return false;
return ( return (
((chip.nチャンネル番号 == 0x13 || chip.nチャンネル番号 == 0x1A) && gt == EGameType.KONGA) // Konga Pink note IsKongaPink(chip, gt) // Konga Pink note
|| IsPurpleNote(chip, gt) // Purple (Green) note || IsPurpleNote(chip) // Purple (Green) note
); );
} }
// Not implemented yet public static bool IsKongaPink(CDTX.CChip chip, EGameType gt)
public static bool IsPurpleNote(CDTX.CChip chip, EGameType gt)
{ {
if (chip == null) return false; if (chip == null) return false;
return false; // Purple notes are treated as Pink in Konga
return (chip.nチャンネル番号 == 0x13 || chip.nチャンネル番号 == 0x1A || IsPurpleNote(chip)) && gt == EGameType.KONGA;
}
public static bool IsPurpleNote(CDTX.CChip chip)
{
if (chip == null) return false;
return (chip.nチャンネル番号 == 0x101);
}
public static bool IsMineNote(CDTX.CChip chip)
{
if (chip == null) return false;
return chip.nチャンネル番号 == 0x1E;
}
public static bool IsBalloon(CDTX.CChip chip)
{
if (chip == null) return false;
return chip.nチャンネル番号 == 0x17;
}
public static bool IsBigRoll(CDTX.CChip chip)
{
if (chip == null) return false;
return chip.nチャンネル番号 == 0x16;
}
public static bool IsSmallRoll(CDTX.CChip chip)
{
if (chip == null) return false;
return chip.nチャンネル番号 == 0x15;
}
public static bool IsRoll(CDTX.CChip chip)
{
if (chip == null) return false;
return IsBigRoll(chip) || IsSmallRoll(chip);
}
public static bool IsMissableNote(CDTX.CChip chip)
{
if (chip == null) return false;
return (0x11 <= chip.nチャンネル番号 && chip.nチャンネル番号 <= 0x14)
|| chip.nチャンネル番号 == 0x1A
|| chip.nチャンネル番号 == 0x1B
|| chip.nチャンネル番号 == 0x101;
}
#endregion
#region [Displayables]
// Flying notes
public static void DisplayNote(int player, int x, int y, int Lane)
{
EGameType _gt = TJAPlayer3.ConfigIni.nGameType[TJAPlayer3.GetActualPlayer(player)];
TJAPlayer3.Tx.Notes[(int)_gt]?.t2D中心基準描画(TJAPlayer3.app.Device, x, y, new Rectangle(Lane * 130, 390, 130, 130));
}
// Regular display
public static void DisplayNote(int player, int x, int y, CDTX.CChip chip, int frame, int length = 130)
{
if (TJAPlayer3.ConfigIni.eSTEALTH != Eステルスモード.OFF || !chip.bShow)
return;
EGameType _gt = TJAPlayer3.ConfigIni.nGameType[TJAPlayer3.GetActualPlayer(player)];
int noteType = 1;
if (IsSmallNote(chip, true)) noteType = 2;
else if (IsBigDonTaiko(chip, _gt) || IsKongaPink(chip, _gt)) noteType = 3;
else if (IsBigKaTaiko(chip, _gt) || IsClapKonga(chip, _gt)) noteType = 4;
else if (IsBalloon(chip)) noteType = 11;
else if (IsMineNote(chip))
{
TJAPlayer3.Tx.Note_Mine?.t2D描画(TJAPlayer3.app.Device, x, y);
return;
}
else if (IsPurpleNote(chip))
{
if (TJAPlayer3.Tx.Notes[0] != null)
{
int _oldOp = TJAPlayer3.Tx.Notes[0].Opacity;
TJAPlayer3.Tx.Notes[0]?.t2D描画(TJAPlayer3.app.Device, x, y, new Rectangle(130, frame, length, 130));
TJAPlayer3.Tx.Notes[0].Opacity = 127;
TJAPlayer3.Tx.Notes[0]?.t2D描画(TJAPlayer3.app.Device, x, y, new Rectangle(260, frame, length, 130));
TJAPlayer3.Tx.Notes[0].Opacity = _oldOp;
}
return;
}
TJAPlayer3.Tx.Notes[(int)_gt]?.t2D描画(TJAPlayer3.app.Device, x, y, new Rectangle(noteType * 130, frame, length, 130));
}
// Roll display
public static void DisplayRoll(int player, int x, int y, CDTX.CChip chip, int frame,
SharpDX.Color4 normalColor, SharpDX.Color4 effectedColor, int x末端)
{
EGameType _gt = TJAPlayer3.ConfigIni.nGameType[TJAPlayer3.GetActualPlayer(player)];
if (TJAPlayer3.ConfigIni.eSTEALTH != Eステルスモード.OFF || !chip.bShow || TJAPlayer3.Tx.Notes[(int)_gt] == null)
return;
int _offset = IsBigRoll(chip) ? 390 : 0;
float _adjust = 65f;
int index = x末端 - x;
if (TJAPlayer3.Skin.Game_RollColorMode != CSkin.RollColorMode.None)
TJAPlayer3.Tx.Notes[(int)_gt].color4 = effectedColor;
else
TJAPlayer3.Tx.Notes[(int)_gt].color4 = normalColor;
TJAPlayer3.Tx.Notes[(int)_gt].vc拡大縮小倍率.X = (index - 65.0f + _adjust + 1) / 128.0f;
TJAPlayer3.Tx.Notes[(int)_gt].t2D描画(TJAPlayer3.app.Device, x + 64, y, new Rectangle(781 + _offset, 0, 128, 130));
TJAPlayer3.Tx.Notes[(int)_gt].vc拡大縮小倍率.X = 1.0f;
TJAPlayer3.Tx.Notes[(int)_gt].t2D描画(TJAPlayer3.app.Device, x末端 + _adjust, y, 0, new Rectangle(910 + _offset, frame, 130, 130));
if (TJAPlayer3.Skin.Game_RollColorMode == CSkin.RollColorMode.All)
TJAPlayer3.Tx.Notes[(int)_gt].color4 = effectedColor;
else
TJAPlayer3.Tx.Notes[(int)_gt].color4 = normalColor;
TJAPlayer3.Tx.Notes[(int)_gt].t2D描画(TJAPlayer3.app.Device, x, y, 0, new Rectangle(650 + _offset, frame, 130, 130));
TJAPlayer3.Tx.Notes[(int)_gt].color4 = normalColor;
} }
#endregion
} }
} }