Implement Konga pink note (hit both blue/yellow and red)
This commit is contained in:
parent
020d7c864d
commit
39e42fb575
@ -4341,7 +4341,9 @@ namespace TJAPlayer3
|
||||
chip.b可視 = true;
|
||||
chip.bShow = true;
|
||||
chip.bShowRoll = true;
|
||||
|
||||
chip.nチャンネル番号 = 0x10 + nObjectNum;
|
||||
|
||||
//chip.n発声位置 = (this.n現在の小節数 * 384) + ((384 * n) / n文字数);
|
||||
chip.n発声位置 = (int)((this.n現在の小節数 * 384.0) + ((384.0 * n) / n文字数));
|
||||
chip.db発声位置 = this.dbNowTime;
|
||||
@ -5280,6 +5282,9 @@ namespace TJAPlayer3
|
||||
/// </summary>
|
||||
private int CharConvertNote(string str)
|
||||
{
|
||||
return (NotesManager.GetNoteValueFromChar(str));
|
||||
|
||||
/*
|
||||
switch (str)
|
||||
{
|
||||
case "0":
|
||||
@ -5311,6 +5316,7 @@ namespace TJAPlayer3
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
private int strConvertCourse(string str)
|
||||
@ -5447,7 +5453,7 @@ namespace TJAPlayer3
|
||||
|
||||
foreach (CChip chip in this.listChip)
|
||||
{
|
||||
if (chip.nチャンネル番号 >= 0x11 && chip.nチャンネル番号 < 0x18)
|
||||
if (NotesManager.IsCommonNote(chip))
|
||||
{
|
||||
list音符のみのリスト.Add(chip);
|
||||
}
|
||||
@ -5821,7 +5827,7 @@ namespace TJAPlayer3
|
||||
|
||||
foreach (CChip chip in this.listChip)
|
||||
{
|
||||
if (chip.nチャンネル番号 >= 0x11 && chip.nチャンネル番号 < 0x18)
|
||||
if (NotesManager.IsCommonNote(chip))
|
||||
{
|
||||
list音符のみのリスト.Add(chip);
|
||||
|
||||
|
@ -339,6 +339,8 @@ namespace TJAPlayer3
|
||||
Notes[0] = TxC(GAME + @"Notes.png");
|
||||
Notes[1] = TxC(GAME + @"Notes_Konga.png");
|
||||
|
||||
Note_Mine = TxC(GAME + @"Mine.png");
|
||||
|
||||
Judge_Frame = TxC(GAME + @"Notes.png");
|
||||
SENotes = TxC(GAME + @"SENotes.png");
|
||||
Notes_Arm = TxC(GAME + @"Notes_Arm.png");
|
||||
@ -1583,6 +1585,7 @@ namespace TJAPlayer3
|
||||
#region 5_演奏画面
|
||||
#region 共通
|
||||
public CTexture Judge_Frame,
|
||||
Note_Mine,
|
||||
SENotes,
|
||||
Notes_Arm,
|
||||
ChipEffect,
|
||||
|
@ -668,6 +668,8 @@ namespace TJAPlayer3
|
||||
|
||||
protected int nWaitButton;
|
||||
|
||||
protected int[] nStoredHit;
|
||||
|
||||
|
||||
public CDTX.CChip[] chip現在処理中の連打チップ = new CDTX.CChip[ 4 ];
|
||||
|
||||
|
@ -211,6 +211,8 @@ namespace TJAPlayer3
|
||||
ifp[0] = false;
|
||||
ifp[1] = false;
|
||||
|
||||
this.nStoredHit = new int[TJAPlayer3.ConfigIni.nPlayerCount];
|
||||
|
||||
// MODIFY_BEGIN #25398 2011.06.07 FROM
|
||||
if ( TJAPlayer3.bコンパクトモード )
|
||||
{
|
||||
@ -1188,7 +1190,8 @@ namespace TJAPlayer3
|
||||
{
|
||||
this.tドラムヒット処理(nTime, _pad, chipNoHit, true, nUsePlayer);
|
||||
bHitted = true;
|
||||
this.nWaitButton = 0;
|
||||
//this.nWaitButton = 0;
|
||||
this.nStoredHit[nUsePlayer] = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1199,33 +1202,50 @@ namespace TJAPlayer3
|
||||
float time = chipNoHit.n発声時刻ms - (float)(CSound管理.rc演奏用タイマ.n現在時刻ms * divided_songspeed);
|
||||
int nWaitTime = TJAPlayer3.ConfigIni.n両手判定の待ち時間;
|
||||
|
||||
bool _timeB110 = time <= 110;
|
||||
|
||||
if (chipNoHit.eNoteState == ENoteState.none)
|
||||
{
|
||||
if (time <= 110)
|
||||
if (_timeB110)
|
||||
{
|
||||
chipNoHit.nProcessTime = (int)(CSound管理.rc演奏用タイマ.n現在時刻ms * divided_songspeed);
|
||||
chipNoHit.eNoteState = ENoteState.wait;
|
||||
this.nWaitButton = waitInstr;
|
||||
//this.nWaitButton = waitInstr;
|
||||
this.nStoredHit[nUsePlayer] = (int)_pad;
|
||||
}
|
||||
}
|
||||
else if (chipNoHit.eNoteState == ENoteState.wait)
|
||||
{
|
||||
|
||||
bool _isExpected = NotesManager.IsExpectedPad(this.nStoredHit[nUsePlayer], (int)_pad, chipNoHit, _gt);
|
||||
|
||||
// Double tap success
|
||||
if (this.nWaitButton == waitRec && time <= 110 && chipNoHit.nProcessTime
|
||||
+ nWaitTime > (int)(CSound管理.rc演奏用タイマ.n現在時刻ms * divided_songspeed))
|
||||
// (this.nWaitButton == waitRec && _timeB110 && chipNoHit.nProcessTime
|
||||
// + nWaitTime > (int)(CSound管理.rc演奏用タイマ.n現在時刻ms * divided_songspeed))
|
||||
|
||||
if (_isExpected && _timeB110 && chipNoHit.nProcessTime
|
||||
+ nWaitTime > (int)(CSound管理.rc演奏用タイマ.n現在時刻ms * divided_songspeed))
|
||||
{
|
||||
this.tドラムヒット処理(nTime, _pad, chipNoHit, true, nUsePlayer);
|
||||
bHitted = true;
|
||||
this.nWaitButton = 0;
|
||||
//this.nWaitButton = 0;
|
||||
this.nStoredHit[nUsePlayer] = 0;
|
||||
}
|
||||
|
||||
// Double tap failure
|
||||
else if (this.nWaitButton == waitInstr && time <= 110 && chipNoHit.nProcessTime
|
||||
+ nWaitTime < (int)(CSound管理.rc演奏用タイマ.n現在時刻ms * divided_songspeed))
|
||||
// else if (this.nWaitButton == waitInstr && _timeB110 && chipNoHit.nProcessTime
|
||||
// + nWaitTime < (int)(CSound管理.rc演奏用タイマ.n現在時刻ms * divided_songspeed))
|
||||
else if (!_isExpected || (_timeB110 && chipNoHit.nProcessTime
|
||||
+ nWaitTime < (int)(CSound管理.rc演奏用タイマ.n現在時刻ms * divided_songspeed)))
|
||||
{
|
||||
this.tドラムヒット処理(nTime, _pad, chipNoHit, false, nUsePlayer);
|
||||
bHitted = true;
|
||||
this.nWaitButton = 0;
|
||||
if (!_isPinkKonga)
|
||||
{
|
||||
this.tドラムヒット処理(nTime, _pad, chipNoHit, false, nUsePlayer);
|
||||
bHitted = true;
|
||||
}
|
||||
|
||||
//this.nWaitButton = 0;
|
||||
this.nStoredHit[nUsePlayer] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2414,6 +2434,7 @@ namespace TJAPlayer3
|
||||
EGameType _gt = TJAPlayer3.ConfigIni.nGameType[TJAPlayer3.GetActualPlayer(i)];
|
||||
bool _isBigKaTaiko = NotesManager.IsBigKaTaiko(chipNoHit, _gt);
|
||||
bool _isBigDonTaiko = NotesManager.IsBigDonTaiko(chipNoHit, _gt);
|
||||
bool _isSwapNote = NotesManager.IsSwapNote(chipNoHit, _gt);
|
||||
|
||||
if (chipNoHit != null && (_isBigDonTaiko || _isBigKaTaiko))
|
||||
{
|
||||
@ -2422,11 +2443,17 @@ namespace TJAPlayer3
|
||||
if (chipNoHit.eNoteState == ENoteState.wait && timeC <= 110
|
||||
&& chipNoHit.nProcessTime + nWaitTime <= (int)(CSound管理.rc演奏用タイマ.n現在時刻 * (((double)TJAPlayer3.ConfigIni.n演奏速度) / 20.0)))
|
||||
{
|
||||
this.tドラムヒット処理(chipNoHit.nProcessTime, Eパッド.RRed, chipNoHit, false, i);
|
||||
this.nWaitButton = 0;
|
||||
if (!_isSwapNote)
|
||||
{
|
||||
this.tドラムヒット処理(chipNoHit.nProcessTime, Eパッド.RRed, chipNoHit, false, i);
|
||||
//this.nWaitButton = 0;
|
||||
this.nStoredHit[i] = 0;
|
||||
chipNoHit.bHit = true;
|
||||
chipNoHit.IsHitted = true;
|
||||
}
|
||||
|
||||
|
||||
chipNoHit.eNoteState = ENoteState.none;
|
||||
chipNoHit.bHit = true;
|
||||
chipNoHit.IsHitted = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,6 +10,75 @@ namespace TJAPlayer3
|
||||
// Simple class containing functions to simplify readability of CChip elements
|
||||
class NotesManager
|
||||
{
|
||||
public static Dictionary<string, int> NoteCorrespondanceDictionnary = new Dictionary<string, int>()
|
||||
{
|
||||
["0"] = 0, // Empty
|
||||
["1"] = 1, // Small Don (Taiko) | Red (right) hit (Konga)
|
||||
["2"] = 2, // Small Ka (Taiko) | Yellow (left) hit (Konga)
|
||||
["3"] = 3, // Big Don (Taiko) | Pink note (Konga)
|
||||
["4"] = 4, // Big Ka (Taiko) | Clap (Konga)
|
||||
["5"] = 5, // Small roll start
|
||||
["6"] = 6, // Big roll start
|
||||
["7"] = 7, // Balloon
|
||||
["8"] = 8, // Roll/Balloon end
|
||||
["9"] = 7, // Kusudama (Currently treated as balloon)
|
||||
["A"] = 10, // Joint Big Don (2P)
|
||||
["B"] = 11, // Joint Big Ka (2P)
|
||||
["C"] = 0, // Mine (Coming soon)
|
||||
["D"] = 0, // Unused
|
||||
["E"] = 6, // Konga clap roll (Coming soon)
|
||||
["F"] = 15, // ADLib
|
||||
["G"] = 3, // Green (Purple) double hit note (Coming soon)
|
||||
["H"] = 5, // Konga red roll (Coming soon)
|
||||
["I"] = 5, // Konga yellow roll (Coming soon)
|
||||
};
|
||||
|
||||
public static int GetNoteValueFromChar(string chr)
|
||||
{
|
||||
if (NoteCorrespondanceDictionnary.ContainsKey(chr))
|
||||
return NoteCorrespondanceDictionnary[chr];
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static bool IsExpectedPad(int stored, int hit, CDTX.CChip chip, EGameType gt)
|
||||
{
|
||||
var inPad = (Eパッド)hit;
|
||||
var onPad = (Eパッド)stored;
|
||||
|
||||
if (IsBigKaTaiko(chip, gt))
|
||||
{
|
||||
return (inPad == Eパッド.LBlue && onPad == Eパッド.RBlue)
|
||||
|| (inPad == Eパッド.RBlue && onPad == Eパッド.LBlue);
|
||||
}
|
||||
|
||||
if (IsBigDonTaiko(chip, gt))
|
||||
{
|
||||
return (inPad == Eパッド.LRed && onPad == Eパッド.RRed)
|
||||
|| (inPad == Eパッド.RRed && onPad == Eパッド.LRed);
|
||||
}
|
||||
|
||||
if (IsSwapNote(chip, gt))
|
||||
{
|
||||
bool hitBlue = inPad == Eパッド.LBlue || inPad == Eパッド.RBlue;
|
||||
bool hitRed = inPad == Eパッド.LRed || inPad == Eパッド.RRed;
|
||||
bool storedBlue = onPad == Eパッド.LBlue || onPad == Eパッド.RBlue;
|
||||
bool storedRed = onPad == Eパッド.LRed || onPad == Eパッド.RRed;
|
||||
|
||||
return (storedRed && hitBlue)
|
||||
|| (storedBlue && hitRed);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool IsCommonNote(CDTX.CChip chip)
|
||||
{
|
||||
return chip.nチャンネル番号 >= 0x11 && chip.nチャンネル番号 < 0x18;
|
||||
}
|
||||
public static bool IsMine(CDTX.CChip chip)
|
||||
{
|
||||
return chip.nチャンネル番号 == 0x1C;
|
||||
}
|
||||
|
||||
public static bool IsSmallNote(CDTX.CChip chip, bool blue)
|
||||
{
|
||||
|
BIN
Test/System/SimpleStyle/Graphics/5_Game/Mine.png
Normal file
BIN
Test/System/SimpleStyle/Graphics/5_Game/Mine.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
Loading…
Reference in New Issue
Block a user