separate explosions for HoldNoteScore
This commit is contained in:
@@ -40,6 +40,8 @@ GoodCommand=diffuse,0.3,0.8,1.0,1;zoom,1;linear,0.06;zoom,1.1;linear,0.06;diffus
|
||||
GreatCommand=diffuse,0.0,1.0,0.4,1;zoom,1;linear,0.06;zoom,1.1;linear,0.06;diffusealpha,0
|
||||
PerfectCommand=diffuse,1.0,1.0,0.3,1;zoom,1;linear,0.06;zoom,1.1;linear,0.06;diffusealpha,0
|
||||
MarvelousCommand=diffuse,1.0,1.0,1.0,1;zoom,1;linear,0.06;zoom,1.1;linear,0.06;diffusealpha,0
|
||||
NGCommand=
|
||||
OKCommand=diffuse,1.0,1.0,0.3,1;zoom,1;linear,0.06;zoom,1.1;linear,0.06;diffusealpha,0
|
||||
|
||||
[GhostArrowBright]
|
||||
NoneCommand=
|
||||
@@ -50,6 +52,8 @@ GoodCommand=diffuse,0.3,0.8,1.0,1;zoom,1;linear,0.06;zoom,1.1;linear,0.06;diffus
|
||||
GreatCommand=diffuse,0.0,1.0,0.4,1;zoom,1;linear,0.06;zoom,1.1;linear,0.06;diffusealpha,0
|
||||
PerfectCommand=diffuse,1.0,1.0,0.3,1;zoom,1;linear,0.06;zoom,1.1;linear,0.06;diffusealpha,0
|
||||
MarvelousCommand=diffuse,1.0,1.0,1.0,1;zoom,1;linear,0.06;zoom,1.1;linear,0.06;diffusealpha,0
|
||||
NGCommand=
|
||||
OKCommand=diffuse,1.0,1.0,0.3,1;zoom,1;linear,0.06;zoom,1.1;linear,0.06;diffusealpha,0
|
||||
|
||||
[ReceptorArrow]
|
||||
GreatCommand=
|
||||
|
||||
@@ -15,35 +15,75 @@ void GhostArrow::Load( const CString &sButton, const CString &sElement )
|
||||
|
||||
CString sFullElement = sElement + " " + sJudge;
|
||||
|
||||
ASSERT( !m_spr[i].IsLoaded() ); // don't double-load
|
||||
ASSERT( !m_sprTap[i].IsLoaded() ); // don't double-load
|
||||
|
||||
m_spr[i].Load( NOTESKIN->GetPath(sButton, sFullElement) );
|
||||
m_spr[i]->SetHidden( true );
|
||||
this->AddChild( m_spr[i] );
|
||||
m_sprTap[i].Load( NOTESKIN->GetPath(sButton, sFullElement) );
|
||||
m_sprTap[i]->SetHidden( true );
|
||||
this->AddChild( m_sprTap[i] );
|
||||
|
||||
|
||||
CString sCommand = Capitalize(sJudge)+"Command";
|
||||
m_acTap[i] = NOTESKIN->GetMetricA(m_sName,sCommand);
|
||||
}
|
||||
|
||||
FOREACH_TapNoteScore( i )
|
||||
FOREACH_HoldNoteScore( i )
|
||||
{
|
||||
CString sJudge = TapNoteScoreToString( i );
|
||||
CString sJudge = HoldNoteScoreToString( i );
|
||||
|
||||
CString sFullElement = sElement + " " + sJudge;
|
||||
|
||||
ASSERT( !m_sprHold[i].IsLoaded() ); // don't double-load
|
||||
|
||||
m_sprHold[i].Load( NOTESKIN->GetPath(sButton, sFullElement) );
|
||||
m_sprHold[i]->SetHidden( true );
|
||||
this->AddChild( m_sprHold[i] );
|
||||
|
||||
|
||||
CString sCommand = Capitalize(sJudge)+"Command";
|
||||
m_acScoreCommand[i] = NOTESKIN->GetMetricA(m_sName,sCommand);
|
||||
m_acHold[i] = NOTESKIN->GetMetricA(m_sName,sCommand);
|
||||
}
|
||||
}
|
||||
|
||||
void GhostArrow::Step( TapNoteScore score )
|
||||
void GhostArrow::StepTap( TapNoteScore score )
|
||||
{
|
||||
FOREACH_TapNoteScore( i )
|
||||
{
|
||||
// HACK: never hide the mine explosion
|
||||
if( i == TNS_HIT_MINE )
|
||||
continue;
|
||||
m_spr[i]->StopTweening();
|
||||
m_spr[i]->SetHidden( true );
|
||||
m_sprTap[i]->StopTweening();
|
||||
m_sprTap[i]->SetHidden( true );
|
||||
}
|
||||
FOREACH_HoldNoteScore( i )
|
||||
{
|
||||
m_sprHold[i]->StopTweening();
|
||||
m_sprHold[i]->SetHidden( true );
|
||||
}
|
||||
|
||||
m_spr[score]->SetHidden( false );
|
||||
m_spr[score]->StopTweening();
|
||||
m_spr[score]->RunCommands( m_acScoreCommand[score] );
|
||||
m_sprTap[score]->SetHidden( false );
|
||||
m_sprTap[score]->StopTweening();
|
||||
m_sprTap[score]->RunCommands( m_acTap[score] );
|
||||
}
|
||||
|
||||
void GhostArrow::StepHold( HoldNoteScore score )
|
||||
{
|
||||
FOREACH_TapNoteScore( i )
|
||||
{
|
||||
// HACK: never hide the mine explosion
|
||||
if( i == TNS_HIT_MINE )
|
||||
continue;
|
||||
m_sprTap[i]->StopTweening();
|
||||
m_sprTap[i]->SetHidden( true );
|
||||
}
|
||||
FOREACH_HoldNoteScore( i )
|
||||
{
|
||||
m_sprHold[i]->StopTweening();
|
||||
m_sprHold[i]->SetHidden( true );
|
||||
}
|
||||
|
||||
m_sprHold[score]->SetHidden( false );
|
||||
m_sprHold[score]->StopTweening();
|
||||
m_sprHold[score]->RunCommands( m_acHold[score] );
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -16,11 +16,14 @@ public:
|
||||
|
||||
void Load( const CString &sButton, const CString &sFile );
|
||||
|
||||
void Step( TapNoteScore score );
|
||||
void StepTap( TapNoteScore tns );
|
||||
void StepHold( HoldNoteScore hns );
|
||||
|
||||
protected:
|
||||
AutoActor m_spr[NUM_TAP_NOTE_SCORES];
|
||||
apActorCommands m_acScoreCommand[NUM_TAP_NOTE_SCORES];
|
||||
AutoActor m_sprTap[NUM_TAP_NOTE_SCORES];
|
||||
AutoActor m_sprHold[NUM_HOLD_NOTE_SCORES];
|
||||
apActorCommands m_acTap[NUM_TAP_NOTE_SCORES];
|
||||
apActorCommands m_acHold[NUM_HOLD_NOTE_SCORES];
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -114,13 +114,22 @@ void GhostArrowRow::DrawPrimitives()
|
||||
}
|
||||
|
||||
|
||||
void GhostArrowRow::DidTapNote( int iCol, TapNoteScore score, bool bBright )
|
||||
void GhostArrowRow::DidTapNote( int iCol, TapNoteScore tns, bool bBright )
|
||||
{
|
||||
ASSERT( iCol >= 0 && iCol < m_iNumCols );
|
||||
if( bBright )
|
||||
m_GhostBright[iCol]->Step( score );
|
||||
m_GhostBright[iCol]->StepTap( tns );
|
||||
else
|
||||
m_GhostDim[iCol]->Step( score );
|
||||
m_GhostDim[iCol]->StepTap( tns );
|
||||
}
|
||||
|
||||
void GhostArrowRow::DidHoldNote( int iCol, HoldNoteScore hns, bool bBright )
|
||||
{
|
||||
ASSERT( iCol >= 0 && iCol < m_iNumCols );
|
||||
if( bBright )
|
||||
m_GhostBright[iCol]->StepHold( hns );
|
||||
else
|
||||
m_GhostDim[iCol]->StepHold( hns );
|
||||
}
|
||||
|
||||
void GhostArrowRow::SetHoldIsActive( int iCol )
|
||||
|
||||
@@ -22,7 +22,8 @@ public:
|
||||
void Load( const PlayerState* pPlayerState, float fYReverseOffset );
|
||||
void Unload();
|
||||
|
||||
void DidTapNote( int iCol, TapNoteScore score, bool bBright );
|
||||
void DidTapNote( int iCol, TapNoteScore tns, bool bBright );
|
||||
void DidHoldNote( int iCol, HoldNoteScore hns, bool bBright );
|
||||
void SetHoldIsActive( int iCol );
|
||||
|
||||
protected:
|
||||
|
||||
@@ -734,7 +734,7 @@ void NoteField::FadeToFail()
|
||||
void NoteField::Step( int iCol, TapNoteScore score ) { SearchForSongBeat()->m_ReceptorArrowRow.Step( iCol, score ); }
|
||||
void NoteField::SetPressed( int iCol ) { SearchForSongBeat()->m_ReceptorArrowRow.SetPressed( iCol ); }
|
||||
void NoteField::DidTapNote( int iCol, TapNoteScore score, bool bBright ) { SearchForSongBeat()->m_GhostArrowRow.DidTapNote( iCol, score, bBright ); }
|
||||
void NoteField::DidHoldNote( int iCol ) { /*SearchForSongBeat()->m_GhostArrowRow.DidHoldNote( iCol );*/ }
|
||||
void NoteField::DidHoldNote( int iCol, HoldNoteScore score, bool bBright ) { SearchForSongBeat()->m_GhostArrowRow.DidHoldNote( iCol, score, bBright ); }
|
||||
|
||||
/*
|
||||
* (c) 2001-2004 Chris Danford
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
void Step( int iCol, TapNoteScore score );
|
||||
void SetPressed( int iCol );
|
||||
void DidTapNote( int iCol, TapNoteScore score, bool bBright );
|
||||
void DidHoldNote( int iCol );
|
||||
void DidHoldNote( int iCol, HoldNoteScore score, bool bBright );
|
||||
|
||||
void RefreshBeatToNoteSkin();
|
||||
|
||||
|
||||
+13
-10
@@ -458,9 +458,6 @@ void Player::Update( float fDeltaTime )
|
||||
{
|
||||
// Increase life
|
||||
fLife = 1;
|
||||
|
||||
if( m_pNoteField )
|
||||
m_pNoteField->DidHoldNote( iTrack ); // update the "electric ghost" effect
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -493,8 +490,9 @@ void Player::Update( float fDeltaTime )
|
||||
{
|
||||
fLife = 1;
|
||||
hns = HNS_OK;
|
||||
bool bBright = m_pPlayerStageStats && m_pPlayerStageStats->iCurCombo>(int)BRIGHT_GHOST_COMBO_THRESHOLD;
|
||||
if( m_pNoteField )
|
||||
m_pNoteField->DidTapNote( iTrack, TNS_PERFECT, true ); // bright ghost flash
|
||||
m_pNoteField->DidHoldNote( iTrack, HNS_OK, bBright ); // bright ghost flash
|
||||
}
|
||||
|
||||
if( hns != HNS_NONE )
|
||||
@@ -1084,11 +1082,14 @@ void Player::HandleStep( int col, const RageTimer &tm, bool bHeld )
|
||||
// this is handled in Update
|
||||
break;
|
||||
case TapNote::hold_head_roll:
|
||||
// Increase life
|
||||
fLife = 1;
|
||||
{
|
||||
// Increase life
|
||||
fLife = 1;
|
||||
|
||||
if( m_pNoteField )
|
||||
m_pNoteField->DidTapNote( col, TNS_PERFECT, true ); // bright ghost flash
|
||||
bool bBright = m_pPlayerStageStats && m_pPlayerStageStats->iCurCombo>(int)BRIGHT_GHOST_COMBO_THRESHOLD;
|
||||
if( m_pNoteField )
|
||||
m_pNoteField->DidHoldNote( col, HNS_OK, bBright );
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ASSERT(0);
|
||||
@@ -1104,8 +1105,9 @@ void Player::HandleStep( int col, const RageTimer &tm, bool bHeld )
|
||||
{
|
||||
fLife = 1;
|
||||
hns = HNS_OK;
|
||||
bool bBright = m_pPlayerStageStats && m_pPlayerStageStats->iCurCombo>(int)BRIGHT_GHOST_COMBO_THRESHOLD;
|
||||
if( m_pNoteField )
|
||||
m_pNoteField->DidTapNote( col, TNS_PERFECT, true ); // bright ghost flash
|
||||
m_pNoteField->DidHoldNote( col, HNS_OK, bBright );
|
||||
}
|
||||
|
||||
if( hns != HNS_NONE )
|
||||
@@ -1203,10 +1205,11 @@ void Player::OnRowCompletelyJudged( int iIndexThatWasSteppedOn )
|
||||
}
|
||||
|
||||
// show the ghost arrow for this column
|
||||
bool bBright = m_pPlayerStageStats && m_pPlayerStageStats->iCurCombo>(int)BRIGHT_GHOST_COMBO_THRESHOLD;
|
||||
if (m_pPlayerState->m_PlayerOptions.m_fBlind)
|
||||
{
|
||||
if( m_pNoteField )
|
||||
m_pNoteField->DidTapNote( c, TNS_MARVELOUS, false );
|
||||
m_pNoteField->DidTapNote( c, TNS_MARVELOUS, bBright );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user