use GrayArrowRow and GhostArrowRow again, prep for note skin fixes

This commit is contained in:
Glenn Maynard
2003-11-26 02:30:36 +00:00
parent 0d194ef2a0
commit a3302c2b00
2 changed files with 14 additions and 123 deletions
+11 -112
View File
@@ -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; c<m_iNumCols; c++ )
m_GrayArrow[c].Load( GAMESTATE->m_PlayerOptions[pn].m_sNoteSkin, pn, c );
//
// GhostArrowRow
//
for( c=0; c<m_iNumCols; c++ )
{
CString Button = g_NoteFieldMode[m_PlayerNumber].GhostButtonNames[c];
if(Button == "")
Button = NoteSkinManager::ColToButtonName(c);
m_GhostDim[c].SetName( "GhostArrowDim" );
m_GhostBright[c].SetName( "GhostArrowBright" );
m_GhostMine[c].SetName( "GhostArrowMine" );
m_HoldGhost[c].SetName( "HoldGhostArrow" );
m_GhostDim[c].Init( pn );
m_GhostBright[c].Init( pn );
m_GhostMine[c].Init( pn );
//m_HoldGhost[c].Init( pn );
m_GhostDim[c].Load( NOTESKIN->GetPathTo(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; c<m_iNumCols; c++ )
{
float fX = ArrowGetXPos( m_PlayerNumber, c, 0 );
float fY = ArrowGetYPos( m_PlayerNumber, c, 0, m_fYReverseOffsetPixels );
float fZ = ArrowGetZPos( m_PlayerNumber, c, 0 );
m_GrayArrow[c].Update( fDelta );
m_GrayArrow[c].SetDiffuse( RageColor(1,1,1,1 - GAMESTATE->m_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<m_iNumCols; c++ )
{
g_NoteFieldMode[m_PlayerNumber].BeginDrawTrack(c);
m_GrayArrow[c].Draw();
g_NoteFieldMode[m_PlayerNumber].EndDrawTrack(c);
}
m_GrayArrowRow.Draw();
NoteField::DrawPrimitives();
//
// GhostArrowRow
//
for( c=0; c<m_iNumCols; c++ )
{
g_NoteFieldMode[m_PlayerNumber].BeginDrawTrack(c);
m_GhostDim[c].Draw();
m_GhostBright[c].Draw();
m_GhostMine[c].Draw();
m_HoldGhost[c].Draw();
g_NoteFieldMode[m_PlayerNumber].EndDrawTrack(c);
}
m_GhostArrowRow.Draw();
}
void NoteFieldPlus::Step( int iCol )
{
ASSERT( iCol >= 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 );
}