"m_pCurNotes" -> "m_pCurSteps"

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