From a3302c2b008cebc7e1cdcad0def526c542f2f154 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 26 Nov 2003 02:30:36 +0000 Subject: [PATCH] use GrayArrowRow and GhostArrowRow again, prep for note skin fixes --- stepmania/src/NoteFieldPlus.cpp | 123 +++----------------------------- stepmania/src/NoteFieldPlus.h | 14 +--- 2 files changed, 14 insertions(+), 123 deletions(-) diff --git a/stepmania/src/NoteFieldPlus.cpp b/stepmania/src/NoteFieldPlus.cpp index 9420d2f8ee..abd98ac282 100644 --- a/stepmania/src/NoteFieldPlus.cpp +++ b/stepmania/src/NoteFieldPlus.cpp @@ -25,149 +25,48 @@ void NoteFieldPlus::Load( const NoteData* pNoteData, PlayerNumber pn, int iFirst { NoteField::Load( pNoteData, pn, iFirstPixelToDraw, iLastPixelToDraw, fYReverseOffset ); - const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef(); - m_iNumCols = pStyleDef->m_iColsPerPlayer; - - - int c; - - - // - // GrayArrowRow - // - for( c=0; cm_PlayerOptions[pn].m_sNoteSkin, pn, c ); - - - // - // GhostArrowRow - // - for( c=0; cGetPathTo(pn, Button, "tap explosion dim") ); - m_GhostBright[c].Load( NOTESKIN->GetPathTo(pn, Button, "tap explosion bright") ); - m_GhostMine[c].Load( NOTESKIN->GetPathTo(pn, Button, "tap explosion mine") ); - m_HoldGhost[c].Load( NOTESKIN->GetPathTo(pn, Button, "hold explosion") ); - - } + m_GrayArrowRow.Load( pn, fYReverseOffset ); + m_GhostArrowRow.Load( pn, fYReverseOffset ); } void NoteFieldPlus::Update( float fDelta ) { NoteField::Update( fDelta ); - for( int c=0; cm_CurrentPlayerOptions[m_PlayerNumber].m_fDark) ); - m_GhostDim[c].Update( fDelta ); - m_GhostBright[c].Update( fDelta ); - m_GhostMine[c].Update( fDelta ); - m_HoldGhost[c].Update( fDelta ); - - m_GrayArrow[c].SetX( fX ); - m_GhostDim[c].SetX( fX ); - m_GhostBright[c].SetX( fX ); - m_GhostMine[c].SetX( fX ); - m_HoldGhost[c].SetX( fX ); - - m_GrayArrow[c].SetY( fY ); - m_GhostDim[c].SetY( fY ); - m_GhostBright[c].SetY( fY ); - m_GhostMine[c].SetY( fY ); - m_HoldGhost[c].SetY( fY ); - - m_GrayArrow[c].SetZ( fZ ); - m_GhostDim[c].SetZ( fZ ); - m_GhostBright[c].SetZ( fZ ); - m_GhostMine[c].SetZ( fZ ); - m_HoldGhost[c].SetZ( fZ ); - } - + m_GrayArrowRow.Update( fDelta ); + m_GhostArrowRow.Update( fDelta ); } void NoteFieldPlus::DrawPrimitives() { - int c; - - // - // GrayArrowRow - // - for( c=0; c= 0 && iCol < m_iNumCols ); - m_GrayArrow[iCol].Step(); + m_GrayArrowRow.Step( iCol ); } void NoteFieldPlus::UpdateBars( int iCol ) { - ASSERT( iCol >= 0 && iCol < m_iNumCols ); - m_GrayArrow[iCol].UpdateBars(); + m_GrayArrowRow.UpdateBars( iCol ); } void NoteFieldPlus::TapNote( int iCol, TapNoteScore score, bool bBright ) { - ASSERT( iCol >= 0 && iCol < m_iNumCols ); - if( bBright ) - m_GhostBright[iCol].Step( score ); - else - m_GhostDim[iCol].Step( score ); + m_GhostArrowRow.TapNote( iCol, score, bBright ); } void NoteFieldPlus::HoldNote( int iCol ) { - ASSERT( iCol >= 0 && iCol < m_iNumCols ); - m_HoldGhost[iCol].Step(); + m_GhostArrowRow.HoldNote( iCol ); } void NoteFieldPlus::TapMine( int iCol, TapNoteScore score ) { - m_GhostMine[iCol].Step( score ); + m_GhostArrowRow.TapMine( iCol, score ); } diff --git a/stepmania/src/NoteFieldPlus.h b/stepmania/src/NoteFieldPlus.h index d16e651fa1..d95d006541 100644 --- a/stepmania/src/NoteFieldPlus.h +++ b/stepmania/src/NoteFieldPlus.h @@ -13,7 +13,7 @@ #include "NoteField.h" -#include "GrayArrow.h" +#include "GrayArrowRow.h" #include "GhostArrowRow.h" @@ -32,17 +32,9 @@ public: void TapMine( int iCol, TapNoteScore score ); void HoldNote( int iCol ); void UpdateBars( int iCol ); - int GetNumCols() { return m_iNumCols; }; protected: - int m_iNumCols; - - GrayArrow m_GrayArrow[MAX_NOTE_TRACKS]; - - GhostArrow m_GhostDim[MAX_NOTE_TRACKS]; - GhostArrow m_GhostBright[MAX_NOTE_TRACKS]; - GhostArrow m_GhostMine[MAX_NOTE_TRACKS]; - HoldGhostArrow m_HoldGhost[MAX_NOTE_TRACKS]; - + GrayArrowRow m_GrayArrowRow; + GhostArrowRow m_GhostArrowRow; }; #endif