From 8502fc3083cd2df4d05f241f00be1570be6ed82c Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Mon, 17 Jul 2006 00:56:23 +0000 Subject: [PATCH] Use PlayerPlus (a Player plus a NoteData, this gives the old behavior of Player, i.e. calling Load( nd )). --- stepmania/src/ScreenEdit.cpp | 5 +++-- stepmania/src/ScreenEdit.h | 2 +- stepmania/src/ScreenHowToPlay.cpp | 2 +- stepmania/src/ScreenHowToPlay.h | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index e010686c91..9f57ae3338 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -793,9 +793,10 @@ void ScreenEdit::PlayTicks() iRowLastCrossed = iSongRow; int iTickRow = -1; + const NoteData &nd = m_Player.GetNoteData(); // for each index we crossed since the last update: - FOREACH_NONEMPTY_ROW_ALL_TRACKS_RANGE( m_Player.m_NoteData, r, iRowLastCrossed+1, iSongRow+1 ) - if( m_Player.m_NoteData.IsThereATapOrHoldHeadAtRow( r ) ) + FOREACH_NONEMPTY_ROW_ALL_TRACKS_RANGE( nd, r, iRowLastCrossed+1, iSongRow+1 ) + if( nd.IsThereATapOrHoldHeadAtRow( r ) ) iTickRow = r; iRowLastCrossed = iSongRow; diff --git a/stepmania/src/ScreenEdit.h b/stepmania/src/ScreenEdit.h index d6fab788c1..2b8b2ec2f6 100644 --- a/stepmania/src/ScreenEdit.h +++ b/stepmania/src/ScreenEdit.h @@ -258,7 +258,7 @@ protected: // for MODE_PLAY void SetupCourseAttacks(); - Player m_Player; + PlayerPlus m_Player; Background m_Background; Foreground m_Foreground; bool m_bReturnToRecordMenuAfterPlay; diff --git a/stepmania/src/ScreenHowToPlay.cpp b/stepmania/src/ScreenHowToPlay.cpp index 7bb0723453..2fb523b767 100644 --- a/stepmania/src/ScreenHowToPlay.cpp +++ b/stepmania/src/ScreenHowToPlay.cpp @@ -154,7 +154,7 @@ void ScreenHowToPlay::Init() GAMESTATE->m_bGameplayLeadIn.Set( false ); GAMESTATE->m_pPlayerState[PLAYER_1]->m_PlayerController = PC_AUTOPLAY; - m_pPlayer = new Player; + m_pPlayer = new PlayerPlus; m_pPlayer->Init( "Player", GAMESTATE->m_pPlayerState[PLAYER_1], diff --git a/stepmania/src/ScreenHowToPlay.h b/stepmania/src/ScreenHowToPlay.h index ed9ee1053e..b70fb9df4c 100644 --- a/stepmania/src/ScreenHowToPlay.h +++ b/stepmania/src/ScreenHowToPlay.h @@ -23,7 +23,7 @@ public: protected: virtual void Step(); LifeMeterBar *m_pLifeMeterBar; - Player *m_pPlayer; + PlayerPlus *m_pPlayer; Model *m_pmCharacter; Model *m_pmDancePad; int m_iW2s;