Make hold checkpoints a struct Game member, not a metric. It CANNOT be a metric because it affects max DP.
This commit is contained in:
@@ -1149,10 +1149,6 @@ HoldJudgmentsUnderField=false
|
|||||||
ComboUnderField=false
|
ComboUnderField=false
|
||||||
PenalizeTapScoreNone=false
|
PenalizeTapScoreNone=false
|
||||||
JudgeHoldNotesOnSameRowTogether=false
|
JudgeHoldNotesOnSameRowTogether=false
|
||||||
HoldCheckpoints=IsGame("pump")
|
|
||||||
CheckpointsUseTickcounts=IsGame("pump")
|
|
||||||
; deprecated?
|
|
||||||
CheckpointsUseTimeSignatures=false
|
|
||||||
CheckpointsTapsSeparateJudgment=not IsGame("pump")
|
CheckpointsTapsSeparateJudgment=not IsGame("pump")
|
||||||
; someone misunderstood me :x -Daisu
|
; someone misunderstood me :x -Daisu
|
||||||
CheckpointsFlashOnHold=IsGame("pump")
|
CheckpointsFlashOnHold=IsGame("pump")
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ public:
|
|||||||
|
|
||||||
/** @brief Do we count multiple notes in a row as separate notes, or as one note? */
|
/** @brief Do we count multiple notes in a row as separate notes, or as one note? */
|
||||||
bool m_bCountNotesSeparately;
|
bool m_bCountNotesSeparately;
|
||||||
|
bool m_bTickHolds;
|
||||||
|
|
||||||
InputScheme m_InputScheme;
|
InputScheme m_InputScheme;
|
||||||
|
|
||||||
|
|||||||
@@ -503,6 +503,7 @@ static const Game g_Game_Dance =
|
|||||||
"dance", // m_szName
|
"dance", // m_szName
|
||||||
g_apGame_Dance_Styles, // m_apStyles
|
g_apGame_Dance_Styles, // m_apStyles
|
||||||
false, // m_bCountNotesSeparately
|
false, // m_bCountNotesSeparately
|
||||||
|
false, // m_bTickHolds
|
||||||
{ // m_InputScheme
|
{ // m_InputScheme
|
||||||
"dance", // m_szName
|
"dance", // m_szName
|
||||||
NUM_DANCE_BUTTONS, // m_iButtonsPerController
|
NUM_DANCE_BUTTONS, // m_iButtonsPerController
|
||||||
@@ -873,6 +874,7 @@ static const Game g_Game_Pump =
|
|||||||
"pump", // m_szName
|
"pump", // m_szName
|
||||||
g_apGame_Pump_Styles, // m_apStyles
|
g_apGame_Pump_Styles, // m_apStyles
|
||||||
false, // m_bCountNotesSeparately
|
false, // m_bCountNotesSeparately
|
||||||
|
true, // m_bTickHolds
|
||||||
{ // m_InputScheme
|
{ // m_InputScheme
|
||||||
"pump", // m_szName
|
"pump", // m_szName
|
||||||
NUM_PUMP_BUTTONS, // m_iButtonsPerController
|
NUM_PUMP_BUTTONS, // m_iButtonsPerController
|
||||||
@@ -1055,6 +1057,7 @@ static const Game g_Game_KB7 =
|
|||||||
"kb7", // m_szName
|
"kb7", // m_szName
|
||||||
g_apGame_KB7_Styles, // m_apStyles
|
g_apGame_KB7_Styles, // m_apStyles
|
||||||
true, // m_bCountNotesSeparately
|
true, // m_bCountNotesSeparately
|
||||||
|
false, // m_bTickHolds
|
||||||
{ // m_InputScheme
|
{ // m_InputScheme
|
||||||
"kb7", // m_szName
|
"kb7", // m_szName
|
||||||
NUM_KB7_BUTTONS, // m_iButtonsPerController
|
NUM_KB7_BUTTONS, // m_iButtonsPerController
|
||||||
@@ -1326,6 +1329,7 @@ static const Game g_Game_Ez2 =
|
|||||||
"ez2", // m_szName
|
"ez2", // m_szName
|
||||||
g_apGame_Ez2_Styles, // m_apStyles
|
g_apGame_Ez2_Styles, // m_apStyles
|
||||||
true, // m_bCountNotesSeparately
|
true, // m_bCountNotesSeparately
|
||||||
|
false, // m_bTickHolds
|
||||||
{ // m_InputScheme
|
{ // m_InputScheme
|
||||||
"ez2", // m_szName
|
"ez2", // m_szName
|
||||||
NUM_EZ2_BUTTONS, // m_iButtonsPerController
|
NUM_EZ2_BUTTONS, // m_iButtonsPerController
|
||||||
@@ -1458,6 +1462,7 @@ static const Game g_Game_Para =
|
|||||||
"para", // m_szName
|
"para", // m_szName
|
||||||
g_apGame_Para_Styles, // m_apStyles
|
g_apGame_Para_Styles, // m_apStyles
|
||||||
false, // m_bCountNotesSeparately
|
false, // m_bCountNotesSeparately
|
||||||
|
false, // m_bTickHolds
|
||||||
{ // m_InputScheme
|
{ // m_InputScheme
|
||||||
"para", // m_szName
|
"para", // m_szName
|
||||||
NUM_PARA_BUTTONS, // m_iButtonsPerController
|
NUM_PARA_BUTTONS, // m_iButtonsPerController
|
||||||
@@ -1555,6 +1560,7 @@ static const Game g_Game_DS3DDX =
|
|||||||
"ds3ddx", // m_szName
|
"ds3ddx", // m_szName
|
||||||
g_apGame_DS3DDX_Styles, // m_apStyles
|
g_apGame_DS3DDX_Styles, // m_apStyles
|
||||||
false, // m_bCountNotesSeparately
|
false, // m_bCountNotesSeparately
|
||||||
|
false, // m_bTickHolds
|
||||||
{ // m_InputScheme
|
{ // m_InputScheme
|
||||||
"ds3ddx", // m_szName
|
"ds3ddx", // m_szName
|
||||||
NUM_DS3DDX_BUTTONS, // m_iButtonsPerController
|
NUM_DS3DDX_BUTTONS, // m_iButtonsPerController
|
||||||
@@ -1900,6 +1906,7 @@ static const Game g_Game_Beat =
|
|||||||
"beat", // m_szName
|
"beat", // m_szName
|
||||||
g_apGame_Beat_Styles, // m_apStyles
|
g_apGame_Beat_Styles, // m_apStyles
|
||||||
true, // m_bCountNotesSeparately
|
true, // m_bCountNotesSeparately
|
||||||
|
false, // m_bTickHolds
|
||||||
{ // m_InputScheme
|
{ // m_InputScheme
|
||||||
"beat", // m_szName
|
"beat", // m_szName
|
||||||
NUM_BEAT_BUTTONS, // m_iButtonsPerController
|
NUM_BEAT_BUTTONS, // m_iButtonsPerController
|
||||||
@@ -2079,6 +2086,7 @@ static const Game g_Game_Maniax =
|
|||||||
"maniax", // m_szName
|
"maniax", // m_szName
|
||||||
g_apGame_Maniax_Styles, // m_apStyles
|
g_apGame_Maniax_Styles, // m_apStyles
|
||||||
false, // m_bCountNotesSeparately
|
false, // m_bCountNotesSeparately
|
||||||
|
false, // m_bTickHolds
|
||||||
{ // m_InputScheme
|
{ // m_InputScheme
|
||||||
"maniax", // m_szName
|
"maniax", // m_szName
|
||||||
NUM_MANIAX_BUTTONS, // m_iButtonsPerController
|
NUM_MANIAX_BUTTONS, // m_iButtonsPerController
|
||||||
@@ -2558,6 +2566,7 @@ static const Game g_Game_Techno =
|
|||||||
"techno", // m_szName
|
"techno", // m_szName
|
||||||
g_apGame_Techno_Styles, // m_apStyles
|
g_apGame_Techno_Styles, // m_apStyles
|
||||||
false, // m_bCountNotesSeparately
|
false, // m_bCountNotesSeparately
|
||||||
|
false, // m_bTickHolds
|
||||||
{ // m_InputScheme
|
{ // m_InputScheme
|
||||||
"techno", // m_szName
|
"techno", // m_szName
|
||||||
NUM_TECHNO_BUTTONS, // m_iButtonsPerController
|
NUM_TECHNO_BUTTONS, // m_iButtonsPerController
|
||||||
@@ -2708,6 +2717,7 @@ static const Game g_Game_Popn =
|
|||||||
"popn", // m_szName
|
"popn", // m_szName
|
||||||
g_apGame_Popn_Styles, // m_apStyles
|
g_apGame_Popn_Styles, // m_apStyles
|
||||||
true, // m_bCountNotesSeparately
|
true, // m_bCountNotesSeparately
|
||||||
|
false, // m_bTickHolds
|
||||||
{ // m_InputScheme
|
{ // m_InputScheme
|
||||||
"popn", // m_szName
|
"popn", // m_szName
|
||||||
NUM_POPN_BUTTONS, // m_iButtonsPerController
|
NUM_POPN_BUTTONS, // m_iButtonsPerController
|
||||||
@@ -2813,6 +2823,7 @@ static const Game g_Game_Lights =
|
|||||||
"lights", // m_szName
|
"lights", // m_szName
|
||||||
g_apGame_Lights_Styles, // m_apStyles
|
g_apGame_Lights_Styles, // m_apStyles
|
||||||
false, // m_bCountNotesSeparately
|
false, // m_bCountNotesSeparately
|
||||||
|
false, // m_bTickHolds
|
||||||
{ // m_InputScheme
|
{ // m_InputScheme
|
||||||
"lights", // m_szName
|
"lights", // m_szName
|
||||||
NUM_LIGHTS_BUTTONS, // m_iButtonsPerController
|
NUM_LIGHTS_BUTTONS, // m_iButtonsPerController
|
||||||
|
|||||||
+9
-37
@@ -140,26 +140,6 @@ ThemeMetric<float> INITIAL_HOLD_LIFE ( "Player", "InitialHoldLife" );
|
|||||||
ThemeMetric<float> MAX_HOLD_LIFE ( "Player", "MaxHoldLife" );
|
ThemeMetric<float> MAX_HOLD_LIFE ( "Player", "MaxHoldLife" );
|
||||||
ThemeMetric<bool> PENALIZE_TAP_SCORE_NONE ( "Player", "PenalizeTapScoreNone" );
|
ThemeMetric<bool> PENALIZE_TAP_SCORE_NONE ( "Player", "PenalizeTapScoreNone" );
|
||||||
ThemeMetric<bool> JUDGE_HOLD_NOTES_ON_SAME_ROW_TOGETHER ( "Player", "JudgeHoldNotesOnSameRowTogether" );
|
ThemeMetric<bool> JUDGE_HOLD_NOTES_ON_SAME_ROW_TOGETHER ( "Player", "JudgeHoldNotesOnSameRowTogether" );
|
||||||
/**
|
|
||||||
* @brief Does StepMania use checkpoint judgments when interacting with holds?
|
|
||||||
*
|
|
||||||
* If set to true, checkpoint judgments are in use, similar to the Pump It Up
|
|
||||||
* series. If set to false, no such judgments are used. */
|
|
||||||
ThemeMetric<bool> HOLD_CHECKPOINTS ( "Player", "HoldCheckpoints" );
|
|
||||||
/**
|
|
||||||
* @brief If using checkpoints, are the song's TickcountSegments used?
|
|
||||||
*
|
|
||||||
* If set to true, the checkpoints rely on the data found in the TickcountSegments.
|
|
||||||
* This is used via the #%TICKCOUNTS tag. */
|
|
||||||
ThemeMetric<bool> CHECKPOINTS_USE_TICKCOUNTS ( "Player", "CheckpointsUseTickcounts" );
|
|
||||||
/**
|
|
||||||
* @brief If using checkpoints, are the song's TimeSignatureSegments used?
|
|
||||||
*
|
|
||||||
* If set to true AND CheckpointsUseTickcounts is set to false, the TimeSignatureSegments
|
|
||||||
* are used to determine how often the checkpoints are found.
|
|
||||||
*
|
|
||||||
* It should be noted that this is a deprecated metric. */
|
|
||||||
ThemeMetric<bool> CHECKPOINTS_USE_TIME_SIGNATURES ( "Player", "CheckpointsUseTimeSignatures" );
|
|
||||||
ThemeMetric<bool> CHECKPOINTS_FLASH_ON_HOLD ( "Player", "CheckpointsFlashOnHold" ); // sm-ssc addition
|
ThemeMetric<bool> CHECKPOINTS_FLASH_ON_HOLD ( "Player", "CheckpointsFlashOnHold" ); // sm-ssc addition
|
||||||
ThemeMetric<bool> IMMEDIATE_HOLD_LET_GO ( "Player", "ImmediateHoldLetGo" );
|
ThemeMetric<bool> IMMEDIATE_HOLD_LET_GO ( "Player", "ImmediateHoldLetGo" );
|
||||||
/**
|
/**
|
||||||
@@ -636,6 +616,9 @@ void Player::Load()
|
|||||||
{
|
{
|
||||||
m_bLoaded = true;
|
m_bLoaded = true;
|
||||||
|
|
||||||
|
// Figured this is probably a little expensive so let's cache it
|
||||||
|
m_bTickHolds = GAMESTATE->GetCurrentGame()->m_bTickHolds;
|
||||||
|
|
||||||
m_LastTapNoteScore = TNS_None;
|
m_LastTapNoteScore = TNS_None;
|
||||||
// The editor can start playing in the middle of the song.
|
// The editor can start playing in the middle of the song.
|
||||||
const int iNoteRow = BeatToNoteRowNotRounded( m_pPlayerState->m_Position.m_fSongBeat );
|
const int iNoteRow = BeatToNoteRowNotRounded( m_pPlayerState->m_Position.m_fSongBeat );
|
||||||
@@ -1359,7 +1342,7 @@ void Player::UpdateHoldNotes( int iSongRow, float fDeltaTime, vector<TrackRowTap
|
|||||||
bool bLetGoOfHoldNote = false;
|
bool bLetGoOfHoldNote = false;
|
||||||
|
|
||||||
/* Score rolls that end with fLife == 0 as LetGo, even if
|
/* Score rolls that end with fLife == 0 as LetGo, even if
|
||||||
* HOLD_CHECKPOINTS is on. Rolls don't have iCheckpointsMissed set, so,
|
* m_bTickHolds is on. Rolls don't have iCheckpointsMissed set, so,
|
||||||
* unless we check Life == 0, rolls would always be scored as Held. */
|
* unless we check Life == 0, rolls would always be scored as Held. */
|
||||||
bool bAllowHoldCheckpoints;
|
bool bAllowHoldCheckpoints;
|
||||||
switch( subType )
|
switch( subType )
|
||||||
@@ -1378,7 +1361,7 @@ void Player::UpdateHoldNotes( int iSongRow, float fDeltaTime, vector<TrackRowTap
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
if( HOLD_CHECKPOINTS && bAllowHoldCheckpoints )
|
if( m_bTickHolds && bAllowHoldCheckpoints )
|
||||||
{
|
{
|
||||||
//LOG->Trace("(hold checkpoints are allowed and enabled.)");
|
//LOG->Trace("(hold checkpoints are allowed and enabled.)");
|
||||||
int iCheckpointsHit = 0;
|
int iCheckpointsHit = 0;
|
||||||
@@ -3024,22 +3007,11 @@ void Player::CrossedRows( int iLastRowCrossed, const RageTimer &now )
|
|||||||
/* Update hold checkpoints
|
/* Update hold checkpoints
|
||||||
*
|
*
|
||||||
* TODO: Move this to a separate function. */
|
* TODO: Move this to a separate function. */
|
||||||
if( HOLD_CHECKPOINTS && m_pPlayerState->m_PlayerController != PC_AUTOPLAY )
|
if( m_bTickHolds && m_pPlayerState->m_PlayerController != PC_AUTOPLAY )
|
||||||
{
|
{
|
||||||
int iCheckpointFrequencyRows = ROWS_PER_BEAT/2;
|
// There are some charts that don't want tickcounts involved at all.
|
||||||
if( CHECKPOINTS_USE_TICKCOUNTS )
|
int tickCurrent = m_Timing->GetTickcountAtRow( iLastRowCrossed );
|
||||||
{
|
int iCheckpointFrequencyRows = ( tickCurrent > 0 ? ROWS_PER_BEAT / tickCurrent : 0 );
|
||||||
int tickCurrent = m_Timing->GetTickcountAtRow( iLastRowCrossed );
|
|
||||||
// There are some charts that don't want tickcounts involved at all.
|
|
||||||
iCheckpointFrequencyRows = (tickCurrent > 0 ? ROWS_PER_BEAT / tickCurrent : 0);
|
|
||||||
}
|
|
||||||
else if( CHECKPOINTS_USE_TIME_SIGNATURES )
|
|
||||||
{
|
|
||||||
TimeSignatureSegment * tSignature = m_Timing->GetTimeSignatureSegmentAtRow( iLastRowCrossed );
|
|
||||||
|
|
||||||
// Most songs are in 4/4 time. The frequency for checking tick counts should reflect that.
|
|
||||||
iCheckpointFrequencyRows = ROWS_PER_BEAT * tSignature->GetDen() / (tSignature->GetNum() * 4);
|
|
||||||
}
|
|
||||||
|
|
||||||
if( iCheckpointFrequencyRows > 0 )
|
if( iCheckpointFrequencyRows > 0 )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -226,6 +226,7 @@ protected:
|
|||||||
TweenState m_tsCombo[NUM_REVERSE][NUM_CENTERED];
|
TweenState m_tsCombo[NUM_REVERSE][NUM_CENTERED];
|
||||||
|
|
||||||
bool m_bSendJudgmentAndComboMessages;
|
bool m_bSendJudgmentAndComboMessages;
|
||||||
|
bool m_bTickHolds;
|
||||||
};
|
};
|
||||||
|
|
||||||
class PlayerPlus
|
class PlayerPlus
|
||||||
|
|||||||
Reference in New Issue
Block a user