many bug fixes.
This commit is contained in:
@@ -251,18 +251,23 @@ MusicWheel::MusicWheel()
|
|||||||
m_fPositionOffsetFromSelection = 0;
|
m_fPositionOffsetFromSelection = 0;
|
||||||
|
|
||||||
|
|
||||||
// find the previously selected song (if any), and select it
|
// build all of the wheel item datas
|
||||||
|
for( int so=0; so<NUM_SORT_ORDERS; so++ )
|
||||||
|
BuildWheelItemDatas( m_WheelItemDatas[so], SongSortOrder(so) );
|
||||||
|
|
||||||
|
|
||||||
|
// find the previously selected song (if any)
|
||||||
for( i=0; i<GetCurWheelItemDatas().GetSize(); i++ )
|
for( i=0; i<GetCurWheelItemDatas().GetSize(); i++ )
|
||||||
{
|
{
|
||||||
if( GetCurWheelItemDatas()[i].m_pSong != NULL
|
if( GetCurWheelItemDatas()[i].m_pSong != NULL
|
||||||
&& GetCurWheelItemDatas()[i].m_pSong == GAMEINFO->m_pCurSong )
|
&& GetCurWheelItemDatas()[i].m_pSong == GAMEINFO->m_pCurSong )
|
||||||
m_iSelection = i;
|
{
|
||||||
|
m_iSelection = i; // select it
|
||||||
|
m_sExpandedSectionName = GetCurWheelItemDatas()[m_iSelection].m_sSectionName; // make its group the currently expanded group
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// rebuild the WheelItems that appear on screen
|
||||||
for( int so=0; so<NUM_SORT_ORDERS; so++ )
|
|
||||||
BuildWheelItemDatas( m_WheelItemDatas[so], SongSortOrder(so) );
|
|
||||||
|
|
||||||
RebuildWheelItemDisplays();
|
RebuildWheelItemDisplays();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -279,7 +284,19 @@ void MusicWheel::BuildWheelItemDatas( CArray<WheelItemData, WheelItemData&> &arr
|
|||||||
// Make an array of Song*, then sort them
|
// Make an array of Song*, then sort them
|
||||||
///////////////////////////////////
|
///////////////////////////////////
|
||||||
CArray<Song*, Song*&> arraySongs;
|
CArray<Song*, Song*&> arraySongs;
|
||||||
arraySongs.Copy( GAMEINFO->m_pSongs );
|
|
||||||
|
// copy only song that have at least one Steps for the current GameMode
|
||||||
|
for( int i=0; i<GAMEINFO->m_pSongs.GetSize(); i++ )
|
||||||
|
{
|
||||||
|
Song* pSong = GAMEINFO->m_pSongs[i];
|
||||||
|
|
||||||
|
CArray<Steps*, Steps*> arraySteps;
|
||||||
|
pSong->GetStepsThatMatchGameMode( GAMEINFO->m_GameMode, arraySteps );
|
||||||
|
|
||||||
|
if( arraySteps.GetSize() > 0 )
|
||||||
|
arraySongs.Add( pSong );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// sort the songs
|
// sort the songs
|
||||||
switch( so )
|
switch( so )
|
||||||
@@ -765,4 +782,7 @@ void MusicWheel::TweenOffScreen()
|
|||||||
m_sprSelectionBackground.SetTweenZoomY( 0 );
|
m_sprSelectionBackground.SetTweenZoomY( 0 );
|
||||||
m_sprSelectionOverlay.BeginTweening( FADE_TIME );
|
m_sprSelectionOverlay.BeginTweening( FADE_TIME );
|
||||||
m_sprSelectionOverlay.SetTweenZoomY( 0 );
|
m_sprSelectionOverlay.SetTweenZoomY( 0 );
|
||||||
|
|
||||||
|
m_MusicSortDisplay.BeginTweening( FADE_TIME, TWEEN_BIAS_END );
|
||||||
|
m_MusicSortDisplay.SetTweenXY( SORT_ICON_OFF_SCREEN_X, SORT_ICON_OFF_SCREEN_Y );
|
||||||
}
|
}
|
||||||
@@ -254,7 +254,7 @@ void Player::SetX( float fX )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Player::SetSteps( const Steps& newSteps, bool bLoadOnlyLeftSide, bool bLoadOnlyRightSide )
|
void Player::SetSteps( Steps* pNewSteps, bool bLoadOnlyLeftSide, bool bLoadOnlyRightSide )
|
||||||
{
|
{
|
||||||
Step tempSteps[MAX_STEP_ELEMENTS];
|
Step tempSteps[MAX_STEP_ELEMENTS];
|
||||||
CArray<HoldStep, HoldStep> tempHoldSteps;
|
CArray<HoldStep, HoldStep> tempHoldSteps;
|
||||||
@@ -262,7 +262,7 @@ void Player::SetSteps( const Steps& newSteps, bool bLoadOnlyLeftSide, bool bLoad
|
|||||||
// copy the steps into our tempSteps where we will transform them
|
// copy the steps into our tempSteps where we will transform them
|
||||||
for( int i=0; i<MAX_STEP_ELEMENTS; i++ )
|
for( int i=0; i<MAX_STEP_ELEMENTS; i++ )
|
||||||
{
|
{
|
||||||
tempSteps[i] = newSteps.m_Steps[i];
|
tempSteps[i] = pNewSteps->m_Steps[i];
|
||||||
|
|
||||||
if( bLoadOnlyLeftSide )
|
if( bLoadOnlyLeftSide )
|
||||||
{
|
{
|
||||||
@@ -285,9 +285,9 @@ void Player::SetSteps( const Steps& newSteps, bool bLoadOnlyLeftSide, bool bLoad
|
|||||||
if( m_PlayerOptions.m_bAllowFreezeArrows )
|
if( m_PlayerOptions.m_bAllowFreezeArrows )
|
||||||
{
|
{
|
||||||
// copy the HoldSteps and transform them later
|
// copy the HoldSteps and transform them later
|
||||||
for( int i=0; i<newSteps.m_HoldSteps.GetSize(); i++ )
|
for( int i=0; i<pNewSteps->m_HoldSteps.GetSize(); i++ )
|
||||||
{
|
{
|
||||||
HoldStep &hs = newSteps.m_HoldSteps[i];
|
HoldStep &hs = pNewSteps->m_HoldSteps[i];
|
||||||
|
|
||||||
if( bLoadOnlyLeftSide )
|
if( bLoadOnlyLeftSide )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public:
|
|||||||
virtual void Update( float fDeltaTime, float fSongBeat, float fMaxBeatDifference );
|
virtual void Update( float fDeltaTime, float fSongBeat, float fMaxBeatDifference );
|
||||||
virtual void RenderPrimitives();
|
virtual void RenderPrimitives();
|
||||||
|
|
||||||
void SetSteps( const Steps& newSteps, bool bLoadOnlyLeftSide = false, bool bLoadOnlyRightSide = false );
|
void SetSteps( Steps* pNewSteps, bool bLoadOnlyLeftSide = false, bool bLoadOnlyRightSide = false );
|
||||||
void SetX( float fX );
|
void SetX( float fX );
|
||||||
void CrossedIndex( int iIndex );
|
void CrossedIndex( int iIndex );
|
||||||
|
|
||||||
|
|||||||
@@ -448,6 +448,7 @@ bool Song::LoadSongInfoFromDWIFile( CString sPath )
|
|||||||
split( sValueString, ":", arrayValueTokens );
|
split( sValueString, ":", arrayValueTokens );
|
||||||
|
|
||||||
CString sValueName = arrayValueTokens.GetAt( 0 );
|
CString sValueName = arrayValueTokens.GetAt( 0 );
|
||||||
|
sValueName.TrimLeft();
|
||||||
|
|
||||||
// handle the data
|
// handle the data
|
||||||
if( sValueName == "#FILE" )
|
if( sValueName == "#FILE" )
|
||||||
|
|||||||
@@ -508,6 +508,14 @@ SOURCE=.\TransitionFadeWipeWithLogo.h
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\TransitionInvisible.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\TransitionInvisible.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\TransitionRectWipe.cpp
|
SOURCE=.\TransitionRectWipe.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|||||||
@@ -71,11 +71,13 @@ protected:
|
|||||||
case opening_right:
|
case opening_right:
|
||||||
case opening_left:
|
case opening_left:
|
||||||
return 1.0f - m_fPercentThroughTransition;
|
return 1.0f - m_fPercentThroughTransition;
|
||||||
break;
|
|
||||||
case closing_right:
|
case closing_right:
|
||||||
case closing_left:
|
case closing_left:
|
||||||
return m_fPercentThroughTransition;
|
return m_fPercentThroughTransition;
|
||||||
break;
|
case opened:
|
||||||
|
return 0;
|
||||||
|
case closed:
|
||||||
|
return 1;
|
||||||
default:
|
default:
|
||||||
ASSERT( true );
|
ASSERT( true );
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user