Changes to PIU/EZ2 screenselect. Banners loaded in different way, now shows marathon/longver balloons. Scrolls faster after 5/10 seconds of continued scrolling.
This commit is contained in:
@@ -572,6 +572,10 @@ TimerSeconds=60
|
||||
SampleMusicDelay=0.25
|
||||
|
||||
[ScreenEz2SelectMusic]
|
||||
BalloonX=492
|
||||
BalloonY=140
|
||||
BalloonOnCommand=linear,0.2;zoomy,1;bob;effectmagnitude,0,10,0
|
||||
BalloonOffCommand=linear,0.2;zoomy,0
|
||||
PumpDifficultyX=320
|
||||
PumpDifficultyY=280
|
||||
ScrollingListX=320
|
||||
@@ -1787,6 +1791,7 @@ NextScreen=ScreenHowToPlay
|
||||
|
||||
[ScreenHowToPlay]
|
||||
NextScreen=ScreenDemonstration
|
||||
ScrollBPM=100
|
||||
|
||||
[ScreenDemonstration]
|
||||
SecondsToShow=30
|
||||
|
||||
@@ -31,6 +31,12 @@ bool CroppedSprite::Load( RageTextureID ID )
|
||||
return true;
|
||||
}
|
||||
|
||||
void CroppedSprite::SetWH(float fWidth, float fHeight)
|
||||
{
|
||||
Sprite::SetWidth(fWidth);
|
||||
Sprite::SetHeight(fWidth);
|
||||
}
|
||||
|
||||
void CroppedSprite::SetCroppedSize( float fWidth, float fHeight )
|
||||
{
|
||||
m_fCropWidth = fWidth;
|
||||
|
||||
@@ -23,6 +23,7 @@ public:
|
||||
|
||||
bool Load( RageTextureID ID );
|
||||
void SetCroppedSize( float fWidth, float fHeight );
|
||||
void SetWH(float fWidth, float fHeight);
|
||||
|
||||
protected:
|
||||
void CropToSize( float fWidth, float fHeight );
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "RageSoundManager.h"
|
||||
#include "StyleDef.h"
|
||||
#include "song.h"
|
||||
#include "ActorUtil.h"
|
||||
|
||||
#define BANNERSPACING 200
|
||||
#define MAXSONGSINBUFFER 5
|
||||
@@ -56,7 +57,6 @@ MusicBannerWheel::MusicBannerWheel()
|
||||
else // Get the Group They Want
|
||||
SONGMAN->GetSongs( arraySongs, GAMESTATE->m_sPreferredGroup, GAMESTATE->GetNumStagesLeft() );
|
||||
|
||||
|
||||
if( arraySongs.size() > 0)
|
||||
{
|
||||
SongsExist=1;
|
||||
@@ -93,6 +93,7 @@ MusicBannerWheel::MusicBannerWheel()
|
||||
m_debugtext.SetXY( 0, -120 );
|
||||
this->AddChild(&m_debugtext);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/********************************************
|
||||
@@ -128,7 +129,7 @@ void MusicBannerWheel::InsertNewBanner(int direction)
|
||||
|
||||
if( pSong == NULL ) sGraphicPath = (THEME->GetPathToG("Common fallback banner"));
|
||||
else if (pSong->HasBanner()) sGraphicPath = (pSong->GetBannerPath());
|
||||
else if (PREFSMAN->m_bUseBGIfNoBanner && pSong->HasBackground() ) sGraphicPath = (pSong->GetBannerPath());
|
||||
else if (PREFSMAN->m_bUseBGIfNoBanner && pSong->HasBackground() ) sGraphicPath = (pSong->GetBackgroundPath());
|
||||
else sGraphicPath = (THEME->GetPathToG("Common fallback banner"));
|
||||
|
||||
elementtoreplace = scrlistPos - 2;
|
||||
@@ -155,7 +156,7 @@ void MusicBannerWheel::InsertNewBanner(int direction)
|
||||
|
||||
if( pSong == NULL ) sGraphicPath = (THEME->GetPathToG("Common fallback banner"));
|
||||
else if (pSong->HasBanner()) sGraphicPath = (pSong->GetBannerPath());
|
||||
else if (PREFSMAN->m_bUseBGIfNoBanner && pSong->HasBackground() ) sGraphicPath = (pSong->GetBannerPath());
|
||||
else if (PREFSMAN->m_bUseBGIfNoBanner && pSong->HasBackground() ) sGraphicPath = (pSong->GetBackgroundPath());
|
||||
else sGraphicPath = (THEME->GetPathToG("Common fallback banner"));
|
||||
|
||||
elementtoreplace = scrlistPos + 2;
|
||||
@@ -200,7 +201,7 @@ void MusicBannerWheel::LoadSongData()
|
||||
|
||||
if( pSong == NULL ) asGraphicPaths.push_back(THEME->GetPathToG("Common fallback banner"));
|
||||
else if (pSong->HasBanner()) asGraphicPaths.push_back(pSong->GetBannerPath());
|
||||
else if (PREFSMAN->m_bUseBGIfNoBanner && pSong->HasBackground() ) asGraphicPaths.push_back(pSong->GetBannerPath());
|
||||
else if (PREFSMAN->m_bUseBGIfNoBanner && pSong->HasBackground() ) asGraphicPaths.push_back(pSong->GetBackgroundPath());
|
||||
else asGraphicPaths.push_back(THEME->GetPathToG("Common fallback banner"));
|
||||
}
|
||||
}
|
||||
@@ -252,7 +253,7 @@ void MusicBannerWheel::LoadSongData()
|
||||
|
||||
if( pSong == NULL ) asGraphicPaths.push_back(THEME->GetPathToG("Common fallback banner"));
|
||||
else if (pSong->HasBanner()) asGraphicPaths.push_back(pSong->GetBannerPath());
|
||||
else if (PREFSMAN->m_bUseBGIfNoBanner && pSong->HasBackground() ) asGraphicPaths.push_back(pSong->GetBannerPath());
|
||||
else if (PREFSMAN->m_bUseBGIfNoBanner && pSong->HasBackground() ) asGraphicPaths.push_back(pSong->GetBackgroundPath());
|
||||
else asGraphicPaths.push_back(THEME->GetPathToG("Common fallback banner"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,8 @@
|
||||
#include "InputMapper.h"
|
||||
#include "CodeDetector.h"
|
||||
#include "Notes.h"
|
||||
|
||||
#include "RageTimer.h"
|
||||
#include "ActorUtil.h"
|
||||
|
||||
#define SCROLLING_LIST_X THEME->GetMetricF("ScreenEz2SelectMusic","ScrollingListX")
|
||||
#define SCROLLING_LIST_Y THEME->GetMetricF("ScreenEz2SelectMusic","ScrollingListY")
|
||||
@@ -61,6 +62,8 @@ const ScreenMessage SM_NoSongs = ScreenMessage(SM_User+3);
|
||||
|
||||
ScreenEz2SelectMusic::ScreenEz2SelectMusic() : Screen("ScreenEz2SelectMusic")
|
||||
{
|
||||
i_SkipAheadOffset = 0;
|
||||
ScrollStartTime = 0;
|
||||
m_bTransitioning = false;
|
||||
m_fRemainingWaitTime = 0.0f;
|
||||
i_ErrorDetected=0;
|
||||
@@ -167,6 +170,11 @@ ScreenEz2SelectMusic::ScreenEz2SelectMusic() : Screen("ScreenEz2SelectMusic")
|
||||
m_sprOptionsMessage.SetDiffuse( RageColor(1,1,1,0) );
|
||||
this->AddChild( &m_sprOptionsMessage );
|
||||
|
||||
m_sprBalloon.SetName( "Balloon" );
|
||||
TEXTUREMAN->CacheTexture( THEME->GetPathToG("ScreenSelectMusic balloon long") );
|
||||
TEXTUREMAN->CacheTexture( THEME->GetPathToG("ScreenSelectMusic balloon marathon") );
|
||||
this->AddChild( &m_sprBalloon );
|
||||
|
||||
m_soundOptionsChange.Load( THEME->GetPathToS("ScreenEz2SelectMusic options") );
|
||||
|
||||
m_bGoToOptions = false;
|
||||
@@ -218,9 +226,28 @@ void ScreenEz2SelectMusic::Input( const DeviceInput& DeviceI, const InputEventTy
|
||||
if( type != IET_FIRST_PRESS )
|
||||
{
|
||||
m_soundMusicCycle.Play();
|
||||
i_SkipAheadOffset = 0;
|
||||
if(ScrollStartTime == 0)
|
||||
{
|
||||
i_SkipAheadOffset = 0;
|
||||
ScrollStartTime = RageTimer::GetTimeSinceStart();
|
||||
}
|
||||
else
|
||||
{
|
||||
if(RageTimer::GetTimeSinceStart() - ScrollStartTime > 5) // been cycling for more than 5 seconds
|
||||
{
|
||||
i_SkipAheadOffset = 2; // start skipping ahead in twos
|
||||
}
|
||||
else if (RageTimer::GetTimeSinceStart() - ScrollStartTime > 10) // been cycling for more than 10 seconds
|
||||
{
|
||||
i_SkipAheadOffset = 3; // start skipping ahead 3 at a time
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
i_SkipAheadOffset = 0;
|
||||
ScrollStartTime = 0;
|
||||
m_soundMusicChange.Play();
|
||||
}
|
||||
|
||||
@@ -318,6 +345,8 @@ void ScreenEz2SelectMusic::MenuRight( PlayerNumber pn, const InputEventType type
|
||||
{
|
||||
m_Menu.m_MenuTimer.Stall();
|
||||
m_MusicBannerWheel.BannersRight();
|
||||
for(int i=i_SkipAheadOffset; i>0; i--)
|
||||
m_MusicBannerWheel.BannersRight();
|
||||
MusicChanged();
|
||||
}
|
||||
|
||||
@@ -345,6 +374,8 @@ void ScreenEz2SelectMusic::MenuLeft( PlayerNumber pn, const InputEventType type
|
||||
{
|
||||
m_Menu.m_MenuTimer.Stall();
|
||||
m_MusicBannerWheel.BannersLeft();
|
||||
for(int i=i_SkipAheadOffset; i>0; i--)
|
||||
m_MusicBannerWheel.BannersLeft();
|
||||
MusicChanged();
|
||||
}
|
||||
|
||||
@@ -476,6 +507,24 @@ void ScreenEz2SelectMusic::MusicChanged()
|
||||
Song* pSong = m_MusicBannerWheel.GetSelectedSong();
|
||||
GAMESTATE->m_pCurSong = pSong;
|
||||
|
||||
if( pSong->m_fMusicLengthSeconds > PREFSMAN->m_fMarathonVerSongSeconds )
|
||||
{
|
||||
m_sprBalloon.StopTweening();
|
||||
m_sprBalloon.Load( THEME->GetPathToG("ScreenSelectMusic balloon marathon") );
|
||||
SET_XY_AND_ON_COMMAND( m_sprBalloon );
|
||||
}
|
||||
else if( pSong->m_fMusicLengthSeconds > PREFSMAN->m_fLongVerSongSeconds )
|
||||
{
|
||||
m_sprBalloon.StopTweening();
|
||||
m_sprBalloon.Load( THEME->GetPathToG("ScreenSelectMusic balloon long") );
|
||||
SET_XY_AND_ON_COMMAND( m_sprBalloon );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_sprBalloon.StopTweening();
|
||||
OFF_COMMAND( m_sprBalloon );
|
||||
}
|
||||
|
||||
if(PREVIEWMUSICMODE == 1 && iConfirmSelection == 1)
|
||||
{
|
||||
iConfirmSelection = 0;
|
||||
|
||||
@@ -62,6 +62,7 @@ protected:
|
||||
Sprite m_ShuffleIcon[NUM_PLAYERS];
|
||||
Sprite m_HiddenIcon[NUM_PLAYERS];
|
||||
Sprite m_VanishIcon[NUM_PLAYERS];
|
||||
Sprite m_sprBalloon;
|
||||
BitmapText m_PumpDifficultyRating;
|
||||
|
||||
RageSound m_soundOptionsChange;
|
||||
@@ -78,7 +79,10 @@ protected:
|
||||
bool m_bGoToOptions;
|
||||
bool m_bMadeChoice;
|
||||
bool m_bTransitioning;
|
||||
|
||||
|
||||
int i_SkipAheadOffset;
|
||||
float ScrollStartTime;
|
||||
|
||||
int i_ErrorDetected;
|
||||
|
||||
#ifdef DEBUG
|
||||
@@ -87,6 +91,7 @@ protected:
|
||||
|
||||
int iConfirmSelection;
|
||||
|
||||
|
||||
RageSound m_soundSelect;
|
||||
};
|
||||
|
||||
|
||||
@@ -18,17 +18,33 @@
|
||||
#include "SongManager.h"
|
||||
#include "NoteFieldPositioning.h"
|
||||
|
||||
#define BPMSPEED THEME->GetMetricI("ScreenHowToPlay","ScrollBPM")
|
||||
|
||||
ScreenHowToPlay::ScreenHowToPlay() : ScreenAttract("ScreenHowToPlay")
|
||||
{
|
||||
GAMESTATE->m_CurStyle = STYLE_DANCE_SINGLE;
|
||||
int iNumOfTracks = 0;
|
||||
switch(GAMESTATE->m_CurGame) // which style should we use to demonstrate?
|
||||
{
|
||||
case GAME_DANCE: GAMESTATE->m_CurStyle = STYLE_DANCE_SINGLE; iNumOfTracks = 4; break;
|
||||
case GAME_PUMP: GAMESTATE->m_CurStyle = STYLE_PUMP_SINGLE; iNumOfTracks = 5; break;
|
||||
case GAME_EZ2: GAMESTATE->m_CurStyle = STYLE_EZ2_SINGLE; iNumOfTracks = 5; break;
|
||||
case GAME_PARA: GAMESTATE->m_CurStyle = STYLE_PARA_SINGLE; iNumOfTracks = 5; break;
|
||||
case GAME_DS3DDX: GAMESTATE->m_CurStyle = STYLE_DS3DDX_SINGLE; iNumOfTracks = 8; break;
|
||||
case GAME_BM: GAMESTATE->m_CurStyle = STYLE_BM_SINGLE; iNumOfTracks = 6; break;
|
||||
default: ASSERT(0); break; // we should cover all gametypes....
|
||||
}
|
||||
|
||||
if(iNumOfTracks < 1)
|
||||
{
|
||||
ASSERT(0); // crazy to have less than 1 track....
|
||||
}
|
||||
|
||||
m_LifeMeter.Load( PLAYER_1 );
|
||||
m_LifeMeter.SetXY( 480, 40 );
|
||||
this->AddChild( &m_LifeMeter );
|
||||
|
||||
NoteData* pND = new NoteData;
|
||||
pND->SetNumTracks( 4 );
|
||||
pND->SetNumTracks( iNumOfTracks );
|
||||
pND->SetTapNote( 0, ROWS_PER_BEAT*12, TAP_TAP );
|
||||
pND->SetTapNote( 1, ROWS_PER_BEAT*16, TAP_TAP );
|
||||
pND->SetTapNote( 2, ROWS_PER_BEAT*20, TAP_TAP );
|
||||
@@ -47,7 +63,7 @@ ScreenHowToPlay::ScreenHowToPlay() : ScreenAttract("ScreenHowToPlay")
|
||||
pND->SetTapNote( 2, ROWS_PER_BEAT*46, TAP_TAP );
|
||||
|
||||
m_pSong = new Song;
|
||||
m_pSong->AddBPMSegment( BPMSegment(0,60) );
|
||||
m_pSong->AddBPMSegment( BPMSegment(0,BPMSPEED) );
|
||||
m_pSong->AddStopSegment( StopSegment(12,2) );
|
||||
m_pSong->AddStopSegment( StopSegment(16,2) );
|
||||
m_pSong->AddStopSegment( StopSegment(20,2) );
|
||||
|
||||
@@ -97,6 +97,7 @@ void ScrollingList::StartBouncing()
|
||||
m_iBouncingState = 1;
|
||||
if(m_iSpriteType == SPRITE_TYPE_SPRITE)
|
||||
{
|
||||
m_RippleSprite.UnloadTexture();
|
||||
m_RippleSprite.Load( m_apSprites[m_iSelection]->GetTexturePath() );
|
||||
m_RippleSprite.SetXY( m_apSprites[m_iSelection]->GetX(), m_apSprites[m_iSelection]->GetY() );
|
||||
m_RippleSprite.SetZoom( 1.1f );
|
||||
@@ -104,8 +105,21 @@ void ScrollingList::StartBouncing()
|
||||
}
|
||||
else
|
||||
{
|
||||
m_RippleCSprite.SetCroppedSize( 100, 100 );
|
||||
m_RippleCSprite.UnloadTexture();
|
||||
m_RippleCSprite.Load( m_apCSprites[m_iSelection]->GetTexturePath() );
|
||||
|
||||
if(m_RippleCSprite.GetUnzoomedWidth() == m_RippleCSprite.GetUnzoomedHeight()) // rotated graphics need cropping
|
||||
{
|
||||
m_RippleCSprite.SetCroppedSize( 100, 100 );
|
||||
}
|
||||
else // flat, unrotated graphics need widths changing
|
||||
{
|
||||
m_RippleCSprite.SetCroppedSize( -1, -1 ); // default image size.
|
||||
m_RippleCSprite.SetWidth(EZ2_BANNER_WIDTH);
|
||||
m_RippleCSprite.SetHeight(EZ2_BANNER_HEIGHT);
|
||||
// m_RippleCSprite.SetWH(EZ2_BANNER_WIDTH+10, EZ2_BANNER_HEIGHT+10);
|
||||
}
|
||||
|
||||
m_RippleCSprite.SetXY( m_apCSprites[m_iSelection]->GetX(), m_apCSprites[m_iSelection]->GetY() );
|
||||
m_RippleCSprite.SetZoom( 2.0f );
|
||||
m_RippleCSprite.SetDiffuse( RageColor(1,1,1,0.5f));
|
||||
@@ -142,22 +156,11 @@ void ScrollingList::Load( const CStringArray& asGraphicPaths )
|
||||
for( unsigned i=0; i<asGraphicPaths.size(); i++ )
|
||||
{
|
||||
CroppedSprite* pNewCSprite = new CroppedSprite;
|
||||
if(m_iBannerPrefs == BANNERPREFS_DDRFLAT)
|
||||
{
|
||||
pNewCSprite->SetCroppedSize( BANNER_WIDTH, BANNER_HEIGHT );
|
||||
}
|
||||
else if(m_iBannerPrefs == BANNERPREFS_DDRROT)
|
||||
{
|
||||
pNewCSprite->SetCroppedSize( BANNER_WIDTH, BANNER_HEIGHT );
|
||||
pNewCSprite->SetRotationZ( DDRROT_ROTATION );
|
||||
}
|
||||
else if(m_iBannerPrefs == BANNERPREFS_EZ2)
|
||||
{
|
||||
pNewCSprite->SetCroppedSize( EZ2_BANNER_WIDTH*2, EZ2_BANNER_HEIGHT*2 );
|
||||
}
|
||||
|
||||
pNewCSprite->Load( asGraphicPaths[i] );
|
||||
|
||||
m_apCSprites.push_back( pNewCSprite );
|
||||
for(int i=m_apCSprites.size()-1; i>=0; i--)
|
||||
Replace(asGraphicPaths[i],i);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -394,9 +397,17 @@ void ScrollingList::Replace(CString sGraphicPath, int ElementNumber)
|
||||
else
|
||||
{
|
||||
CroppedSprite* pNewCSprite = new CroppedSprite;
|
||||
pNewCSprite->Load( sGraphicPath );
|
||||
if(m_iBannerPrefs == BANNERPREFS_DDRFLAT)
|
||||
{
|
||||
pNewCSprite->SetCroppedSize( BANNER_WIDTH, BANNER_HEIGHT );
|
||||
if(pNewCSprite->GetUnzoomedWidth() == pNewCSprite->GetUnzoomedHeight()) // rotated graphics need cropping
|
||||
{
|
||||
pNewCSprite->SetCroppedSize( BANNER_WIDTH, BANNER_HEIGHT );
|
||||
}
|
||||
else // flat, unrotated graphics need widths changing
|
||||
{
|
||||
pNewCSprite->SetWH(BANNER_WIDTH, BANNER_HEIGHT );
|
||||
}
|
||||
}
|
||||
else if(m_iBannerPrefs == BANNERPREFS_DDRROT)
|
||||
{
|
||||
@@ -405,13 +416,17 @@ void ScrollingList::Replace(CString sGraphicPath, int ElementNumber)
|
||||
}
|
||||
else if(m_iBannerPrefs == BANNERPREFS_EZ2)
|
||||
{
|
||||
pNewCSprite->SetCroppedSize( EZ2_BANNER_WIDTH*2, EZ2_BANNER_HEIGHT*2 );
|
||||
if(pNewCSprite->GetUnzoomedWidth() == pNewCSprite->GetUnzoomedHeight()) // rotated graphics need cropping
|
||||
{
|
||||
pNewCSprite->SetCroppedSize( EZ2_BANNER_WIDTH*2, EZ2_BANNER_HEIGHT*2 );
|
||||
}
|
||||
else // flat, unrotated graphics need widths changing
|
||||
{
|
||||
pNewCSprite->SetWH(EZ2_BANNER_WIDTH*2, EZ2_BANNER_HEIGHT*2);
|
||||
}
|
||||
}
|
||||
|
||||
pNewCSprite->Load( sGraphicPath );
|
||||
|
||||
|
||||
m_apCSprites[ElementNumber] = pNewCSprite;
|
||||
m_apCSprites[ElementNumber] = pNewCSprite;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -425,10 +440,12 @@ void ScrollingList::DrawPrimitives()
|
||||
if(m_iSpriteType == SPRITE_TYPE_SPRITE)
|
||||
{
|
||||
ASSERT( !m_apSprites.empty() );
|
||||
m_RippleSprite.SetXY( m_apSprites[m_iSelection]->GetX(), m_apSprites[m_iSelection]->GetY() ); // keep the ripple sprites with the current selection
|
||||
}
|
||||
else
|
||||
{
|
||||
ASSERT( !m_apCSprites.empty() );
|
||||
m_RippleCSprite.SetXY( m_apCSprites[m_iSelection]->GetX(), m_apCSprites[m_iSelection]->GetY() ); // keep the ripple sprites with the current selection
|
||||
}
|
||||
|
||||
for( int i=(m_iNumVisible)/2; i>= 0; i-- ) // draw outside to inside
|
||||
|
||||
Reference in New Issue
Block a user