use GrayArrowRow and GhostArrowRow again, prep for note skin fixes
This commit is contained in:
+11
-112
@@ -25,149 +25,48 @@ void NoteFieldPlus::Load( const NoteData* pNoteData, PlayerNumber pn, int iFirst
|
|||||||
{
|
{
|
||||||
NoteField::Load( pNoteData, pn, iFirstPixelToDraw, iLastPixelToDraw, fYReverseOffset );
|
NoteField::Load( pNoteData, pn, iFirstPixelToDraw, iLastPixelToDraw, fYReverseOffset );
|
||||||
|
|
||||||
const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef();
|
m_GrayArrowRow.Load( pn, fYReverseOffset );
|
||||||
m_iNumCols = pStyleDef->m_iColsPerPlayer;
|
m_GhostArrowRow.Load( pn, fYReverseOffset );
|
||||||
|
|
||||||
|
|
||||||
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") );
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void NoteFieldPlus::Update( float fDelta )
|
void NoteFieldPlus::Update( float fDelta )
|
||||||
{
|
{
|
||||||
NoteField::Update( fDelta );
|
NoteField::Update( fDelta );
|
||||||
|
|
||||||
for( int c=0; c<m_iNumCols; c++ )
|
m_GrayArrowRow.Update( fDelta );
|
||||||
{
|
m_GhostArrowRow.Update( fDelta );
|
||||||
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 );
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void NoteFieldPlus::DrawPrimitives()
|
void NoteFieldPlus::DrawPrimitives()
|
||||||
{
|
{
|
||||||
int c;
|
m_GrayArrowRow.Draw();
|
||||||
|
|
||||||
//
|
|
||||||
// GrayArrowRow
|
|
||||||
//
|
|
||||||
for( c=0; c<m_iNumCols; c++ )
|
|
||||||
{
|
|
||||||
g_NoteFieldMode[m_PlayerNumber].BeginDrawTrack(c);
|
|
||||||
|
|
||||||
m_GrayArrow[c].Draw();
|
|
||||||
|
|
||||||
g_NoteFieldMode[m_PlayerNumber].EndDrawTrack(c);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
NoteField::DrawPrimitives();
|
NoteField::DrawPrimitives();
|
||||||
|
|
||||||
|
m_GhostArrowRow.Draw();
|
||||||
//
|
|
||||||
// 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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void NoteFieldPlus::Step( int iCol )
|
void NoteFieldPlus::Step( int iCol )
|
||||||
{
|
{
|
||||||
ASSERT( iCol >= 0 && iCol < m_iNumCols );
|
m_GrayArrowRow.Step( iCol );
|
||||||
m_GrayArrow[iCol].Step();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void NoteFieldPlus::UpdateBars( int iCol )
|
void NoteFieldPlus::UpdateBars( int iCol )
|
||||||
{
|
{
|
||||||
ASSERT( iCol >= 0 && iCol < m_iNumCols );
|
m_GrayArrowRow.UpdateBars( iCol );
|
||||||
m_GrayArrow[iCol].UpdateBars();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void NoteFieldPlus::TapNote( int iCol, TapNoteScore score, bool bBright )
|
void NoteFieldPlus::TapNote( int iCol, TapNoteScore score, bool bBright )
|
||||||
{
|
{
|
||||||
ASSERT( iCol >= 0 && iCol < m_iNumCols );
|
m_GhostArrowRow.TapNote( iCol, score, bBright );
|
||||||
if( bBright )
|
|
||||||
m_GhostBright[iCol].Step( score );
|
|
||||||
else
|
|
||||||
m_GhostDim[iCol].Step( score );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void NoteFieldPlus::HoldNote( int iCol )
|
void NoteFieldPlus::HoldNote( int iCol )
|
||||||
{
|
{
|
||||||
ASSERT( iCol >= 0 && iCol < m_iNumCols );
|
m_GhostArrowRow.HoldNote( iCol );
|
||||||
m_HoldGhost[iCol].Step();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void NoteFieldPlus::TapMine( int iCol, TapNoteScore score )
|
void NoteFieldPlus::TapMine( int iCol, TapNoteScore score )
|
||||||
{
|
{
|
||||||
m_GhostMine[iCol].Step( score );
|
m_GhostArrowRow.TapMine( iCol, score );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "NoteField.h"
|
#include "NoteField.h"
|
||||||
#include "GrayArrow.h"
|
#include "GrayArrowRow.h"
|
||||||
#include "GhostArrowRow.h"
|
#include "GhostArrowRow.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -32,17 +32,9 @@ public:
|
|||||||
void TapMine( int iCol, TapNoteScore score );
|
void TapMine( int iCol, TapNoteScore score );
|
||||||
void HoldNote( int iCol );
|
void HoldNote( int iCol );
|
||||||
void UpdateBars( int iCol );
|
void UpdateBars( int iCol );
|
||||||
int GetNumCols() { return m_iNumCols; };
|
|
||||||
protected:
|
protected:
|
||||||
int m_iNumCols;
|
GrayArrowRow m_GrayArrowRow;
|
||||||
|
GhostArrowRow m_GhostArrowRow;
|
||||||
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];
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user