Major Pop'n Music Theme Update
Themers can now set off a sequence of sound effects via metrics on the Stage Evaluation screen (good for games like beatmania, pop'n and pump that have a series of SFX)
This commit is contained in:
@@ -1069,15 +1069,6 @@ ShowLifeMeterForDisabledPlayers=1
|
|||||||
[ScreenEvaluation]
|
[ScreenEvaluation]
|
||||||
BannerWidth=248
|
BannerWidth=248
|
||||||
BannerHeight=78
|
BannerHeight=78
|
||||||
JudgeSoundTimeMarvelous=-1
|
|
||||||
JudgeSoundTimePerfect=-1
|
|
||||||
JudgeSoundTimeGreat=-1
|
|
||||||
JudgeSoundTimeGood=-1
|
|
||||||
JudgeSoundTimeBoo=-1
|
|
||||||
JudgeSoundTimeMiss=-1
|
|
||||||
JudgeSoundTimeOK=-1
|
|
||||||
JudgeSoundTimeMaxCombo=-1 // how long to wait until we play the sound after the screen appears.... -1 means play no sound ever.
|
|
||||||
JudgeSoundIfJudgeGraphicsFullAlpha=0 // only play the sound if one of the judge graphics for the associated sound are full alpha
|
|
||||||
LargeBannerX=320
|
LargeBannerX=320
|
||||||
LargeBannerY=100
|
LargeBannerY=100
|
||||||
LargeBannerOnCommand=addy,480;sleep,0.0;decelerate,0.3;addy,-480
|
LargeBannerOnCommand=addy,480;sleep,0.0;decelerate,0.3;addy,-480
|
||||||
@@ -1463,15 +1454,9 @@ ShowComboArea=0
|
|||||||
ShowFullCombo=0
|
ShowFullCombo=0
|
||||||
TimerSeconds=15
|
TimerSeconds=15
|
||||||
StyleIcon=1
|
StyleIcon=1
|
||||||
JudgeSoundTimeMarvelous=-1
|
FailedSoundTime=0
|
||||||
JudgeSoundTimePerfect=-1
|
PassedSoundTime=0
|
||||||
JudgeSoundTimeGreat=-1
|
NumSequenceSounds=0
|
||||||
JudgeSoundTimeGood=-1
|
|
||||||
JudgeSoundTimeBoo=-1
|
|
||||||
JudgeSoundTimeMiss=-1
|
|
||||||
JudgeSoundTimeOK=-1
|
|
||||||
JudgeSoundTimeMaxCombo=-1
|
|
||||||
JudgeSoundIfJudgeGraphicsFullAlpha=0
|
|
||||||
|
|
||||||
[ScreenEvaluationSummary]
|
[ScreenEvaluationSummary]
|
||||||
NextScreen=ScreenNameEntry
|
NextScreen=ScreenNameEntry
|
||||||
@@ -1500,15 +1485,6 @@ ShowComboArea=0
|
|||||||
ShowFullCombo=0
|
ShowFullCombo=0
|
||||||
TimerSeconds=30
|
TimerSeconds=30
|
||||||
StyleIcon=1
|
StyleIcon=1
|
||||||
JudgeSoundTimeMarvelous=-1
|
|
||||||
JudgeSoundTimePerfect=-1
|
|
||||||
JudgeSoundTimeGreat=-1
|
|
||||||
JudgeSoundTimeGood=-1
|
|
||||||
JudgeSoundTimeBoo=-1
|
|
||||||
JudgeSoundTimeMiss=-1
|
|
||||||
JudgeSoundTimeOK=-1
|
|
||||||
JudgeSoundTimeMaxCombo=-1
|
|
||||||
JudgeSoundIfJudgeGraphicsFullAlpha=0
|
|
||||||
|
|
||||||
[ScreenEvaluationNonstop]
|
[ScreenEvaluationNonstop]
|
||||||
NextScreen=ScreenNameEntry
|
NextScreen=ScreenNameEntry
|
||||||
@@ -1537,15 +1513,6 @@ ShowComboArea=0
|
|||||||
ShowFullCombo=0
|
ShowFullCombo=0
|
||||||
TimerSeconds=30
|
TimerSeconds=30
|
||||||
StyleIcon=1
|
StyleIcon=1
|
||||||
JudgeSoundTimeMarvelous=-1
|
|
||||||
JudgeSoundTimePerfect=-1
|
|
||||||
JudgeSoundTimeGreat=-1
|
|
||||||
JudgeSoundTimeGood=-1
|
|
||||||
JudgeSoundTimeBoo=-1
|
|
||||||
JudgeSoundTimeMiss=-1
|
|
||||||
JudgeSoundTimeOK=-1
|
|
||||||
JudgeSoundTimeMaxCombo=-1
|
|
||||||
JudgeSoundIfJudgeGraphicsFullAlpha=0
|
|
||||||
|
|
||||||
[ScreenEvaluationOni]
|
[ScreenEvaluationOni]
|
||||||
NextScreen=ScreenNameEntry
|
NextScreen=ScreenNameEntry
|
||||||
@@ -1574,15 +1541,6 @@ ShowComboArea=0
|
|||||||
ShowFullCombo=0
|
ShowFullCombo=0
|
||||||
TimerSeconds=30
|
TimerSeconds=30
|
||||||
StyleIcon=1
|
StyleIcon=1
|
||||||
JudgeSoundTimeMarvelous=-1
|
|
||||||
JudgeSoundTimePerfect=-1
|
|
||||||
JudgeSoundTimeGreat=-1
|
|
||||||
JudgeSoundTimeGood=-1
|
|
||||||
JudgeSoundTimeBoo=-1
|
|
||||||
JudgeSoundTimeMiss=-1
|
|
||||||
JudgeSoundTimeOK=-1
|
|
||||||
JudgeSoundTimeMaxCombo=-1
|
|
||||||
JudgeSoundIfJudgeGraphicsFullAlpha=0
|
|
||||||
|
|
||||||
[ScreenEvaluationEndless]
|
[ScreenEvaluationEndless]
|
||||||
NextScreen=ScreenNameEntry
|
NextScreen=ScreenNameEntry
|
||||||
@@ -1611,15 +1569,7 @@ ShowComboArea=0
|
|||||||
ShowFullCombo=0
|
ShowFullCombo=0
|
||||||
TimerSeconds=30
|
TimerSeconds=30
|
||||||
StyleIcon=1
|
StyleIcon=1
|
||||||
JudgeSoundTimeMarvelous=-1
|
|
||||||
JudgeSoundTimePerfect=-1
|
|
||||||
JudgeSoundTimeGreat=-1
|
|
||||||
JudgeSoundTimeGood=-1
|
|
||||||
JudgeSoundTimeBoo=-1
|
|
||||||
JudgeSoundTimeMiss=-1
|
|
||||||
JudgeSoundTimeOK=-1
|
|
||||||
JudgeSoundTimeMaxCombo=-1
|
|
||||||
JudgeSoundIfJudgeGraphicsFullAlpha=0
|
|
||||||
|
|
||||||
[ScreenEvaluationBattle]
|
[ScreenEvaluationBattle]
|
||||||
NextScreen=ScreenSelectMusic
|
NextScreen=ScreenSelectMusic
|
||||||
@@ -1648,15 +1598,6 @@ ShowComboArea=0
|
|||||||
ShowFullCombo=0
|
ShowFullCombo=0
|
||||||
TimerSeconds=15
|
TimerSeconds=15
|
||||||
StyleIcon=1
|
StyleIcon=1
|
||||||
JudgeSoundTimeMarvelous=-1
|
|
||||||
JudgeSoundTimePerfect=-1
|
|
||||||
JudgeSoundTimeGreat=-1
|
|
||||||
JudgeSoundTimeGood=-1
|
|
||||||
JudgeSoundTimeBoo=-1
|
|
||||||
JudgeSoundTimeMiss=-1
|
|
||||||
JudgeSoundTimeOK=-1
|
|
||||||
JudgeSoundTimeMaxCombo=-1
|
|
||||||
JudgeSoundIfJudgeGraphicsFullAlpha=0
|
|
||||||
|
|
||||||
[ScreenEvaluationRave]
|
[ScreenEvaluationRave]
|
||||||
NextScreen=ScreenSelectMusic
|
NextScreen=ScreenSelectMusic
|
||||||
@@ -1685,15 +1626,6 @@ ShowComboArea=0
|
|||||||
ShowFullCombo=0
|
ShowFullCombo=0
|
||||||
TimerSeconds=15
|
TimerSeconds=15
|
||||||
StyleIcon=1
|
StyleIcon=1
|
||||||
JudgeSoundTimeMarvelous=-1
|
|
||||||
JudgeSoundTimePerfect=-1
|
|
||||||
JudgeSoundTimeGreat=-1
|
|
||||||
JudgeSoundTimeGood=-1
|
|
||||||
JudgeSoundTimeBoo=-1
|
|
||||||
JudgeSoundTimeMiss=-1
|
|
||||||
JudgeSoundTimeOK=-1
|
|
||||||
JudgeSoundTimeMaxCombo=-1
|
|
||||||
JudgeSoundIfJudgeGraphicsFullAlpha=0
|
|
||||||
|
|
||||||
[ScreenMusicScroll]
|
[ScreenMusicScroll]
|
||||||
ScrollDelay=0.2
|
ScrollDelay=0.2
|
||||||
|
|||||||
@@ -64,6 +64,11 @@ const char* JUDGE_STRING[NUM_JUDGE_LINES] =
|
|||||||
#define SHOW_FULL_COMBO THEME->GetMetricB(m_sName,"ShowFullCombo")
|
#define SHOW_FULL_COMBO THEME->GetMetricB(m_sName,"ShowFullCombo")
|
||||||
#define GRAPH_START_HEIGHT THEME->GetMetricF(m_sName,"GraphStartHeight")
|
#define GRAPH_START_HEIGHT THEME->GetMetricF(m_sName,"GraphStartHeight")
|
||||||
#define TYPE THEME->GetMetric (m_sName,"Type")
|
#define TYPE THEME->GetMetric (m_sName,"Type")
|
||||||
|
#define PASSED_SOUND_TIME THEME->GetMetricF(m_sName,"PassedSoundTime")
|
||||||
|
#define FAILED_SOUND_TIME THEME->GetMetricF(m_sName,"FailedSoundTime")
|
||||||
|
#define NUM_SEQUENCE_SOUNDS THEME->GetMetricI(m_sName,"NumSequenceSounds")
|
||||||
|
#define SOUNDSEQ_TIME( i ) THEME->GetMetricF(m_sName,ssprintf("SoundSeqTime%d", i+1))
|
||||||
|
#define SOUNDSEQ_NAME( i ) THEME->GetMetric(m_sName,ssprintf("SoundSeqName%d", i+1))
|
||||||
|
|
||||||
static const int NUM_SHOWN_RADAR_CATEGORIES = 5;
|
static const int NUM_SHOWN_RADAR_CATEGORIES = 5;
|
||||||
|
|
||||||
@@ -111,6 +116,7 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName ) : Screen(sClassName)
|
|||||||
|
|
||||||
int p;
|
int p;
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Figure out which statistics and songs we're going to display
|
// Figure out which statistics and songs we're going to display
|
||||||
//
|
//
|
||||||
@@ -354,15 +360,33 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName ) : Screen(sClassName)
|
|||||||
m_Menu.Load( m_sName );
|
m_Menu.Load( m_sName );
|
||||||
this->AddChild( &m_Menu );
|
this->AddChild( &m_Menu );
|
||||||
|
|
||||||
|
if(m_Type==stage)
|
||||||
|
{
|
||||||
|
int snd=0;
|
||||||
|
for(snd=0;snd<NUM_SEQUENCE_SOUNDS;snd++) // grab in any sound sequence the user may want to throw onto this screen
|
||||||
|
{
|
||||||
|
EvalSoundSequence temp;
|
||||||
|
temp.fTime = SOUNDSEQ_TIME(snd);
|
||||||
|
temp.sSound.Load(THEME->GetPathToS(SOUNDSEQ_NAME(snd),false));
|
||||||
|
m_SoundSequences.push_back(temp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
m_timerSoundSequences.SetZero(); // zero the sound sequence timer
|
||||||
|
m_timerSoundSequences.Touch(); // set the timer going :]
|
||||||
|
m_bPassFailTriggered = false; // the sound hasn't been triggered yet
|
||||||
if(m_bFailed && m_Type==stage)
|
if(m_bFailed && m_Type==stage)
|
||||||
{
|
{
|
||||||
m_bgFailedBack.LoadFromAniDir( THEME->GetPathToB("ScreenEvaluationStage Failed Background") );
|
m_bgFailedBack.LoadFromAniDir( THEME->GetPathToB("ScreenEvaluationStage Failed Background") );
|
||||||
m_bgFailedOverlay.LoadFromAniDir( THEME->GetPathToB("ScreenEvaluationStage Failed Overlay") );
|
m_bgFailedOverlay.LoadFromAniDir( THEME->GetPathToB("ScreenEvaluationStage Failed Overlay") );
|
||||||
|
m_sndPassFail.Load(THEME->GetPathToS("ScreenEvaluationStage Failed",false));
|
||||||
|
// m_sndPassFail.Play();
|
||||||
}
|
}
|
||||||
else if( m_Type == stage )
|
else if( m_Type == stage )
|
||||||
{
|
{
|
||||||
// the themer can use the regular background for passed background
|
// the themer can use the regular background for passed background
|
||||||
m_bgPassedOverlay.LoadFromAniDir( THEME->GetPathToB("ScreenEvaluationStage Passed Overlay") );
|
m_bgPassedOverlay.LoadFromAniDir( THEME->GetPathToB("ScreenEvaluationStage Passed Overlay") );
|
||||||
|
m_sndPassFail.Load(THEME->GetPathToS("ScreenEvaluationStage Passed",false));
|
||||||
|
// m_sndPassFail.Play();
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// init banner area
|
// init banner area
|
||||||
@@ -853,6 +877,7 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName ) : Screen(sClassName)
|
|||||||
|
|
||||||
this->SortByZ();
|
this->SortByZ();
|
||||||
|
|
||||||
|
|
||||||
SOUND->PlayMusic( THEME->GetPathToS("ScreenEvaluation music") );
|
SOUND->PlayMusic( THEME->GetPathToS("ScreenEvaluation music") );
|
||||||
m_fScreenCreateTime = RageTimer::GetTimeSinceStart();
|
m_fScreenCreateTime = RageTimer::GetTimeSinceStart();
|
||||||
}
|
}
|
||||||
@@ -1026,12 +1051,41 @@ void ScreenEvaluation::Update( float fDeltaTime )
|
|||||||
|
|
||||||
if(m_bFailed && m_Type == stage)
|
if(m_bFailed && m_Type == stage)
|
||||||
{
|
{
|
||||||
|
if( m_timerSoundSequences.Ago() > FAILED_SOUND_TIME && !m_bPassFailTriggered )
|
||||||
|
{
|
||||||
|
if(!m_sndPassFail.IsPlaying()) m_sndPassFail.Play();
|
||||||
|
m_bPassFailTriggered = true;
|
||||||
|
}
|
||||||
m_bgFailedBack.Update( fDeltaTime );
|
m_bgFailedBack.Update( fDeltaTime );
|
||||||
m_bgFailedOverlay.Update( fDeltaTime );
|
m_bgFailedOverlay.Update( fDeltaTime );
|
||||||
}
|
}
|
||||||
else if (m_Type == stage)
|
else if (m_Type == stage) // STAGE eval AND passed
|
||||||
|
{
|
||||||
|
if( m_timerSoundSequences.Ago() > PASSED_SOUND_TIME && !m_bPassFailTriggered )
|
||||||
|
{
|
||||||
|
if(!m_sndPassFail.IsPlaying()) m_sndPassFail.Play();
|
||||||
|
m_bPassFailTriggered = true;
|
||||||
|
}
|
||||||
|
|
||||||
m_bgPassedOverlay.Update( fDeltaTime );
|
m_bgPassedOverlay.Update( fDeltaTime );
|
||||||
|
|
||||||
|
}
|
||||||
|
if(m_Type == stage) // stage eval ... pass / fail / whatever
|
||||||
|
{
|
||||||
|
int snd = 0;
|
||||||
|
for(snd=0;snd<m_SoundSequences.size();snd++)
|
||||||
|
{
|
||||||
|
if(m_SoundSequences[snd].fTime != -1) // already played? skip...
|
||||||
|
{
|
||||||
|
if(m_timerSoundSequences.Ago() > m_SoundSequences[snd].fTime )
|
||||||
|
{
|
||||||
|
m_SoundSequences[snd].fTime = -1; // -1 indicates already started playing
|
||||||
|
m_SoundSequences[snd].sSound.Play();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for( int p=0; p<NUM_PLAYERS; p++)
|
for( int p=0; p<NUM_PLAYERS; p++)
|
||||||
{
|
{
|
||||||
if (GAMESTATE->m_CurStageStats.iBonus[p] == 0)
|
if (GAMESTATE->m_CurStageStats.iBonus[p] == 0)
|
||||||
@@ -1120,6 +1174,8 @@ void ScreenEvaluation::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
SCREENMAN->SetNewScreen( FAILED_SCREEN );
|
SCREENMAN->SetNewScreen( FAILED_SCREEN );
|
||||||
else
|
else
|
||||||
SCREENMAN->SetNewScreen( NEXT_SCREEN );
|
SCREENMAN->SetNewScreen( NEXT_SCREEN );
|
||||||
|
|
||||||
|
if( m_sndPassFail.IsPlaying() ) m_sndPassFail.Stop();
|
||||||
break;
|
break;
|
||||||
case SM_GoToSelectCourse:
|
case SM_GoToSelectCourse:
|
||||||
SCREENMAN->SetNewScreen( "ScreenSelectCourse" );
|
SCREENMAN->SetNewScreen( "ScreenSelectCourse" );
|
||||||
|
|||||||
@@ -33,6 +33,12 @@ const int MAX_SONGS_TO_SHOW = 5; // In summary, we show last 3 stages, plus extr
|
|||||||
const int NUM_JUDGE_LINES = 9; // marvelous, perfect, great, good, boo, miss, ok, max_combo, error
|
const int NUM_JUDGE_LINES = 9; // marvelous, perfect, great, good, boo, miss, ok, max_combo, error
|
||||||
const int NUM_SCORE_LINES = 2; // score, time
|
const int NUM_SCORE_LINES = 2; // score, time
|
||||||
|
|
||||||
|
// sound sequences for the evaluation screen
|
||||||
|
struct EvalSoundSequence
|
||||||
|
{
|
||||||
|
float fTime;
|
||||||
|
RageSound sSound;
|
||||||
|
};
|
||||||
|
|
||||||
class ScreenEvaluation : public Screen
|
class ScreenEvaluation : public Screen
|
||||||
{
|
{
|
||||||
@@ -120,6 +126,13 @@ protected:
|
|||||||
Sprite m_sprTryExtraStage;
|
Sprite m_sprTryExtraStage;
|
||||||
AutoActor m_FullCombo[NUM_PLAYERS];
|
AutoActor m_FullCombo[NUM_PLAYERS];
|
||||||
bool m_bFailed;
|
bool m_bFailed;
|
||||||
|
|
||||||
|
// sound effects for other gametypes
|
||||||
|
|
||||||
|
RageSound m_sndPassFail; // sound played if the player passes or fails
|
||||||
|
bool m_bPassFailTriggered; // has the pass / fail sound been played yet?
|
||||||
|
RageTimer m_timerSoundSequences; // timer used for triggering sounds.
|
||||||
|
vector<EvalSoundSequence> m_SoundSequences; // a sequence of sounds to be played (although they're stored in no particular order!)
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user