More Ez2dancer Theme - Almost done Style Select.

Cleaned up Turtle Noteskin a bit.
This commit is contained in:
Andrew Livy
2003-06-11 19:40:47 +00:00
parent b20191ffee
commit 978a7ae3cc
6 changed files with 98 additions and 12 deletions
+1 -1
View File
@@ -678,7 +678,7 @@ DifficultyRatingX=999
DifficultyRatingY=999
DifficultyRatingOrientation=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]
ExplanationX=132
+10 -2
View File
@@ -49,6 +49,7 @@ MusicBannerWheel::MusicBannerWheel()
scrlistPos=0;
SongsExist=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 */
{
@@ -179,10 +180,17 @@ void MusicBannerWheel::InsertNewBanner(int 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();
}
/****************************
void MusicBannerWheel::LoadSongData()
@@ -270,7 +278,7 @@ void MusicBannerWheel::LoadSongData()
m_ScrollingList.Load( asGraphicPaths );
if(SingleLoad == 2)
SingleLoad = 1;
if(PREVIEWMUSICMODE == 0 || PREVIEWMUSICMODE == 3)
if((PREVIEWMUSICMODE == 0 || PREVIEWMUSICMODE == 3) && !bScanning)
PlayMusicSample();
}
+4
View File
@@ -34,12 +34,16 @@ public:
void PlayMusicSample();
void StartBouncing();
void StopBouncing();
void SetScanMode(bool Scanmode);
private:
void SetNewPos(int NewPos);
void LoadSongData();
void ChangeNotes();
void InsertNewBanner(int direction);
bool bScanning;
#ifdef DEBUG
BitmapText m_debugtext;
#endif
+26 -3
View File
@@ -70,12 +70,20 @@ const ScreenMessage SM_NoSongs = ScreenMessage(SM_User+3);
ScreenEz2SelectMusic::ScreenEz2SelectMusic() : Screen("ScreenEz2SelectMusic")
{
i_SkipAheadOffset = 0;
LastInputTime = 0;
ScrollStartTime = 0;
m_bTransitioning = false;
m_bScanning = false;
m_fRemainingWaitTime = 0.0f;
i_ErrorDetected=0;
CodeDetector::RefreshCacheItems();
if(PREVIEWMUSICMODE == 4)
{
m_soundBackMusic.Load( THEME->GetPathToS("ScreenEz2SelectMusic music"));
m_soundBackMusic.Play();
}
if(PREVIEWMUSICMODE == 1 || PREVIEWMUSICMODE == 3)
{
if(PREVIEWMUSICMODE == 1)
@@ -87,6 +95,7 @@ ScreenEz2SelectMusic::ScreenEz2SelectMusic() : Screen("ScreenEz2SelectMusic")
m_Menu.Load("ScreenSelectMusic", true, false);
this->AddChild( &m_Menu );
m_soundButtonPress.Load( THEME->GetPathToS("ScreenEz2SelectMusic buttonpress"));
m_soundMusicChange.Load( THEME->GetPathToS("ScreenEz2SelectMusic change"));
m_soundMusicCycle.Load( THEME->GetPathToS("ScreenEz2SelectMusic cycle"));
m_soundSelect.Load( THEME->GetPathToS("Common start") );
@@ -244,6 +253,7 @@ void ScreenEz2SelectMusic::Input( const DeviceInput& DeviceI, const InputEventTy
}
if( type != IET_FIRST_PRESS )
{
m_bScanning = true;
m_soundMusicCycle.Play();
i_SkipAheadOffset = 0;
if(ScrollStartTime == 0)
@@ -265,12 +275,13 @@ void ScreenEz2SelectMusic::Input( const DeviceInput& DeviceI, const InputEventTy
}
else
{
m_bScanning = false;
i_SkipAheadOffset = 0;
ScrollStartTime = 0;
m_soundMusicChange.Play();
// m_soundMusicChange.Play();
m_soundButtonPress.Play();
}
LastInputTime = RageTimer::GetTimeSinceStart();
Screen::Input( DeviceI, type, GameI, MenuI, StyleI );
}
@@ -444,6 +455,15 @@ void ScreenEz2SelectMusic::MenuStart( PlayerNumber pn )
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)
{
SCREENMAN->Prompt( SM_NoSongs, "ERROR:\n \nThere are no songs available for play!" );
@@ -575,6 +595,9 @@ void ScreenEz2SelectMusic::MusicChanged()
m_sprBalloon.StopTweening();
OFF_COMMAND( m_sprBalloon );
}
if( !m_bScanning )
m_soundMusicChange.Play();
if((PREVIEWMUSICMODE == 1 || PREVIEWMUSICMODE == 3) && iConfirmSelection == 1)
{
+5
View File
@@ -70,6 +70,8 @@ protected:
RageSound m_soundOptionsChange;
RageSound m_soundMusicChange;
RageSound m_soundMusicCycle;
RageSound m_soundBackMusic;
RageSound m_soundButtonPress;
float m_fRemainingWaitTime;
MusicBannerWheel m_MusicBannerWheel;
@@ -77,13 +79,16 @@ protected:
DifficultyRating m_DifficultyRating;
// DifficultyMeter m_DifficultyMeter[NUM_PLAYERS];
vector<Notes*> m_arrayNotes[NUM_PLAYERS];
int m_iSelection[NUM_PLAYERS];
bool m_bGoToOptions;
bool m_bMadeChoice;
bool m_bTransitioning;
bool m_bScanning;
int i_SkipAheadOffset;
float ScrollStartTime;
float LastInputTime;
int i_ErrorDetected;
+52 -6
View File
@@ -65,12 +65,14 @@ ScreenSelectMode::ScreenSelectMode() : ScreenSelect( "ScreenSelectMode" )
arrayLocations.push_back( sElementPath );
if(USE_MODE_SPECIFIC_BGS == 1)
/* if(USE_MODE_SPECIFIC_BGS == 1)
{
BGAnimation templayer;
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);
@@ -119,7 +121,20 @@ void ScreenSelectMode::MenuLeft( PlayerNumber pn )
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 )
@@ -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 non-inclusive of double consider double as appearing only when one player is available.
// 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 &&
modename.substr(0, 6) == "DOUBLE" || modename.substr(0, 13) == "ARCADE-DOUBLE" ||
modename.substr(0, 10) == "HALFDOUBLE" || modename.substr(0, 17) == "ARCADE-HALFDOUBLE" ||
(GAMESTATE->GetNumSidesJoined() == mc.numSidesJoinedToPlay)) ||
(GAMESTATE->GetNumSidesJoined() != mc.numSidesJoinedToPlay)) ||
(!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++;
@@ -221,5 +255,17 @@ int ScreenSelectMode::GetSelectionIndex( PlayerNumber pn )
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 );
}