#include "global.h" /* ----------------------------------------------------------------------------- Class: NoteFieldPlus Desc: See header. Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. Chris Danford ----------------------------------------------------------------------------- */ #include "NoteFieldPlus.h" #include "GameState.h" #include "NoteFieldPositioning.h" #include "NoteSkinManager.h" NoteFieldPlus::NoteFieldPlus() { } void NoteFieldPlus::Load( NoteData* pNoteData, PlayerNumber pn, int iFirstPixelToDraw, int iLastPixelToDraw, int iYReverseOffset ) { NoteField::Load( pNoteData, pn, iFirstPixelToDraw, iLastPixelToDraw, iYReverseOffset ); const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef(); m_iNumCols = pStyleDef->m_iColsPerPlayer; int c; // // GrayArrowRow // for( c=0; cGetPathTo(pn, Button, "receptor"); m_GrayArrow[c].Load( sPath ); // XXX if( m_GrayArrow[c].GetNumStates() != 2 && m_GrayArrow[c].GetNumStates() != 3 ) RageException::Throw( "'%s' must have 2 or 3 frames", sPath.c_str() ); } // // 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") ); } } 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( fY ); m_GhostDim[c].SetZ( fZ ); m_GhostBright[c].SetZ( fZ ); m_GhostMine[c].SetZ( fZ ); m_HoldGhost[c].SetZ( fZ ); } } void NoteFieldPlus::DrawPrimitives() { int c; // // GrayArrowRow // for( c=0; c= 0 && iCol < m_iNumCols ); m_GrayArrow[iCol].Step(); } 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 ); } void NoteFieldPlus::HoldNote( int iCol ) { ASSERT( iCol >= 0 && iCol < m_iNumCols ); m_HoldGhost[iCol].Step(); } void NoteFieldPlus::TapMine( int iCol, TapNoteScore score ) { m_GhostMine[iCol].Step( score ); }