Overlapping NoteFields is not an option. Revert.
This commit is contained in:
@@ -23,7 +23,6 @@
|
|||||||
NoteField::NoteField()
|
NoteField::NoteField()
|
||||||
{
|
{
|
||||||
m_pNoteData = NULL;
|
m_pNoteData = NULL;
|
||||||
m_pSharedNoteField = NULL;
|
|
||||||
m_pCurDisplay = NULL;
|
m_pCurDisplay = NULL;
|
||||||
|
|
||||||
m_textMeasureNumber.LoadFromFont( THEME->GetPathF("Common","normal") );
|
m_textMeasureNumber.LoadFromFont( THEME->GetPathF("Common","normal") );
|
||||||
@@ -53,7 +52,6 @@ void NoteField::Unload()
|
|||||||
delete it->second;
|
delete it->second;
|
||||||
m_NoteDisplays.clear();
|
m_NoteDisplays.clear();
|
||||||
m_pCurDisplay = NULL;
|
m_pCurDisplay = NULL;
|
||||||
m_pSharedNoteField = NULL;
|
|
||||||
memset( m_pDisplays, 0, sizeof(m_pDisplays) );
|
memset( m_pDisplays, 0, sizeof(m_pDisplays) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -216,8 +214,6 @@ float NoteField::GetWidth() const
|
|||||||
|
|
||||||
void NoteField::DrawBeatBar( const float fBeat )
|
void NoteField::DrawBeatBar( const float fBeat )
|
||||||
{
|
{
|
||||||
if( m_pSharedNoteField )
|
|
||||||
return;
|
|
||||||
bool bIsMeasure = fmodf( fBeat, (float)BEATS_PER_MEASURE ) == 0;
|
bool bIsMeasure = fmodf( fBeat, (float)BEATS_PER_MEASURE ) == 0;
|
||||||
int iMeasureIndex = (int)fBeat / BEATS_PER_MEASURE;
|
int iMeasureIndex = (int)fBeat / BEATS_PER_MEASURE;
|
||||||
int iMeasureNoDisplay = iMeasureIndex+1;
|
int iMeasureNoDisplay = iMeasureIndex+1;
|
||||||
@@ -273,8 +269,6 @@ void NoteField::DrawBeatBar( const float fBeat )
|
|||||||
|
|
||||||
void NoteField::DrawMarkerBar( int iBeat )
|
void NoteField::DrawMarkerBar( int iBeat )
|
||||||
{
|
{
|
||||||
if( m_pSharedNoteField )
|
|
||||||
return;
|
|
||||||
float fBeat = NoteRowToBeat( iBeat );
|
float fBeat = NoteRowToBeat( iBeat );
|
||||||
const float fYOffset = ArrowEffects::GetYOffset( m_pPlayerState, 0, fBeat );
|
const float fYOffset = ArrowEffects::GetYOffset( m_pPlayerState, 0, fBeat );
|
||||||
const float fYPos = ArrowEffects::GetYPos( m_pPlayerState, 0, fYOffset, m_fYReverseOffsetPixels );
|
const float fYPos = ArrowEffects::GetYPos( m_pPlayerState, 0, fYOffset, m_fYReverseOffsetPixels );
|
||||||
@@ -458,11 +452,9 @@ void NoteField::DrawPrimitives()
|
|||||||
ArrowEffects::Update();
|
ArrowEffects::Update();
|
||||||
|
|
||||||
NoteDisplayCols *cur = m_pCurDisplay;
|
NoteDisplayCols *cur = m_pCurDisplay;
|
||||||
if( !m_pSharedNoteField )
|
cur->m_ReceptorArrowRow.Draw();
|
||||||
cur->m_ReceptorArrowRow.Draw(); // This will be handled by the shared NoteField
|
|
||||||
const NoteField &nf = m_pSharedNoteField ? *m_pSharedNoteField : *this;
|
|
||||||
|
|
||||||
const PlayerOptions ¤t_po = nf.m_pPlayerState->m_CurrentPlayerOptions;
|
const PlayerOptions ¤t_po = m_pPlayerState->m_CurrentPlayerOptions;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Adjust draw range depending on some effects
|
// Adjust draw range depending on some effects
|
||||||
@@ -720,7 +712,7 @@ void NoteField::DrawPrimitives()
|
|||||||
if( m_iBeginMarker!=-1 && m_iEndMarker!=-1 )
|
if( m_iBeginMarker!=-1 && m_iEndMarker!=-1 )
|
||||||
bIsInSelectionRange = (m_iBeginMarker <= iStartRow && iEndRow < m_iEndMarker);
|
bIsInSelectionRange = (m_iBeginMarker <= iStartRow && iEndRow < m_iEndMarker);
|
||||||
|
|
||||||
NoteDisplayCols *displayCols = tn.pn == PLAYER_INVALID ? nf.m_pCurDisplay : nf.m_pDisplays[tn.pn];
|
NoteDisplayCols *displayCols = tn.pn == PLAYER_INVALID ? m_pCurDisplay : m_pDisplays[tn.pn];
|
||||||
displayCols->display[c].DrawHold( tn, c, iStartRow, bIsHoldingNote, bIsActive, Result, bIsInSelectionRange ? fSelectedRangeGlow : m_fPercentFadeToFail, false, m_fYReverseOffsetPixels, (float) iFirstPixelToDraw, (float) iLastPixelToDraw );
|
displayCols->display[c].DrawHold( tn, c, iStartRow, bIsHoldingNote, bIsActive, Result, bIsInSelectionRange ? fSelectedRangeGlow : m_fPercentFadeToFail, false, m_fYReverseOffsetPixels, (float) iFirstPixelToDraw, (float) iLastPixelToDraw );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -781,7 +773,7 @@ void NoteField::DrawPrimitives()
|
|||||||
bool bIsAddition = (tn.source == TapNote::addition);
|
bool bIsAddition = (tn.source == TapNote::addition);
|
||||||
bool bIsMine = (tn.type == TapNote::mine);
|
bool bIsMine = (tn.type == TapNote::mine);
|
||||||
bool bIsAttack = (tn.type == TapNote::attack);
|
bool bIsAttack = (tn.type == TapNote::attack);
|
||||||
NoteDisplayCols *displayCols = tn.pn == PLAYER_INVALID ? nf.m_pCurDisplay : nf.m_pDisplays[tn.pn];
|
NoteDisplayCols *displayCols = tn.pn == PLAYER_INVALID ? m_pCurDisplay : m_pDisplays[tn.pn];
|
||||||
|
|
||||||
if( bIsAttack )
|
if( bIsAttack )
|
||||||
{
|
{
|
||||||
@@ -797,7 +789,6 @@ void NoteField::DrawPrimitives()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !m_pSharedNoteField )
|
|
||||||
cur->m_GhostArrowRow.Draw();
|
cur->m_GhostArrowRow.Draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -806,12 +797,10 @@ void NoteField::FadeToFail()
|
|||||||
m_fPercentFadeToFail = max( 0.0f, m_fPercentFadeToFail ); // this will slowly increase every Update()
|
m_fPercentFadeToFail = max( 0.0f, m_fPercentFadeToFail ); // this will slowly increase every Update()
|
||||||
// don't fade all over again if this is called twice
|
// don't fade all over again if this is called twice
|
||||||
}
|
}
|
||||||
#define nf (m_pSharedNoteField ? *m_pSharedNoteField : *this)
|
void NoteField::Step( int iCol, TapNoteScore score ) { m_pCurDisplay->m_ReceptorArrowRow.Step( iCol, score ); }
|
||||||
void NoteField::Step( int iCol, TapNoteScore score ) { nf.m_pCurDisplay->m_ReceptorArrowRow.Step( iCol, score ); }
|
void NoteField::SetPressed( int iCol ) { m_pCurDisplay->m_ReceptorArrowRow.SetPressed( iCol ); }
|
||||||
void NoteField::SetPressed( int iCol ) { nf.m_pCurDisplay->m_ReceptorArrowRow.SetPressed( iCol ); }
|
void NoteField::DidTapNote( int iCol, TapNoteScore score, bool bBright ) { m_pCurDisplay->m_GhostArrowRow.DidTapNote( iCol, score, bBright ); }
|
||||||
void NoteField::DidTapNote( int iCol, TapNoteScore score, bool bBright ) { nf.m_pCurDisplay->m_GhostArrowRow.DidTapNote( iCol, score, bBright ); }
|
void NoteField::DidHoldNote( int iCol, HoldNoteScore score, bool bBright ) { m_pCurDisplay->m_GhostArrowRow.DidHoldNote( iCol, score, bBright ); }
|
||||||
void NoteField::DidHoldNote( int iCol, HoldNoteScore score, bool bBright ) { nf.m_pCurDisplay->m_GhostArrowRow.DidHoldNote( iCol, score, bBright ); }
|
|
||||||
#undef nf
|
|
||||||
/*
|
/*
|
||||||
* (c) 2001-2004 Chris Danford
|
* (c) 2001-2004 Chris Danford
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ public:
|
|||||||
void DidHoldNote( int iCol, HoldNoteScore score, bool bBright );
|
void DidHoldNote( int iCol, HoldNoteScore score, bool bBright );
|
||||||
|
|
||||||
const PlayerState *GetPlayerState() const { return m_pPlayerState; }
|
const PlayerState *GetPlayerState() const { return m_pPlayerState; }
|
||||||
void SetSharedNoteField( NoteField *nf ) { m_pSharedNoteField = nf; }
|
|
||||||
|
|
||||||
int m_iBeginMarker, m_iEndMarker; // only used with MODE_EDIT
|
int m_iBeginMarker, m_iEndMarker; // only used with MODE_EDIT
|
||||||
|
|
||||||
@@ -59,7 +58,6 @@ protected:
|
|||||||
float GetWidth() const;
|
float GetWidth() const;
|
||||||
|
|
||||||
const NoteData *m_pNoteData;
|
const NoteData *m_pNoteData;
|
||||||
const NoteField *m_pSharedNoteField;
|
|
||||||
|
|
||||||
float m_fPercentFadeToFail; // -1 if not fading to fail
|
float m_fPercentFadeToFail; // -1 if not fading to fail
|
||||||
|
|
||||||
|
|||||||
@@ -443,12 +443,6 @@ void Player::Load( const NoteData& noteData )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::SetSharedNoteField( Player *pPlayer )
|
|
||||||
{
|
|
||||||
ASSERT( m_pNoteField );
|
|
||||||
m_pNoteField->SetSharedNoteField( pPlayer->m_pNoteField );
|
|
||||||
}
|
|
||||||
|
|
||||||
void Player::Update( float fDeltaTime )
|
void Player::Update( float fDeltaTime )
|
||||||
{
|
{
|
||||||
// Don't update if we havn't been loaded yet.
|
// Don't update if we havn't been loaded yet.
|
||||||
|
|||||||
@@ -75,7 +75,6 @@ public:
|
|||||||
NoteData m_NoteData;
|
NoteData m_NoteData;
|
||||||
|
|
||||||
bool HasNoteField() { return m_pNoteField != NULL; }
|
bool HasNoteField() { return m_pNoteField != NULL; }
|
||||||
void SetSharedNoteField( Player *pPlayer );
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void HandleStep( int col, const RageTimer &tm, bool bHeld );
|
void HandleStep( int col, const RageTimer &tm, bool bHeld );
|
||||||
|
|||||||
@@ -962,9 +962,6 @@ void ScreenGameplay::SetupSong( int iSongIndex )
|
|||||||
pi->GetPlayerState()->Update(0);
|
pi->GetPlayerState()->Update(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if( pi->m_pn != PLAYER_INVALID )
|
|
||||||
NoteDataUtil::RemoveAllButPlayer( ndTransformed, pi->m_pn );
|
|
||||||
|
|
||||||
// load player
|
// load player
|
||||||
{
|
{
|
||||||
NoteData nd = ndTransformed;
|
NoteData nd = ndTransformed;
|
||||||
|
|||||||
@@ -7,20 +7,16 @@ REGISTER_SCREEN_CLASS( ScreenGameplayShared );
|
|||||||
|
|
||||||
void ScreenGameplayShared::FillPlayerInfo( vector<PlayerInfo> &vPlayerInfoOut )
|
void ScreenGameplayShared::FillPlayerInfo( vector<PlayerInfo> &vPlayerInfoOut )
|
||||||
{
|
{
|
||||||
PlayerNumber mpn = GAMESTATE->m_MasterPlayerNumber;
|
//PlayerNumber mpn = GAMESTATE->m_MasterPlayerNumber;
|
||||||
|
|
||||||
vPlayerInfoOut.resize( NUM_PLAYERS );
|
vPlayerInfoOut.resize( NUM_PLAYERS );
|
||||||
FOREACH_PlayerNumber( pn )
|
FOREACH_PlayerNumber( pn )
|
||||||
vPlayerInfoOut[pn].Load( pn, MultiPlayer_INVALID, true );
|
vPlayerInfoOut[pn].Load( pn, MultiPlayer_INVALID, true );
|
||||||
FOREACH_PlayerNumber( pn )
|
|
||||||
{
|
|
||||||
if( pn != mpn )
|
|
||||||
vPlayerInfoOut[pn].m_pPlayer->SetSharedNoteField( vPlayerInfoOut[mpn].m_pPlayer );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PlayerInfo &ScreenGameplayShared::GetPlayerInfoForInput( const InputEventPlus& iep )
|
PlayerInfo &ScreenGameplayShared::GetPlayerInfoForInput( const InputEventPlus& iep )
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
const float fPositionSeconds = GAMESTATE->m_fMusicSeconds - iep.DeviceI.ts.Ago();
|
const float fPositionSeconds = GAMESTATE->m_fMusicSeconds - iep.DeviceI.ts.Ago();
|
||||||
const float fSongBeat = GAMESTATE->m_pCurSong->GetBeatFromElapsedTime( fPositionSeconds );
|
const float fSongBeat = GAMESTATE->m_pCurSong->GetBeatFromElapsedTime( fPositionSeconds );
|
||||||
const int row = BeatToNoteRow( fSongBeat );
|
const int row = BeatToNoteRow( fSongBeat );
|
||||||
@@ -39,6 +35,9 @@ PlayerInfo &ScreenGameplayShared::GetPlayerInfoForInput( const InputEventPlus& i
|
|||||||
index = i;
|
index = i;
|
||||||
}
|
}
|
||||||
return m_vPlayerInfo[index];
|
return m_vPlayerInfo[index];
|
||||||
|
#else
|
||||||
|
return ScreenGameplay::GetPlayerInfoForInput( iep );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user