1
0
mirror of synced 2024-11-24 15:40:22 +01:00

ClapとYellowの連打に対応 (#249)

* ClapとYellowの連打に対応

* Taikoの場合は通常の連打に
This commit is contained in:
Takkkom 2022-06-12 22:08:14 +09:00 committed by GitHub
parent e28d4895b8
commit 8193a37ced
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 119 additions and 46 deletions

View File

@ -2448,6 +2448,8 @@ namespace TJAPlayer3
case 0x15: case 0x15:
case 0x16: case 0x16:
case 0x17: case 0x17:
case 0x20:
case 0x21:
{ {
if (this.bOFFSETの値がマイナスである) if (this.bOFFSETの値がマイナスである)
{ {
@ -4372,7 +4374,7 @@ namespace TJAPlayer3
if (nObjectNum != 0) if (nObjectNum != 0)
{ {
if ((nObjectNum >= 5 && nObjectNum <= 7) || nObjectNum == 9) if ((nObjectNum >= 5 && nObjectNum <= 7) || nObjectNum == 9 || nObjectNum == 16 || nObjectNum == 17)
{ {
if (nNowRoll != 0) if (nNowRoll != 0)
{ {

View File

@ -919,7 +919,7 @@ namespace TJAPlayer3
//while ( nIndex_NearestChip_Past >= 0 ) // 過去方向への検索 //while ( nIndex_NearestChip_Past >= 0 ) // 過去方向への検索
for ( ; nIndex_NearestChip_Past >= 0; nIndex_NearestChip_Past-- ) for ( ; nIndex_NearestChip_Past >= 0; nIndex_NearestChip_Past-- )
{ {
if ( ( 0x15 <= nChannel ) && ( nChannel <= 0x17 ) ) if ( (( 0x15 <= nChannel ) && ( nChannel <= 0x17 ) || (nChannel == 0x20 || nChannel == 0x21)) )
{ {
CDTX.CChip chip = playerListChip[ nIndex_NearestChip_Past ]; CDTX.CChip chip = playerListChip[ nIndex_NearestChip_Past ];
@ -1141,15 +1141,17 @@ namespace TJAPlayer3
} }
} }
EGameType _gt = TJAPlayer3.ConfigIni.nGameType[TJAPlayer3.GetActualPlayer(nPlayer)];
//赤か青かの分岐 //赤か青かの分岐
if( sort == 0 ) if ( sort == 0|| sort == 2 )
{ {
if (pChip.nPlayerSide == 0) if (pChip.nPlayerSide == 0)
this.soundRed?.t再生を開始する(); this.soundRed?.t再生を開始する();
else else
this.soundRed2?.t再生を開始する(); this.soundRed2?.t再生を開始する();
if (pChip.nチャンネル番号 == 0x15)
if (pChip.nチャンネル番号 == 0x15 || _gt == EGameType.KONGA || (_gt == EGameType.TAIKO && pChip.nチャンネル番号 == 0x21))
{ {
//CDTXMania.Skin.soundRed.t再生する(); //CDTXMania.Skin.soundRed.t再生する();
//CDTXMania.stage演奏ドラム画面.actChipFireTaiko.Start( 1, nPlayer ); //CDTXMania.stage演奏ドラム画面.actChipFireTaiko.Start( 1, nPlayer );
@ -1162,13 +1164,14 @@ namespace TJAPlayer3
TJAPlayer3.stage演奏ドラム画面.FlyingNotes.Start(3, nPlayer, true); TJAPlayer3.stage演奏ドラム画面.FlyingNotes.Start(3, nPlayer, true);
} }
} }
else else if (sort == 1 || sort == 3)
{ {
if (pChip.nPlayerSide == 0) if (pChip.nPlayerSide == 0)
this.soundBlue?.t再生を開始する(); this.soundBlue?.t再生を開始する();
else else
this.soundBlue2?.t再生を開始する(); this.soundBlue2?.t再生を開始する();
if (pChip.nチャンネル番号 == 0x15)
if (pChip.nチャンネル番号 == 0x15 || _gt == EGameType.KONGA || (_gt == EGameType.TAIKO && pChip.nチャンネル番号 == 0x21))
{ {
//CDTXMania.Skin.soundBlue.t再生する(); //CDTXMania.Skin.soundBlue.t再生する();
//CDTXMania.stage演奏ドラム画面.actChipFireTaiko.Start( 2, nPlayer ); //CDTXMania.stage演奏ドラム画面.actChipFireTaiko.Start( 2, nPlayer );
@ -1181,6 +1184,14 @@ namespace TJAPlayer3
TJAPlayer3.stage演奏ドラム画面.FlyingNotes.Start(4, nPlayer, true); TJAPlayer3.stage演奏ドラム画面.FlyingNotes.Start(4, nPlayer, true);
} }
} }
else if (sort == 4)
{
if (pChip.nPlayerSide == 0)
this.soundClap?.t再生を開始する();
else
this.soundClap2?.t再生を開始する();
TJAPlayer3.stage演奏ドラム画面.FlyingNotes.Start(4, nPlayer, true);
}
//TJAPlayer3.stage演奏ドラム画面.actTaikoLaneFlash.PlayerLane[nPlayer].Start(PlayerLane.FlashType.Hit); //TJAPlayer3.stage演奏ドラム画面.actTaikoLaneFlash.PlayerLane[nPlayer].Start(PlayerLane.FlashType.Hit);
} }
@ -1364,10 +1375,11 @@ namespace TJAPlayer3
if (this.bPAUSE == false && rollSpeed > 0) // && TJAPlayer3.ConfigIni.bAuto先生の連打) if (this.bPAUSE == false && rollSpeed > 0) // && TJAPlayer3.ConfigIni.bAuto先生の連打)
{ {
if (((CSound管理.rc演奏用タイマ.n現在時刻 * (((double)TJAPlayer3.ConfigIni.n演奏速度) / 20.0)) * (((double)TJAPlayer3.ConfigIni.n演奏速度) / 20.0)) > (pChip.n発声時刻ms + (1000.0 / (double)rollSpeed) * pChip.nRollCount)) if (((CSound管理.rc演奏用タイマ.n現在時刻 * (((double)TJAPlayer3.ConfigIni.n演奏速度) / 20.0)) * (((double)TJAPlayer3.ConfigIni.n演奏速度) / 20.0)) > (pChip.n発声時刻ms + (1000.0 / (double)rollSpeed) * pChip.nRollCount))
{ {
EGameType _gt = TJAPlayer3.ConfigIni.nGameType[TJAPlayer3.GetActualPlayer(nPlayer)];
int nLane = 0;
if (this.nHand[nPlayer] == 0) if (this.nHand[nPlayer] == 0)
this.nHand[nPlayer]++; this.nHand[nPlayer]++;
else else
@ -1382,7 +1394,10 @@ namespace TJAPlayer3
TJAPlayer3.stage演奏ドラム画面.actMtaiko.tMtaikoEvent(pChip.nチャンネル番号, this.nHand[nPlayer], nPlayer); TJAPlayer3.stage演奏ドラム画面.actMtaiko.tMtaikoEvent(pChip.nチャンネル番号, this.nHand[nPlayer], nPlayer);
this.tRollProcess(pChip, (CSound管理.rc演奏用タイマ.n現在時刻 * (((double)TJAPlayer3.ConfigIni.n演奏速度) / 20.0)), 1, 0, 0, nPlayer); if (pChip.nチャンネル番号 == 0x20 && _gt == EGameType.KONGA) nLane = 4;
else if (pChip.nチャンネル番号 == 0x21 && _gt == EGameType.KONGA) nLane = 1;
this.tRollProcess(pChip, (CSound管理.rc演奏用タイマ.n現在時刻 * (((double)TJAPlayer3.ConfigIni.n演奏速度) / 20.0)), 1, nLane, 0, nPlayer);
} }
} }
} }
@ -3127,6 +3142,17 @@ namespace TJAPlayer3
#region [ 20-2F: EmptySlot ] #region [ 20-2F: EmptySlot ]
case 0x20: case 0x20:
case 0x21: case 0x21:
{
if ((pChip.n発声時刻ms <= (int)n現在時刻ms && pChip.nーツ終了時刻ms >= (int)n現在時刻ms))
{
//if( this.n現在のコース == pChip.nコース )
if (pChip.b可視 == true)
this.chip現在処理中の連打チップ[nPlayer] = pChip;
}
if (pChip.n描画優先度 <= 0)
this.t進行描画_チップ_Taiko連打(configIni, ref dTX, ref pChip, nPlayer);
}
break;
case 0x22: case 0x22:
case 0x23: case 0x23:
case 0x24: case 0x24:
@ -3832,6 +3858,8 @@ namespace TJAPlayer3
case 0x17: //風船 case 0x17: //風船
case 0x18: //連打終了 case 0x18: //連打終了
case 0x19: case 0x19:
case 0x20:
case 0x21:
{ {
if( pChip.n描画優先度 >= 1 ) if( pChip.n描画優先度 >= 1 )
this.t進行描画_チップ_Taiko連打( configIni, ref dTX, ref pChip, nPlayer ); this.t進行描画_チップ_Taiko連打( configIni, ref dTX, ref pChip, nPlayer );

View File

@ -812,7 +812,7 @@ namespace TJAPlayer3
break; break;
case Eパッド.CLAP: case Eパッド.CLAP:
case Eパッド.CLAP2P: case Eパッド.CLAP2P:
nInput = 3; nInput = 4;
break; break;
} }
@ -1248,16 +1248,16 @@ namespace TJAPlayer3
{ {
bool _isBalloon = NotesManager.IsBalloon(chipNoHit); bool _isBalloon = NotesManager.IsBalloon(chipNoHit);
bool _isKusudama = NotesManager.IsKusudama(chipNoHit); bool _isKusudama = NotesManager.IsKusudama(chipNoHit);
bool _isKongaRedRoll = NotesManager.IsRoll(chipNoHit) && _gt == EGameType.KONGA; bool _isKongaRedRoll = (NotesManager.IsSmallRoll(chipNoHit) || NotesManager.IsBigRoll(chipNoHit)) || _gt == EGameType.TAIKO;
bool _isRedOnly = _isBalloon || _isKongaRedRoll || _isKusudama; bool _isRedOnly = _isBalloon || _isKongaRedRoll || _isKusudama;
// To be added later // To be added later
bool _isKongaPinkRoll = NotesManager.IsBigRoll(chipNoHit) && _gt == EGameType.KONGA; bool _isKongaPinkRoll = NotesManager.IsBigRoll(chipNoHit) && _gt == EGameType.KONGA;
bool _isBlueOnly = false; bool _isBlueOnly = (NotesManager.IsYellowRoll(chipNoHit) || NotesManager.IsBigRoll(chipNoHit)) || _gt == EGameType.TAIKO;
if ((!_isRedOnly || !_isBlue) && (!_isBlueOnly || _isBlue)) if ((_isRedOnly && !_isBlue) || (_isBlueOnly && _isBlue))
this.tドラムヒット処理(nTime, _pad, chipNoHit, false, nUsePlayer); this.tドラムヒット処理(nTime, _pad, chipNoHit, false, nUsePlayer);
} }
@ -1270,14 +1270,26 @@ namespace TJAPlayer3
case Eパッド.CLAP: case Eパッド.CLAP:
case Eパッド.CLAP2P: case Eパッド.CLAP2P:
{ {
var _pad = (Eパッド)nPad;
// Process konga clap // Process konga clap
if (e判定 != E判定.Miss && _isClapKonga) if (e判定 != E判定.Miss && _isClapKonga)
{ {
this.tドラムヒット処理(nTime, Eパッド.CLAP, chipNoHit, false, nUsePlayer); this.tドラムヒット処理(nTime, _pad, chipNoHit, false, nUsePlayer);
bHitted = true; bHitted = true;
} }
// Judge rolls
if (e判定 != E判定.Miss
&& NotesManager.IsGenericRoll(chipNoHit)
&& !NotesManager.IsRollEnd(chipNoHit))
{
bool _isKongaClapRoll = NotesManager.IsClapRoll(chipNoHit) && _gt == EGameType.KONGA;
if (_isKongaClapRoll)
this.tドラムヒット処理(nTime, _pad, chipNoHit, false, nUsePlayer);
}
if (!bHitted) if (!bHitted)
break; break;

View File

@ -34,8 +34,8 @@ namespace TJAPlayer3
["E"] = 5, // Unused ["E"] = 5, // Unused
["F"] = 15, // ADLib ["F"] = 15, // ADLib
["G"] = 0xF1, // Green (Purple) double hit note (Coming soon) ["G"] = 0xF1, // Green (Purple) double hit note (Coming soon)
["H"] = 5, // Konga clap roll (Coming soon) ["H"] = 16, // Konga clap roll (Coming soon)
["I"] = 5, // Konga yellow roll (Coming soon) ["I"] = 17, // Konga yellow roll (Coming soon)
}; };
public static bool FastFlankedParsing(string s) public static bool FastFlankedParsing(string s)
@ -169,6 +169,18 @@ namespace TJAPlayer3
return (chip.nチャンネル番号 == 0x101); return (chip.nチャンネル番号 == 0x101);
} }
public static bool IsYellowRoll(CDTX.CChip chip)
{
if (chip == null) return false;
return chip.nチャンネル番号 == 0x21;
}
public static bool IsClapRoll(CDTX.CChip chip)
{
if (chip == null) return false;
return chip.nチャンネル番号 == 0x20;
}
public static bool IsKusudama(CDTX.CChip chip) public static bool IsKusudama(CDTX.CChip chip)
{ {
if (chip == null) return false; if (chip == null) return false;
@ -208,13 +220,14 @@ namespace TJAPlayer3
public static bool IsRoll(CDTX.CChip chip) public static bool IsRoll(CDTX.CChip chip)
{ {
if (chip == null) return false; if (chip == null) return false;
return IsBigRoll(chip) || IsSmallRoll(chip); return IsBigRoll(chip) || IsSmallRoll(chip) || IsClapRoll(chip) || IsYellowRoll(chip);
} }
public static bool IsGenericRoll(CDTX.CChip chip) public static bool IsGenericRoll(CDTX.CChip chip)
{ {
if (chip == null) return false; if (chip == null) return false;
return 0x15 <= chip.nチャンネル番号 && chip.nチャンネル番号 <= 0x19; return (0x15 <= chip.nチャンネル番号 && chip.nチャンネル番号 <= 0x19) ||
(chip.nチャンネル番号 == 0x20 || chip.nチャンネル番号 == 0x21);
} }
public static bool IsMissableNote(CDTX.CChip chip) public static bool IsMissableNote(CDTX.CChip chip)
@ -295,7 +308,25 @@ namespace TJAPlayer3
if (TJAPlayer3.ConfigIni.eSTEALTH[TJAPlayer3.GetActualPlayer(player)] != Eステルスモード.OFF || !chip.bShow || TJAPlayer3.Tx.Notes[(int)_gt] == null) if (TJAPlayer3.ConfigIni.eSTEALTH[TJAPlayer3.GetActualPlayer(player)] != Eステルスモード.OFF || !chip.bShow || TJAPlayer3.Tx.Notes[(int)_gt] == null)
return; return;
int _offset = IsBigRoll(chip) ? 390 : 0; int _offset = 0;
if (IsSmallRoll(chip) || (_gt == EGameType.TAIKO && IsYellowRoll(chip)))
{
_offset = 0;
}
if (IsBigRoll(chip) || (_gt == EGameType.TAIKO && IsClapRoll(chip)))
{
_offset = 390;
}
else if (IsClapRoll(chip) && _gt == EGameType.KONGA)
{
_offset = 1430;
}
else if (IsYellowRoll(chip) && _gt == EGameType.KONGA)
{
_offset = 1040;
}
float _adjust = 65f; float _adjust = 65f;
int index = x末端 - x; int index = x末端 - x;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

After

Width:  |  Height:  |  Size: 121 KiB