"m_pCurNotes" -> "m_pCurSteps"
This commit is contained in:
@@ -73,7 +73,7 @@ Background::Background()
|
||||
bOneOrMoreChars = true;
|
||||
// Disable dancing characters if BH will be showing.
|
||||
if( PREFSMAN->m_bShowBeginnerHelper && BeginnerHelper::CanUse() &&
|
||||
GAMESTATE->m_pCurNotes[p] && GAMESTATE->m_pCurNotes[p]->GetDifficulty() == DIFFICULTY_BEGINNER )
|
||||
GAMESTATE->m_pCurSteps[p] && GAMESTATE->m_pCurSteps[p]->GetDifficulty() == DIFFICULTY_BEGINNER )
|
||||
bShowingBeginnerHelper = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -376,9 +376,9 @@ void ConditionalBGA::CheckBgaRequirements(BgaCondInfo info)
|
||||
{
|
||||
if(GAMESTATE->IsPlayerEnabled(pn))
|
||||
{
|
||||
if(GAMESTATE->m_pCurNotes[pn] != NULL)
|
||||
if(GAMESTATE->m_pCurSteps[pn] != NULL)
|
||||
{
|
||||
if(GAMESTATE->m_pCurNotes[pn]->GetDifficulty() == info.difficulties[d])
|
||||
if(GAMESTATE->m_pCurSteps[pn]->GetDifficulty() == info.difficulties[d])
|
||||
{
|
||||
foundmatchingdiff = true;
|
||||
LOG->Info("Found Valid Difficulty");
|
||||
@@ -458,19 +458,19 @@ void ConditionalBGA::CheckBgaRequirements(BgaCondInfo info)
|
||||
{
|
||||
if(GAMESTATE->IsPlayerEnabled(pn))
|
||||
{
|
||||
if(GAMESTATE->m_pCurNotes[pn] != NULL)
|
||||
if(GAMESTATE->m_pCurSteps[pn] != NULL)
|
||||
{
|
||||
if(info.songmeters[d] < 0) // negative values stored mean we want to check a value greaterthan or equal to its negative
|
||||
{
|
||||
// first make it positive then check to see if the footrating is >= to it
|
||||
int tmp = 0 - info.songmeters[d];
|
||||
if(GAMESTATE->m_pCurNotes[pn]->GetMeter() >= tmp)
|
||||
if(GAMESTATE->m_pCurSteps[pn]->GetMeter() >= tmp)
|
||||
{
|
||||
LOG->Info("Found Valid MeterRating");
|
||||
foundmatchingmeter = true;
|
||||
}
|
||||
}
|
||||
else if(GAMESTATE->m_pCurNotes[pn]->GetMeter() == info.songmeters[d])
|
||||
else if(GAMESTATE->m_pCurSteps[pn]->GetMeter() == info.songmeters[d])
|
||||
{
|
||||
LOG->Info("Found Valid MeterRating");
|
||||
foundmatchingmeter = true;
|
||||
|
||||
@@ -94,14 +94,14 @@ int DifficultyList::GetCurrentRowIndex( PlayerNumber pn ) const
|
||||
{
|
||||
const Row &row = m_Rows[i];
|
||||
|
||||
if( GAMESTATE->m_pCurNotes[pn] == NULL )
|
||||
if( GAMESTATE->m_pCurSteps[pn] == NULL )
|
||||
{
|
||||
if( row.m_dc == GAMESTATE->m_PreferredDifficulty[pn] )
|
||||
return i;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( GAMESTATE->m_pCurNotes[pn] == row.m_Steps )
|
||||
if( GAMESTATE->m_pCurSteps[pn] == row.m_Steps )
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ void DifficultyMeter::SetFromGameState( PlayerNumber pn )
|
||||
}
|
||||
else
|
||||
{
|
||||
Steps* pSteps = GAMESTATE->m_pCurNotes[pn];
|
||||
Steps* pSteps = GAMESTATE->m_pCurSteps[pn];
|
||||
if( pSteps )
|
||||
SetFromNotes( pSteps );
|
||||
else
|
||||
|
||||
@@ -130,15 +130,15 @@ EditMenu::EditMenu()
|
||||
OnRowValueChanged( ROW_SONG );
|
||||
|
||||
// Select the current StepsType and difficulty if any
|
||||
if( GAMESTATE->m_pCurNotes[PLAYER_1] )
|
||||
if( GAMESTATE->m_pCurSteps[PLAYER_1] )
|
||||
{
|
||||
for( i=0; i<m_StepsTypes.size(); i++ )
|
||||
{
|
||||
if( m_StepsTypes[i] == GAMESTATE->m_pCurNotes[PLAYER_1]->m_StepsType )
|
||||
if( m_StepsTypes[i] == GAMESTATE->m_pCurSteps[PLAYER_1]->m_StepsType )
|
||||
{
|
||||
m_iSelection[ROW_NOTES_TYPE] = i;
|
||||
OnRowValueChanged( ROW_NOTES_TYPE );
|
||||
m_iSelection[ROW_DIFFICULTY] = GAMESTATE->m_pCurNotes[PLAYER_1]->GetDifficulty();
|
||||
m_iSelection[ROW_DIFFICULTY] = GAMESTATE->m_pCurSteps[PLAYER_1]->GetDifficulty();
|
||||
OnRowValueChanged( ROW_DIFFICULTY );
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ void GameState::Reset()
|
||||
|
||||
m_pCurSong = NULL;
|
||||
FOREACH_PlayerNumber( p )
|
||||
m_pCurNotes[p] = NULL;
|
||||
m_pCurSteps[p] = NULL;
|
||||
m_pCurCourse = NULL;
|
||||
FOREACH_PlayerNumber( p )
|
||||
m_pCurTrail[p] = NULL;
|
||||
@@ -909,8 +909,8 @@ bool GameState::HasEarnedExtraStage() const
|
||||
if( !this->IsPlayerEnabled(p) )
|
||||
continue; // skip
|
||||
|
||||
if( this->m_pCurNotes[p]->GetDifficulty() != DIFFICULTY_HARD &&
|
||||
this->m_pCurNotes[p]->GetDifficulty() != DIFFICULTY_CHALLENGE )
|
||||
if( this->m_pCurSteps[p]->GetDifficulty() != DIFFICULTY_HARD &&
|
||||
this->m_pCurSteps[p]->GetDifficulty() != DIFFICULTY_CHALLENGE )
|
||||
continue; /* not hard enough! */
|
||||
|
||||
/* If "choose EX" is enabled, then we should only grant EX2 if the chosen
|
||||
@@ -1054,7 +1054,7 @@ bool GameState::IsDisqualified( PlayerNumber pn )
|
||||
{
|
||||
return GAMESTATE->m_PlayerOptions[pn].IsEasierForSongAndSteps(
|
||||
GAMESTATE->m_pCurSong,
|
||||
GAMESTATE->m_pCurNotes[pn] );
|
||||
GAMESTATE->m_pCurSteps[pn] );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1736,12 +1736,12 @@ Difficulty GameState::GetEasiestNotesDifficulty() const
|
||||
Difficulty dc = DIFFICULTY_INVALID;
|
||||
FOREACH_HumanPlayer( p )
|
||||
{
|
||||
if( this->m_pCurNotes[p] == NULL )
|
||||
if( this->m_pCurSteps[p] == NULL )
|
||||
{
|
||||
LOG->Warn( "GetEasiestNotesDifficulty called but p%i hasn't chosen notes", p+1 );
|
||||
continue;
|
||||
}
|
||||
dc = min( dc, this->m_pCurNotes[p]->GetDifficulty() );
|
||||
dc = min( dc, this->m_pCurSteps[p]->GetDifficulty() );
|
||||
}
|
||||
return dc;
|
||||
}
|
||||
@@ -1778,7 +1778,7 @@ LuaFunction_NoArgs( GetEasiestNotesDifficulty, GAMESTATE->GetEasiestNotesDifficu
|
||||
/* Return an integer into SONGMAN->m_pSongs. This lets us do input checking, which we
|
||||
* can't easily do if we return pointers. */
|
||||
LuaFunction_NoArgs( CurSong, GAMESTATE->m_pCurSong )
|
||||
LuaFunction_PlayerNumber( CurSteps, GAMESTATE->m_pCurNotes[pn] )
|
||||
LuaFunction_PlayerNumber( CurSteps, GAMESTATE->m_pCurSteps[pn] )
|
||||
|
||||
int LuaFunc_UsingModifier( lua_State *L )
|
||||
{
|
||||
|
||||
@@ -140,7 +140,7 @@ public:
|
||||
// State Info used during gameplay
|
||||
//
|
||||
Song* m_pCurSong;
|
||||
Steps* m_pCurNotes[NUM_PLAYERS];
|
||||
Steps* m_pCurSteps[NUM_PLAYERS];
|
||||
Course* m_pCurCourse;
|
||||
Course* m_pCurTrail[NUM_PLAYERS];
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ void LifeMeterBattery::OnSongEnded()
|
||||
if( m_iLivesLeft < GAMESTATE->m_SongOptions.m_iBatteryLives )
|
||||
{
|
||||
m_iTrailingLivesLeft = m_iLivesLeft;
|
||||
m_iLivesLeft += ( GAMESTATE->m_pCurNotes[m_PlayerNumber]->GetMeter()>=8 ? 2 : 1 );
|
||||
m_iLivesLeft += ( GAMESTATE->m_pCurSteps[m_PlayerNumber]->GetMeter()>=8 ? 2 : 1 );
|
||||
m_iLivesLeft = min( m_iLivesLeft, GAMESTATE->m_SongOptions.m_iBatteryLives );
|
||||
m_soundGainLife.Play();
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ bool ModeChoice::DescribesCurrentMode( PlayerNumber pn ) const
|
||||
|
||||
if( m_pSong && GAMESTATE->m_pCurSong != m_pSong )
|
||||
return false;
|
||||
if( m_pSteps && GAMESTATE->m_pCurNotes[pn] != m_pSteps )
|
||||
if( m_pSteps && GAMESTATE->m_pCurSteps[pn] != m_pSteps )
|
||||
return false;
|
||||
if( m_pCharacter && GAMESTATE->m_pCurCharacters[pn] != m_pCharacter )
|
||||
return false;
|
||||
@@ -424,7 +424,7 @@ void ModeChoice::Apply( PlayerNumber pn ) const
|
||||
if( m_pSong )
|
||||
GAMESTATE->m_pCurSong = m_pSong;
|
||||
if( m_pSteps )
|
||||
GAMESTATE->m_pCurNotes[pn] = m_pSteps;
|
||||
GAMESTATE->m_pCurSteps[pn] = m_pSteps;
|
||||
if( m_pCourse )
|
||||
GAMESTATE->m_pCurCourse = m_pCourse;
|
||||
if( m_pCharacter )
|
||||
|
||||
@@ -165,7 +165,7 @@ void MusicWheel::Load()
|
||||
{
|
||||
if( GAMESTATE->IsHumanPlayer(p) )
|
||||
{
|
||||
GAMESTATE->m_pCurNotes[p] = pSteps;
|
||||
GAMESTATE->m_pCurSteps[p] = pSteps;
|
||||
GAMESTATE->m_PlayerOptions[p] = po;
|
||||
GAMESTATE->m_PreferredDifficulty[p] = pSteps->GetDifficulty();
|
||||
}
|
||||
|
||||
@@ -203,8 +203,8 @@ void MusicWheelItem::RefreshGrades()
|
||||
}
|
||||
|
||||
Difficulty dc;
|
||||
if( GAMESTATE->m_pCurNotes[p] )
|
||||
dc = GAMESTATE->m_pCurNotes[p]->GetDifficulty();
|
||||
if( GAMESTATE->m_pCurSteps[p] )
|
||||
dc = GAMESTATE->m_pCurSteps[p]->GetDifficulty();
|
||||
else
|
||||
dc = GAMESTATE->m_PreferredDifficulty[p];
|
||||
Grade grade;
|
||||
|
||||
@@ -144,7 +144,7 @@ void PaneDisplay::SetContent( PaneContents c )
|
||||
{
|
||||
m_textContents[c].SetText( "" );
|
||||
|
||||
if( (g_Contents[c].req&NEED_NOTES) && !GAMESTATE->m_pCurNotes[m_PlayerNumber] )
|
||||
if( (g_Contents[c].req&NEED_NOTES) && !GAMESTATE->m_pCurSteps[m_PlayerNumber] )
|
||||
return;
|
||||
if( (g_Contents[c].req&NEED_COURSE) && !GAMESTATE->m_pCurCourse )
|
||||
return;
|
||||
@@ -152,7 +152,7 @@ void PaneDisplay::SetContent( PaneContents c )
|
||||
return;
|
||||
|
||||
const Song *pSong = GAMESTATE->m_pCurSong;
|
||||
const Steps *pSteps = GAMESTATE->m_pCurNotes[m_PlayerNumber];
|
||||
const Steps *pSteps = GAMESTATE->m_pCurSteps[m_PlayerNumber];
|
||||
StepsType st = GAMESTATE->GetCurrentStyleDef()->m_StepsType;
|
||||
const Course *pCourse = GAMESTATE->m_pCurCourse;
|
||||
const CourseDifficulty cd = GAMESTATE->m_PreferredCourseDifficulty[m_PlayerNumber];
|
||||
@@ -161,7 +161,7 @@ void PaneDisplay::SetContent( PaneContents c )
|
||||
RadarValues rv;
|
||||
|
||||
if( g_Contents[c].req&NEED_NOTES )
|
||||
rv = GAMESTATE->m_pCurNotes[m_PlayerNumber]->GetRadarValues();
|
||||
rv = GAMESTATE->m_pCurSteps[m_PlayerNumber]->GetRadarValues();
|
||||
else if( g_Contents[c].req&NEED_COURSE )
|
||||
{
|
||||
ASSERT( pCourse );
|
||||
|
||||
@@ -47,7 +47,7 @@ ScreenAward::ScreenAward( CString sName ) : ScreenWithMenuElements( sName )
|
||||
sAward = PerDifficultyAwardToString( pda );
|
||||
sDescription =
|
||||
PerDifficultyAwardToThemedString( pda ) + "\n" +
|
||||
DifficultyToThemedString( GAMESTATE->m_pCurNotes[p]->GetDifficulty() );
|
||||
DifficultyToThemedString( GAMESTATE->m_pCurSteps[p]->GetDifficulty() );
|
||||
}
|
||||
else if( !GAMESTATE->m_vLastPeakComboAwards[p].empty() )
|
||||
{
|
||||
|
||||
@@ -279,7 +279,7 @@ ScreenEdit::ScreenEdit( CString sName ) : Screen( sName )
|
||||
SCREENMAN->RefreshCreditsMessages();
|
||||
|
||||
m_pSong = GAMESTATE->m_pCurSong;
|
||||
m_pSteps = GAMESTATE->m_pCurNotes[PLAYER_1];
|
||||
m_pSteps = GAMESTATE->m_pCurSteps[PLAYER_1];
|
||||
m_pAttacksFromCourse = NULL;
|
||||
|
||||
NoteData noteData;
|
||||
@@ -585,7 +585,7 @@ void ScreenEdit::UpdateTextInfo()
|
||||
sText += ssprintf( "Selection begin:\n %s\n", m_NoteFieldEdit.m_fBeginMarker==-1 ? "not set" : ssprintf("%.2f",m_NoteFieldEdit.m_fBeginMarker).c_str() );
|
||||
sText += ssprintf( "Selection end:\n %s\n", m_NoteFieldEdit.m_fEndMarker==-1 ? "not set" : ssprintf("%.2f",m_NoteFieldEdit.m_fEndMarker).c_str() );
|
||||
sText += ssprintf( "Difficulty:\n %s\n", DifficultyToString( m_pSteps->GetDifficulty() ).c_str() );
|
||||
sText += ssprintf( "Description:\n %s\n", GAMESTATE->m_pCurNotes[PLAYER_1] ? GAMESTATE->m_pCurNotes[PLAYER_1]->GetDescription().c_str() : "no description" );
|
||||
sText += ssprintf( "Description:\n %s\n", GAMESTATE->m_pCurSteps[PLAYER_1] ? GAMESTATE->m_pCurSteps[PLAYER_1]->GetDescription().c_str() : "no description" );
|
||||
sText += ssprintf( "Main title:\n %s\n", m_pSong->m_sMainTitle.c_str() );
|
||||
sText += ssprintf( "Sub title:\n %s\n", m_pSong->m_sSubTitle.c_str() );
|
||||
sText += ssprintf( "Tap Steps:\n %d\n", iNumTapNotes );
|
||||
@@ -945,7 +945,7 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
|
||||
case SDLK_F6:
|
||||
{
|
||||
// save current steps
|
||||
Steps* pSteps = GAMESTATE->m_pCurNotes[PLAYER_1];
|
||||
Steps* pSteps = GAMESTATE->m_pCurSteps[PLAYER_1];
|
||||
ASSERT( pSteps );
|
||||
pSteps->SetNoteData( &m_NoteFieldEdit );
|
||||
|
||||
@@ -983,7 +983,7 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
|
||||
}
|
||||
|
||||
pSteps = *it;
|
||||
GAMESTATE->m_pCurNotes[PLAYER_1] = m_pSteps = pSteps;
|
||||
GAMESTATE->m_pCurSteps[PLAYER_1] = m_pSteps = pSteps;
|
||||
pSteps->GetNoteData( &m_NoteFieldEdit );
|
||||
SCREENMAN->SystemMessage( ssprintf(
|
||||
"Switched to %s %s '%s'",
|
||||
@@ -1350,7 +1350,7 @@ void ScreenEdit::HandleScreenMessage( const ScreenMessage SM )
|
||||
GAMESTATE->m_pCurSong->RevertFromDisk( true );
|
||||
/* We might do something with m_pSteps (eg. UpdateTextInfo) before we end up
|
||||
* in ScreenEditMenu, and m_pSteps might be invalid due to RevertFromDisk. */
|
||||
m_pSteps = GAMESTATE->m_pCurNotes[PLAYER_1];
|
||||
m_pSteps = GAMESTATE->m_pCurSteps[PLAYER_1];
|
||||
SCREENMAN->SetNewScreen( "ScreenEditMenu" );
|
||||
break;
|
||||
case SM_BackFromMainMenu:
|
||||
@@ -1421,7 +1421,7 @@ void ScreenEdit::HandleScreenMessage( const ScreenMessage SM )
|
||||
StepsID id;
|
||||
id.FromSteps( m_pSteps );
|
||||
|
||||
GAMESTATE->m_pCurNotes[PLAYER_1] = NULL; /* make RevertFromDisk not try to reset it */
|
||||
GAMESTATE->m_pCurSteps[PLAYER_1] = NULL; /* make RevertFromDisk not try to reset it */
|
||||
GAMESTATE->m_pCurSong->RevertFromDisk();
|
||||
|
||||
CString sMessage = "Reloaded from disk.";
|
||||
@@ -1452,7 +1452,7 @@ void ScreenEdit::HandleScreenMessage( const ScreenMessage SM )
|
||||
|
||||
SCREENMAN->SystemMessage( sMessage );
|
||||
|
||||
m_pSteps = GAMESTATE->m_pCurNotes[PLAYER_1] = pSteps;
|
||||
m_pSteps = GAMESTATE->m_pCurSteps[PLAYER_1] = pSteps;
|
||||
m_pSteps->GetNoteData( &m_NoteFieldEdit );
|
||||
|
||||
break;
|
||||
@@ -1497,7 +1497,7 @@ void ScreenEdit::OnSnapModeChange()
|
||||
|
||||
void ChangeDescription( CString sNew )
|
||||
{
|
||||
Steps* pSteps = GAMESTATE->m_pCurNotes[PLAYER_1];
|
||||
Steps* pSteps = GAMESTATE->m_pCurSteps[PLAYER_1];
|
||||
pSteps->SetDescription(sNew);
|
||||
}
|
||||
|
||||
@@ -1554,7 +1554,7 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, int* iAnswers )
|
||||
{
|
||||
/* XXX: If the difficulty is changed from EDIT, and pSteps->WasLoadedFromProfile()
|
||||
* is true, we should warn that the steps will no longer be saved to the profile. */
|
||||
Steps* pSteps = GAMESTATE->m_pCurNotes[PLAYER_1];
|
||||
Steps* pSteps = GAMESTATE->m_pCurSteps[PLAYER_1];
|
||||
float fMusicSeconds = m_soundMusic.GetLengthSeconds();
|
||||
|
||||
g_EditNotesStatistics.rows[difficulty].defaultChoice = pSteps->GetDifficulty();
|
||||
@@ -1589,7 +1589,7 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, int* iAnswers )
|
||||
case save:
|
||||
{
|
||||
// copy edit into current Steps
|
||||
Steps* pSteps = GAMESTATE->m_pCurNotes[PLAYER_1];
|
||||
Steps* pSteps = GAMESTATE->m_pCurSteps[PLAYER_1];
|
||||
ASSERT( pSteps );
|
||||
|
||||
pSteps->SetNoteData( &m_NoteFieldEdit );
|
||||
@@ -1884,8 +1884,8 @@ void ScreenEdit::HandleAreaMenuChoice( AreaMenuChoice c, int* iAnswers )
|
||||
continue;
|
||||
|
||||
/* XXX: Edits are distinguished by description. Compare vs m_pSteps. */
|
||||
if( (sIter[i]->m_StepsType == GAMESTATE->m_pCurNotes[PLAYER_1]->m_StepsType) &&
|
||||
(sIter[i]->GetDifficulty() == GAMESTATE->m_pCurNotes[PLAYER_1]->GetDifficulty()) )
|
||||
if( (sIter[i]->m_StepsType == GAMESTATE->m_pCurSteps[PLAYER_1]->m_StepsType) &&
|
||||
(sIter[i]->GetDifficulty() == GAMESTATE->m_pCurSteps[PLAYER_1]->GetDifficulty()) )
|
||||
continue;
|
||||
|
||||
sIter[i]->GetNoteData( &ndTemp );
|
||||
@@ -1937,7 +1937,7 @@ void ScreenEdit::HandleAreaMenuChoice( AreaMenuChoice c, int* iAnswers )
|
||||
{
|
||||
/* FirstBeat affects backgrounds, so commit changes to memory (not to disk)
|
||||
* and recalc it. */
|
||||
Steps* pSteps = GAMESTATE->m_pCurNotes[PLAYER_1];
|
||||
Steps* pSteps = GAMESTATE->m_pCurSteps[PLAYER_1];
|
||||
ASSERT( pSteps );
|
||||
pSteps->SetNoteData( &m_NoteFieldEdit );
|
||||
m_pSong->ReCalculateRadarValuesAndLastBeat();
|
||||
@@ -2083,7 +2083,7 @@ void ScreenEdit::HandleAreaMenuChoice( AreaMenuChoice c, int* iAnswers )
|
||||
|
||||
void ScreenEdit::HandleEditNotesStatisticsChoice( EditNotesStatisticsChoice c, int* iAnswers )
|
||||
{
|
||||
Steps* pSteps = GAMESTATE->m_pCurNotes[PLAYER_1];
|
||||
Steps* pSteps = GAMESTATE->m_pCurSteps[PLAYER_1];
|
||||
Difficulty dc = (Difficulty)iAnswers[difficulty];
|
||||
pSteps->SetDifficulty( dc );
|
||||
int iMeter = iAnswers[meter]+1;
|
||||
|
||||
@@ -84,7 +84,7 @@ void ScreenEditMenu::MenuRight( PlayerNumber pn, const InputEventType type )
|
||||
void DeleteCurNotes( void* pThrowAway )
|
||||
{
|
||||
Song* pSong = GAMESTATE->m_pCurSong;
|
||||
Steps* pStepsToDelete = GAMESTATE->m_pCurNotes[PLAYER_1];
|
||||
Steps* pStepsToDelete = GAMESTATE->m_pCurSteps[PLAYER_1];
|
||||
pSong->RemoveSteps( pStepsToDelete );
|
||||
pSong->Save();
|
||||
}
|
||||
@@ -106,7 +106,7 @@ void ScreenEditMenu::MenuStart( PlayerNumber pn )
|
||||
|
||||
GAMESTATE->m_pCurSong = pSong;
|
||||
GAMESTATE->m_CurStyle = GAMEMAN->GetEditorStyleForNotesType( st );
|
||||
GAMESTATE->m_pCurNotes[PLAYER_1] = pSteps;
|
||||
GAMESTATE->m_pCurSteps[PLAYER_1] = pSteps;
|
||||
|
||||
//
|
||||
// handle error cases
|
||||
|
||||
@@ -118,10 +118,10 @@ void ScreenEvaluation::Init()
|
||||
GAMESTATE->m_MasterPlayerNumber = PLAYER_1;
|
||||
GAMESTATE->m_pCurSong = SONGMAN->GetRandomSong();
|
||||
GAMESTATE->m_pCurCourse = SONGMAN->GetRandomCourse();
|
||||
GAMESTATE->m_pCurNotes[PLAYER_1] = GAMESTATE->m_pCurSong->m_vpSteps[0];
|
||||
GAMESTATE->m_pCurNotes[PLAYER_2] = GAMESTATE->m_pCurSong->m_vpSteps[0];
|
||||
g_CurStageStats.pSteps[PLAYER_1] = GAMESTATE->m_pCurNotes[PLAYER_1];
|
||||
g_CurStageStats.pSteps[PLAYER_2] = GAMESTATE->m_pCurNotes[PLAYER_2];
|
||||
GAMESTATE->m_pCurSteps[PLAYER_1] = GAMESTATE->m_pCurSong->m_vpSteps[0];
|
||||
GAMESTATE->m_pCurSteps[PLAYER_2] = GAMESTATE->m_pCurSong->m_vpSteps[0];
|
||||
g_CurStageStats.pSteps[PLAYER_1] = GAMESTATE->m_pCurSteps[PLAYER_1];
|
||||
g_CurStageStats.pSteps[PLAYER_2] = GAMESTATE->m_pCurSteps[PLAYER_2];
|
||||
GAMESTATE->m_PlayerOptions[PLAYER_1].m_fScrollSpeed = 2;
|
||||
GAMESTATE->m_PlayerOptions[PLAYER_2].m_fScrollSpeed = 2;
|
||||
GAMESTATE->m_iCurrentStageIndex = 0;
|
||||
@@ -363,7 +363,7 @@ void ScreenEvaluation::Init()
|
||||
switch( m_Type )
|
||||
{
|
||||
case stage:
|
||||
m_DifficultyIcon[p].SetFromNotes( p, GAMESTATE->m_pCurNotes[p] );
|
||||
m_DifficultyIcon[p].SetFromNotes( p, GAMESTATE->m_pCurSteps[p] );
|
||||
break;
|
||||
case course:
|
||||
m_DifficultyIcon[p].SetFromCourseDifficulty( p, GAMESTATE->m_PreferredCourseDifficulty[p] );
|
||||
@@ -882,7 +882,7 @@ void ScreenEvaluation::CommitScores(
|
||||
continue;
|
||||
|
||||
Song* pSong = GAMESTATE->m_pCurSong;
|
||||
Steps* pSteps = GAMESTATE->m_pCurNotes[p];
|
||||
Steps* pSteps = GAMESTATE->m_pCurSteps[p];
|
||||
|
||||
// whether or not to save scores when the stage was failed
|
||||
// depends on if this is a course or not ... it's handled
|
||||
@@ -974,7 +974,7 @@ void ScreenEvaluation::CommitScores(
|
||||
case stage:
|
||||
{
|
||||
Song* pSong = GAMESTATE->m_pCurSong;
|
||||
Steps* pSteps = GAMESTATE->m_pCurNotes[p];
|
||||
Steps* pSteps = GAMESTATE->m_pCurSteps[p];
|
||||
pHSL = &pProfile->GetStepsHighScoreList( pSong, pSteps );
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -682,7 +682,7 @@ void ScreenEz2SelectMusic::AfterNotesChange( PlayerNumber pn )
|
||||
|
||||
Steps* pSteps = m_arrayNotes[pn].empty()? NULL: m_arrayNotes[pn][m_iSelection[pn]];
|
||||
|
||||
GAMESTATE->m_pCurNotes[pn] = pSteps;
|
||||
GAMESTATE->m_pCurSteps[pn] = pSteps;
|
||||
|
||||
|
||||
if( pSteps != NULL && pn == GAMESTATE->m_MasterPlayerNumber )
|
||||
@@ -692,9 +692,9 @@ void ScreenEz2SelectMusic::AfterNotesChange( PlayerNumber pn )
|
||||
m_DifficultyRating.SetDifficulty(pSteps->GetMeter());
|
||||
}
|
||||
|
||||
// GAMESTATE->m_pCurNotes[pn] = pSteps;
|
||||
// GAMESTATE->m_pCurSteps[pn] = pSteps;
|
||||
|
||||
// Steps* m_pSteps = GAMESTATE->m_pCurNotes[pn];
|
||||
// Steps* m_pSteps = GAMESTATE->m_pCurSteps[pn];
|
||||
|
||||
// m_FootMeter[pn].SetFromNotes( pSteps );
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ void ScreenGameplay::Init()
|
||||
|
||||
// fill in difficulty of CPU players with that of the first human player
|
||||
FOREACH_PotentialCpuPlayer(p)
|
||||
GAMESTATE->m_pCurNotes[p] = GAMESTATE->m_pCurNotes[ GAMESTATE->GetFirstHumanPlayer() ];
|
||||
GAMESTATE->m_pCurSteps[p] = GAMESTATE->m_pCurSteps[ GAMESTATE->GetFirstHumanPlayer() ];
|
||||
|
||||
switch( GAMESTATE->m_PlayMode )
|
||||
{
|
||||
@@ -227,7 +227,7 @@ void ScreenGameplay::Init()
|
||||
m_apSongsQueue.push_back( GAMESTATE->m_pCurSong );
|
||||
FOREACH_PlayerNumber(p)
|
||||
{
|
||||
m_vpStepsQueue[p].push_back( GAMESTATE->m_pCurNotes[p] );
|
||||
m_vpStepsQueue[p].push_back( GAMESTATE->m_pCurSteps[p] );
|
||||
m_asModifiersQueue[p].push_back( AttackArray() );
|
||||
}
|
||||
}
|
||||
@@ -795,7 +795,7 @@ void ScreenGameplay::SetupSong( int p, int iSongIndex )
|
||||
/* This is the first beat that can be changed without it being visible. Until
|
||||
* we draw for the first time, any beat can be changed. */
|
||||
GAMESTATE->m_fLastDrawnBeat[p] = -100;
|
||||
GAMESTATE->m_pCurNotes[p] = m_vpStepsQueue[p][iSongIndex];
|
||||
GAMESTATE->m_pCurSteps[p] = m_vpStepsQueue[p][iSongIndex];
|
||||
|
||||
// Put course options into effect.
|
||||
GAMESTATE->m_ModsToApply[p].clear();
|
||||
@@ -817,7 +817,7 @@ void ScreenGameplay::SetupSong( int p, int iSongIndex )
|
||||
GAMESTATE->m_CurrentPlayerOptions[p] = GAMESTATE->m_PlayerOptions[p];
|
||||
|
||||
NoteData pOriginalNoteData;
|
||||
GAMESTATE->m_pCurNotes[p]->GetNoteData( &pOriginalNoteData );
|
||||
GAMESTATE->m_pCurSteps[p]->GetNoteData( &pOriginalNoteData );
|
||||
|
||||
const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef();
|
||||
NoteData pNewNoteData;
|
||||
@@ -878,10 +878,10 @@ void ScreenGameplay::LoadNextSong()
|
||||
SetupSong( p, iPlaySongIndex );
|
||||
|
||||
Song* pSong = GAMESTATE->m_pCurSong;
|
||||
Steps* pSteps = GAMESTATE->m_pCurNotes[p];
|
||||
Steps* pSteps = GAMESTATE->m_pCurSteps[p];
|
||||
|
||||
ASSERT( GAMESTATE->m_pCurNotes[p] );
|
||||
m_textStepsDescription[p].SetText( GAMESTATE->m_pCurNotes[p]->GetDescription() );
|
||||
ASSERT( GAMESTATE->m_pCurSteps[p] );
|
||||
m_textStepsDescription[p].SetText( GAMESTATE->m_pCurSteps[p]->GetDescription() );
|
||||
|
||||
/* Increment the play count even if the player fails. (It's still popular,
|
||||
* even if the people playing it aren't good at it.) */
|
||||
@@ -912,13 +912,13 @@ void ScreenGameplay::LoadNextSong()
|
||||
PREFSMAN->m_iProgressiveNonstopLifebar);
|
||||
}
|
||||
|
||||
m_DifficultyIcon[p].SetFromNotes( PlayerNumber(p), GAMESTATE->m_pCurNotes[p] );
|
||||
m_DifficultyIcon[p].SetFromNotes( PlayerNumber(p), GAMESTATE->m_pCurSteps[p] );
|
||||
|
||||
/* The actual note data for scoring is the base class of Player. This includes
|
||||
* transforms, like Wide. Otherwise, the scoring will operate on the wrong data. */
|
||||
m_pPrimaryScoreKeeper[p]->OnNextSong( GAMESTATE->GetCourseSongIndex(), GAMESTATE->m_pCurNotes[p], &m_Player[p] );
|
||||
m_pPrimaryScoreKeeper[p]->OnNextSong( GAMESTATE->GetCourseSongIndex(), GAMESTATE->m_pCurSteps[p], &m_Player[p] );
|
||||
if( m_pSecondaryScoreKeeper[p] )
|
||||
m_pSecondaryScoreKeeper[p]->OnNextSong( GAMESTATE->GetCourseSongIndex(), GAMESTATE->m_pCurNotes[p], &m_Player[p] );
|
||||
m_pSecondaryScoreKeeper[p]->OnNextSong( GAMESTATE->GetCourseSongIndex(), GAMESTATE->m_pCurSteps[p], &m_Player[p] );
|
||||
|
||||
if( m_bDemonstration )
|
||||
{
|
||||
@@ -928,7 +928,7 @@ void ScreenGameplay::LoadNextSong()
|
||||
else if( GAMESTATE->IsCpuPlayer(p) )
|
||||
{
|
||||
GAMESTATE->m_PlayerController[p] = PC_CPU;
|
||||
int iMeter = GAMESTATE->m_pCurNotes[p]->GetMeter();
|
||||
int iMeter = GAMESTATE->m_pCurSteps[p]->GetMeter();
|
||||
int iNewSkill = SCALE( iMeter, MIN_METER, MAX_METER, 0, NUM_SKILL_LEVELS-1 );
|
||||
/* Watch out: songs aren't actually bound by MAX_METER. */
|
||||
iNewSkill = clamp( iNewSkill, 0, NUM_SKILL_LEVELS-1 );
|
||||
@@ -1005,7 +1005,7 @@ void ScreenGameplay::LoadNextSong()
|
||||
{
|
||||
FOREACH_HumanPlayer( p )
|
||||
{
|
||||
if( GAMESTATE->m_pCurNotes[p]->GetDifficulty() == DIFFICULTY_BEGINNER )
|
||||
if( GAMESTATE->m_pCurSteps[p]->GetDifficulty() == DIFFICULTY_BEGINNER )
|
||||
m_BeginnerHelper.AddPlayer( p, &m_Player[p] );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ bool ScreenJukebox::SetSong( bool bDemonstration )
|
||||
// Found something we can use!
|
||||
GAMESTATE->m_pCurSong = pSong;
|
||||
FOREACH_PlayerNumber( p )
|
||||
GAMESTATE->m_pCurNotes[p] = pSteps;
|
||||
GAMESTATE->m_pCurSteps[p] = pSteps;
|
||||
|
||||
return true; // done looking
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ ScreenNameEntryTraditional::ScreenNameEntryTraditional( CString sClassName ) : S
|
||||
ASSERT( ss.pSong->m_vpSteps.size() );
|
||||
FOREACH_PlayerNumber( p )
|
||||
{
|
||||
GAMESTATE->m_pCurNotes[p] = ss.pSteps[p] = ss.pSong->m_vpSteps[0];
|
||||
GAMESTATE->m_pCurSteps[p] = ss.pSteps[p] = ss.pSong->m_vpSteps[0];
|
||||
ss.iPossibleDancePoints[p] = 1000;
|
||||
ss.iActualDancePoints[p] = 985;
|
||||
|
||||
@@ -168,11 +168,11 @@ ScreenNameEntryTraditional::ScreenNameEntryTraditional( CString sClassName ) : S
|
||||
hs.iScore = ss.iScore[p];
|
||||
StepsType st = GAMESTATE->GetCurrentStyleDef()->m_StepsType;
|
||||
int a, b;
|
||||
PROFILEMAN->AddStepsScore( ss.pSong, GAMESTATE->m_pCurNotes[p], (PlayerNumber)p, hs, a, b );
|
||||
PROFILEMAN->AddStepsScore( ss.pSong, GAMESTATE->m_pCurNotes[p], (PlayerNumber)p, hs, a, b );
|
||||
PROFILEMAN->AddStepsScore( ss.pSong, GAMESTATE->m_pCurNotes[p], (PlayerNumber)p, hs, a, b );
|
||||
PROFILEMAN->AddStepsScore( ss.pSong, GAMESTATE->m_pCurNotes[p], (PlayerNumber)p, hs, a, b );
|
||||
PROFILEMAN->AddStepsScore( ss.pSong, GAMESTATE->m_pCurNotes[p], (PlayerNumber)p, hs, a, b );
|
||||
PROFILEMAN->AddStepsScore( ss.pSong, GAMESTATE->m_pCurSteps[p], (PlayerNumber)p, hs, a, b );
|
||||
PROFILEMAN->AddStepsScore( ss.pSong, GAMESTATE->m_pCurSteps[p], (PlayerNumber)p, hs, a, b );
|
||||
PROFILEMAN->AddStepsScore( ss.pSong, GAMESTATE->m_pCurSteps[p], (PlayerNumber)p, hs, a, b );
|
||||
PROFILEMAN->AddStepsScore( ss.pSong, GAMESTATE->m_pCurSteps[p], (PlayerNumber)p, hs, a, b );
|
||||
PROFILEMAN->AddStepsScore( ss.pSong, GAMESTATE->m_pCurSteps[p], (PlayerNumber)p, hs, a, b );
|
||||
PROFILEMAN->AddCategoryScore( st, RANKING_A, p, hs, a, b );
|
||||
}
|
||||
|
||||
|
||||
@@ -1072,7 +1072,7 @@ void ScreenSelectMusic::MenuStart( PlayerNumber pn )
|
||||
{
|
||||
if( !GAMESTATE->IsHumanPlayer( (PlayerNumber)p ) )
|
||||
continue; // skip
|
||||
if( GAMESTATE->m_pCurNotes[p] && GAMESTATE->m_pCurNotes[p]->GetMeter() >= 10 )
|
||||
if( GAMESTATE->m_pCurSteps[p] && GAMESTATE->m_pCurSteps[p]->GetMeter() >= 10 )
|
||||
bIsHard = true;
|
||||
}
|
||||
|
||||
@@ -1194,7 +1194,7 @@ void ScreenSelectMusic::AfterNotesChange( PlayerNumber pn )
|
||||
Song* pSong = GAMESTATE->m_pCurSong;
|
||||
Steps* pSteps = m_arrayNotes.empty()? NULL: m_arrayNotes[m_iSelection[pn]];
|
||||
|
||||
GAMESTATE->m_pCurNotes[pn] = pSteps;
|
||||
GAMESTATE->m_pCurSteps[pn] = pSteps;
|
||||
|
||||
if( pSteps )
|
||||
{
|
||||
|
||||
@@ -300,7 +300,7 @@ void Song::RevertFromDisk( bool bAllowNotesLoss )
|
||||
vector<StepsID> OldPlayedStageStats[NUM_PLAYERS];
|
||||
for( int p = 0; p < NUM_PLAYERS; ++p )
|
||||
{
|
||||
OldCurNotes[p].FromSteps( GAMESTATE->m_pCurNotes[p] );
|
||||
OldCurNotes[p].FromSteps( GAMESTATE->m_pCurSteps[p] );
|
||||
OldCurStageStats[p].FromSteps( g_CurStageStats.pSteps[p] );
|
||||
for( unsigned i = 0; i < g_vPlayedStageStats.size(); ++i )
|
||||
{
|
||||
@@ -329,7 +329,7 @@ void Song::RevertFromDisk( bool bAllowNotesLoss )
|
||||
{
|
||||
CHECKPOINT;
|
||||
if( GAMESTATE->m_pCurSong == this )
|
||||
GAMESTATE->m_pCurNotes[p] = OldCurNotes[p].ToSteps( this, bAllowNotesLoss );
|
||||
GAMESTATE->m_pCurSteps[p] = OldCurNotes[p].ToSteps( this, bAllowNotesLoss );
|
||||
CHECKPOINT;
|
||||
if( g_CurStageStats.pSong == this )
|
||||
g_CurStageStats.pSteps[p] = OldCurStageStats[p].ToSteps( this, bAllowNotesLoss );
|
||||
|
||||
@@ -38,7 +38,7 @@ SongCreditDisplay::SongCreditDisplay()
|
||||
if( !GAMESTATE->IsHumanPlayer(p) )
|
||||
continue; // skip
|
||||
|
||||
Steps* pSteps = GAMESTATE->m_pCurNotes[p];
|
||||
Steps* pSteps = GAMESTATE->m_pCurSteps[p];
|
||||
bool bAlreadyAdded = find( vpStepsToShow.begin(), vpStepsToShow.end(), pSteps ) != vpStepsToShow.end();
|
||||
if( !bAlreadyAdded )
|
||||
vpStepsToShow.push_back( pSteps );
|
||||
|
||||
Reference in New Issue
Block a user