More Ez2dancer Theme - Almost done Style Select.
Cleaned up Turtle Noteskin a bit.
This commit is contained in:
@@ -678,7 +678,7 @@ DifficultyRatingX=999
|
|||||||
DifficultyRatingY=999
|
DifficultyRatingY=999
|
||||||
DifficultyRatingOrientation=0
|
DifficultyRatingOrientation=0
|
||||||
DifficultyRatingSpacing=40.0
|
DifficultyRatingSpacing=40.0
|
||||||
PreviewMusicMode=0 // 0 = play music as you select, 1 = no music plays, select once and preview music plays, select again for confirm, 2 = no music plays at all, 3 = play music as select, press twice to confirm
|
PreviewMusicMode=0 // 0 = play music as you select, 1 = no music plays, select once and preview music plays, select again for confirm, 2 = no music plays at all, 3 = play music as select, press twice to confirm, 4 = static menu music plays, no confirm
|
||||||
|
|
||||||
[ScreenSelectCourse]
|
[ScreenSelectCourse]
|
||||||
ExplanationX=132
|
ExplanationX=132
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ MusicBannerWheel::MusicBannerWheel()
|
|||||||
scrlistPos=0;
|
scrlistPos=0;
|
||||||
SongsExist=0;
|
SongsExist=0;
|
||||||
SingleLoad=0;
|
SingleLoad=0;
|
||||||
|
bScanning = false;
|
||||||
|
|
||||||
if(DEFAULT_SCROLL_DIRECTION && GAMESTATE->m_pCurSong == NULL) /* check the song is null... incase they have just come back from a song and changed their PlayerOptions */
|
if(DEFAULT_SCROLL_DIRECTION && GAMESTATE->m_pCurSong == NULL) /* check the song is null... incase they have just come back from a song and changed their PlayerOptions */
|
||||||
{
|
{
|
||||||
@@ -179,7 +180,14 @@ void MusicBannerWheel::InsertNewBanner(int direction)
|
|||||||
{
|
{
|
||||||
ASSERT(0); // we should be going in some sort of direction.
|
ASSERT(0); // we should be going in some sort of direction.
|
||||||
}
|
}
|
||||||
if(PREVIEWMUSICMODE == 0 || PREVIEWMUSICMODE == 3)
|
if((PREVIEWMUSICMODE == 0 || PREVIEWMUSICMODE == 3) && !bScanning)
|
||||||
|
PlayMusicSample();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MusicBannerWheel::SetScanMode(bool Scanmode)
|
||||||
|
{
|
||||||
|
bScanning = Scanmode;
|
||||||
|
if((PREVIEWMUSICMODE == 0 || PREVIEWMUSICMODE == 3) && !Scanmode)
|
||||||
PlayMusicSample();
|
PlayMusicSample();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -270,7 +278,7 @@ void MusicBannerWheel::LoadSongData()
|
|||||||
m_ScrollingList.Load( asGraphicPaths );
|
m_ScrollingList.Load( asGraphicPaths );
|
||||||
if(SingleLoad == 2)
|
if(SingleLoad == 2)
|
||||||
SingleLoad = 1;
|
SingleLoad = 1;
|
||||||
if(PREVIEWMUSICMODE == 0 || PREVIEWMUSICMODE == 3)
|
if((PREVIEWMUSICMODE == 0 || PREVIEWMUSICMODE == 3) && !bScanning)
|
||||||
PlayMusicSample();
|
PlayMusicSample();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,12 +34,16 @@ public:
|
|||||||
void PlayMusicSample();
|
void PlayMusicSample();
|
||||||
void StartBouncing();
|
void StartBouncing();
|
||||||
void StopBouncing();
|
void StopBouncing();
|
||||||
|
void SetScanMode(bool Scanmode);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void SetNewPos(int NewPos);
|
void SetNewPos(int NewPos);
|
||||||
void LoadSongData();
|
void LoadSongData();
|
||||||
void ChangeNotes();
|
void ChangeNotes();
|
||||||
void InsertNewBanner(int direction);
|
void InsertNewBanner(int direction);
|
||||||
|
|
||||||
|
bool bScanning;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
BitmapText m_debugtext;
|
BitmapText m_debugtext;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -70,12 +70,20 @@ const ScreenMessage SM_NoSongs = ScreenMessage(SM_User+3);
|
|||||||
ScreenEz2SelectMusic::ScreenEz2SelectMusic() : Screen("ScreenEz2SelectMusic")
|
ScreenEz2SelectMusic::ScreenEz2SelectMusic() : Screen("ScreenEz2SelectMusic")
|
||||||
{
|
{
|
||||||
i_SkipAheadOffset = 0;
|
i_SkipAheadOffset = 0;
|
||||||
|
LastInputTime = 0;
|
||||||
ScrollStartTime = 0;
|
ScrollStartTime = 0;
|
||||||
m_bTransitioning = false;
|
m_bTransitioning = false;
|
||||||
|
m_bScanning = false;
|
||||||
m_fRemainingWaitTime = 0.0f;
|
m_fRemainingWaitTime = 0.0f;
|
||||||
i_ErrorDetected=0;
|
i_ErrorDetected=0;
|
||||||
CodeDetector::RefreshCacheItems();
|
CodeDetector::RefreshCacheItems();
|
||||||
|
|
||||||
|
if(PREVIEWMUSICMODE == 4)
|
||||||
|
{
|
||||||
|
m_soundBackMusic.Load( THEME->GetPathToS("ScreenEz2SelectMusic music"));
|
||||||
|
m_soundBackMusic.Play();
|
||||||
|
}
|
||||||
|
|
||||||
if(PREVIEWMUSICMODE == 1 || PREVIEWMUSICMODE == 3)
|
if(PREVIEWMUSICMODE == 1 || PREVIEWMUSICMODE == 3)
|
||||||
{
|
{
|
||||||
if(PREVIEWMUSICMODE == 1)
|
if(PREVIEWMUSICMODE == 1)
|
||||||
@@ -87,6 +95,7 @@ ScreenEz2SelectMusic::ScreenEz2SelectMusic() : Screen("ScreenEz2SelectMusic")
|
|||||||
m_Menu.Load("ScreenSelectMusic", true, false);
|
m_Menu.Load("ScreenSelectMusic", true, false);
|
||||||
this->AddChild( &m_Menu );
|
this->AddChild( &m_Menu );
|
||||||
|
|
||||||
|
m_soundButtonPress.Load( THEME->GetPathToS("ScreenEz2SelectMusic buttonpress"));
|
||||||
m_soundMusicChange.Load( THEME->GetPathToS("ScreenEz2SelectMusic change"));
|
m_soundMusicChange.Load( THEME->GetPathToS("ScreenEz2SelectMusic change"));
|
||||||
m_soundMusicCycle.Load( THEME->GetPathToS("ScreenEz2SelectMusic cycle"));
|
m_soundMusicCycle.Load( THEME->GetPathToS("ScreenEz2SelectMusic cycle"));
|
||||||
m_soundSelect.Load( THEME->GetPathToS("Common start") );
|
m_soundSelect.Load( THEME->GetPathToS("Common start") );
|
||||||
@@ -244,6 +253,7 @@ void ScreenEz2SelectMusic::Input( const DeviceInput& DeviceI, const InputEventTy
|
|||||||
}
|
}
|
||||||
if( type != IET_FIRST_PRESS )
|
if( type != IET_FIRST_PRESS )
|
||||||
{
|
{
|
||||||
|
m_bScanning = true;
|
||||||
m_soundMusicCycle.Play();
|
m_soundMusicCycle.Play();
|
||||||
i_SkipAheadOffset = 0;
|
i_SkipAheadOffset = 0;
|
||||||
if(ScrollStartTime == 0)
|
if(ScrollStartTime == 0)
|
||||||
@@ -265,12 +275,13 @@ void ScreenEz2SelectMusic::Input( const DeviceInput& DeviceI, const InputEventTy
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
m_bScanning = false;
|
||||||
i_SkipAheadOffset = 0;
|
i_SkipAheadOffset = 0;
|
||||||
ScrollStartTime = 0;
|
ScrollStartTime = 0;
|
||||||
m_soundMusicChange.Play();
|
// m_soundMusicChange.Play();
|
||||||
|
m_soundButtonPress.Play();
|
||||||
}
|
}
|
||||||
|
LastInputTime = RageTimer::GetTimeSinceStart();
|
||||||
|
|
||||||
Screen::Input( DeviceI, type, GameI, MenuI, StyleI );
|
Screen::Input( DeviceI, type, GameI, MenuI, StyleI );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -444,6 +455,15 @@ void ScreenEz2SelectMusic::MenuStart( PlayerNumber pn )
|
|||||||
|
|
||||||
void ScreenEz2SelectMusic::Update( float fDeltaTime )
|
void ScreenEz2SelectMusic::Update( float fDeltaTime )
|
||||||
{
|
{
|
||||||
|
if(i_SkipAheadOffset > 0 && RageTimer::GetTimeSinceStart() - LastInputTime < 0.5)
|
||||||
|
{
|
||||||
|
m_MusicBannerWheel.SetScanMode(true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_MusicBannerWheel.SetScanMode(false);
|
||||||
|
}
|
||||||
|
|
||||||
if(m_MusicBannerWheel.CheckSongsExist() == 0 && ! i_ErrorDetected)
|
if(m_MusicBannerWheel.CheckSongsExist() == 0 && ! i_ErrorDetected)
|
||||||
{
|
{
|
||||||
SCREENMAN->Prompt( SM_NoSongs, "ERROR:\n \nThere are no songs available for play!" );
|
SCREENMAN->Prompt( SM_NoSongs, "ERROR:\n \nThere are no songs available for play!" );
|
||||||
@@ -576,6 +596,9 @@ void ScreenEz2SelectMusic::MusicChanged()
|
|||||||
OFF_COMMAND( m_sprBalloon );
|
OFF_COMMAND( m_sprBalloon );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( !m_bScanning )
|
||||||
|
m_soundMusicChange.Play();
|
||||||
|
|
||||||
if((PREVIEWMUSICMODE == 1 || PREVIEWMUSICMODE == 3) && iConfirmSelection == 1)
|
if((PREVIEWMUSICMODE == 1 || PREVIEWMUSICMODE == 3) && iConfirmSelection == 1)
|
||||||
{
|
{
|
||||||
iConfirmSelection = 0;
|
iConfirmSelection = 0;
|
||||||
|
|||||||
@@ -70,6 +70,8 @@ protected:
|
|||||||
RageSound m_soundOptionsChange;
|
RageSound m_soundOptionsChange;
|
||||||
RageSound m_soundMusicChange;
|
RageSound m_soundMusicChange;
|
||||||
RageSound m_soundMusicCycle;
|
RageSound m_soundMusicCycle;
|
||||||
|
RageSound m_soundBackMusic;
|
||||||
|
RageSound m_soundButtonPress;
|
||||||
|
|
||||||
float m_fRemainingWaitTime;
|
float m_fRemainingWaitTime;
|
||||||
MusicBannerWheel m_MusicBannerWheel;
|
MusicBannerWheel m_MusicBannerWheel;
|
||||||
@@ -77,13 +79,16 @@ protected:
|
|||||||
DifficultyRating m_DifficultyRating;
|
DifficultyRating m_DifficultyRating;
|
||||||
// DifficultyMeter m_DifficultyMeter[NUM_PLAYERS];
|
// DifficultyMeter m_DifficultyMeter[NUM_PLAYERS];
|
||||||
vector<Notes*> m_arrayNotes[NUM_PLAYERS];
|
vector<Notes*> m_arrayNotes[NUM_PLAYERS];
|
||||||
|
|
||||||
int m_iSelection[NUM_PLAYERS];
|
int m_iSelection[NUM_PLAYERS];
|
||||||
bool m_bGoToOptions;
|
bool m_bGoToOptions;
|
||||||
bool m_bMadeChoice;
|
bool m_bMadeChoice;
|
||||||
bool m_bTransitioning;
|
bool m_bTransitioning;
|
||||||
|
bool m_bScanning;
|
||||||
|
|
||||||
int i_SkipAheadOffset;
|
int i_SkipAheadOffset;
|
||||||
float ScrollStartTime;
|
float ScrollStartTime;
|
||||||
|
float LastInputTime;
|
||||||
|
|
||||||
int i_ErrorDetected;
|
int i_ErrorDetected;
|
||||||
|
|
||||||
|
|||||||
@@ -65,12 +65,14 @@ ScreenSelectMode::ScreenSelectMode() : ScreenSelect( "ScreenSelectMode" )
|
|||||||
|
|
||||||
arrayLocations.push_back( sElementPath );
|
arrayLocations.push_back( sElementPath );
|
||||||
|
|
||||||
if(USE_MODE_SPECIFIC_BGS == 1)
|
/* if(USE_MODE_SPECIFIC_BGS == 1)
|
||||||
{
|
{
|
||||||
BGAnimation templayer;
|
BGAnimation templayer;
|
||||||
templayer.LoadFromAniDir( THEME->GetPathToB(ssprintf("ScreenSelectMode background %s", mc.name )) );
|
templayer.LoadFromAniDir( THEME->GetPathToB(ssprintf("ScreenSelectMode background %s", mc.name )) );
|
||||||
templayer.SetDiffuse(RageColor(0,0,0,0));
|
// templayer.SetDiffuse(RageColor(0,0,0,0));
|
||||||
}
|
m_Backgrounds.push_back(&templayer);
|
||||||
|
this->AddChild( &m_Backgrounds[i] );
|
||||||
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
// m_ScrollingList.UseSpriteType(BANNERTYPE);
|
// m_ScrollingList.UseSpriteType(BANNERTYPE);
|
||||||
@@ -119,7 +121,20 @@ void ScreenSelectMode::MenuLeft( PlayerNumber pn )
|
|||||||
|
|
||||||
void ScreenSelectMode::ChangeBGA()
|
void ScreenSelectMode::ChangeBGA()
|
||||||
{
|
{
|
||||||
|
/* for(int i=0; i<m_Backgrounds.size(); i++)
|
||||||
|
{
|
||||||
|
BGAnimation* templayer;
|
||||||
|
templayer = m_Backgrounds[i];
|
||||||
|
if(i == m_ScrollingList.GetSelection() )
|
||||||
|
{
|
||||||
|
templayer->SetDiffuse( RageColor(0,0,0,0));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
templayer->SetDiffuse( RageColor(1,1,1,1));
|
||||||
|
}
|
||||||
|
m_Backgrounds[i] = templayer;
|
||||||
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenSelectMode::MenuRight( PlayerNumber pn )
|
void ScreenSelectMode::MenuRight( PlayerNumber pn )
|
||||||
@@ -153,12 +168,31 @@ void ScreenSelectMode::UpdateSelectableChoices()
|
|||||||
// if its joint premium and inclusive of double consider double and versus as needing another coin
|
// if its joint premium and inclusive of double consider double and versus as needing another coin
|
||||||
// if its joint premium and non-inclusive of double consider double as appearing only when one player is available.
|
// if its joint premium and non-inclusive of double consider double as appearing only when one player is available.
|
||||||
// if its joint premium, everythings available for play
|
// if its joint premium, everythings available for play
|
||||||
if( (PREFSMAN->m_bJointPremium && INCLUDE_DOUBLE_IN_JP == 1 && (GAMESTATE->GetNumSidesJoined() == mc.numSidesJoinedToPlay) ) ||
|
/* if( (PREFSMAN->m_bJointPremium && INCLUDE_DOUBLE_IN_JP == 1 && (GAMESTATE->GetNumSidesJoined() == mc.numSidesJoinedToPlay) ) ||
|
||||||
(PREFSMAN->m_bJointPremium && INCLUDE_DOUBLE_IN_JP == 0 &&
|
(PREFSMAN->m_bJointPremium && INCLUDE_DOUBLE_IN_JP == 0 &&
|
||||||
modename.substr(0, 6) == "DOUBLE" || modename.substr(0, 13) == "ARCADE-DOUBLE" ||
|
modename.substr(0, 6) == "DOUBLE" || modename.substr(0, 13) == "ARCADE-DOUBLE" ||
|
||||||
modename.substr(0, 10) == "HALFDOUBLE" || modename.substr(0, 17) == "ARCADE-HALFDOUBLE" ||
|
modename.substr(0, 10) == "HALFDOUBLE" || modename.substr(0, 17) == "ARCADE-HALFDOUBLE" ||
|
||||||
(GAMESTATE->GetNumSidesJoined() == mc.numSidesJoinedToPlay)) ||
|
(GAMESTATE->GetNumSidesJoined() != mc.numSidesJoinedToPlay)) ||
|
||||||
(!PREFSMAN->m_bJointPremium)
|
(!PREFSMAN->m_bJointPremium)
|
||||||
|
)*/
|
||||||
|
|
||||||
|
if( (!PREFSMAN->m_bJointPremium ) ||
|
||||||
|
(
|
||||||
|
PREFSMAN->m_bJointPremium &&
|
||||||
|
(
|
||||||
|
(INCLUDE_DOUBLE_IN_JP == 1 && (GAMESTATE->GetNumSidesJoined() == mc.numSidesJoinedToPlay)) ||
|
||||||
|
(
|
||||||
|
INCLUDE_DOUBLE_IN_JP == 0 &&
|
||||||
|
(
|
||||||
|
GAMESTATE->GetNumSidesJoined() == mc.numSidesJoinedToPlay ||
|
||||||
|
(modename.substr(0, 6) == "DOUBLE" || modename.substr(0, 13) == "ARCADE-DOUBLE" ||
|
||||||
|
modename.substr(0, 10) == "HALFDOUBLE" || modename.substr(0, 17) == "ARCADE-HALFDOUBLE") &&
|
||||||
|
GAMESTATE->GetNumSidesJoined() != 2
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
m_iNumChoices++;
|
m_iNumChoices++;
|
||||||
@@ -221,5 +255,17 @@ int ScreenSelectMode::GetSelectionIndex( PlayerNumber pn )
|
|||||||
|
|
||||||
void ScreenSelectMode::Update( float fDelta )
|
void ScreenSelectMode::Update( float fDelta )
|
||||||
{
|
{
|
||||||
|
/* if(m_Backgrounds.empty() && USE_MODE_SPECIFIC_BGS == 1)
|
||||||
|
{
|
||||||
|
ASSERT(0);
|
||||||
|
}
|
||||||
|
else if(USE_MODE_SPECIFIC_BGS == 1)
|
||||||
|
{
|
||||||
|
// for(int i=0; i<m_Backgrounds.size(); i++)
|
||||||
|
// {
|
||||||
|
// m_Backgrounds[i]->Draw();
|
||||||
|
// }
|
||||||
|
}*/
|
||||||
|
|
||||||
ScreenSelect::Update( fDelta );
|
ScreenSelect::Update( fDelta );
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user