Move the expanded section name into GameState
This commit is contained in:
@@ -164,6 +164,8 @@ GameState::GameState() :
|
|||||||
|
|
||||||
m_bDopefish = false;
|
m_bDopefish = false;
|
||||||
|
|
||||||
|
sExpandedSectionName = "";
|
||||||
|
|
||||||
// Don't reset yet; let the first screen do it, so we can use PREFSMAN and THEME.
|
// Don't reset yet; let the first screen do it, so we can use PREFSMAN and THEME.
|
||||||
//Reset();
|
//Reset();
|
||||||
|
|
||||||
@@ -347,6 +349,8 @@ void GameState::Reset()
|
|||||||
|
|
||||||
m_bBackedOutOfFinalStage = false;
|
m_bBackedOutOfFinalStage = false;
|
||||||
m_bEarnedExtraStage = false;
|
m_bEarnedExtraStage = false;
|
||||||
|
sExpandedSectionName = "";
|
||||||
|
|
||||||
ApplyCmdline();
|
ApplyCmdline();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+6
-4
@@ -200,6 +200,8 @@ public:
|
|||||||
* This resets whenever a player joins or continues. */
|
* This resets whenever a player joins or continues. */
|
||||||
int m_iPlayerStageTokens[NUM_PLAYERS];
|
int m_iPlayerStageTokens[NUM_PLAYERS];
|
||||||
|
|
||||||
|
RString sExpandedSectionName;
|
||||||
|
|
||||||
static int GetNumStagesMultiplierForSong( const Song* pSong );
|
static int GetNumStagesMultiplierForSong( const Song* pSong );
|
||||||
static int GetNumStagesForSongAndStyleType( const Song* pSong, StyleType st );
|
static int GetNumStagesForSongAndStyleType( const Song* pSong, StyleType st );
|
||||||
int GetNumStagesForCurrentSongAndStepsOrCourse() const;
|
int GetNumStagesForCurrentSongAndStepsOrCourse() const;
|
||||||
@@ -236,7 +238,7 @@ public:
|
|||||||
Course* m_pPreferredCourse;
|
Course* m_pPreferredCourse;
|
||||||
BroadcastOnChangePtr1D<Trail,NUM_PLAYERS> m_pCurTrail;
|
BroadcastOnChangePtr1D<Trail,NUM_PLAYERS> m_pCurTrail;
|
||||||
|
|
||||||
bool m_bBackedOutOfFinalStage;
|
bool m_bBackedOutOfFinalStage;
|
||||||
|
|
||||||
// Music statistics:
|
// Music statistics:
|
||||||
SongPosition m_Position;
|
SongPosition m_Position;
|
||||||
@@ -256,9 +258,9 @@ public:
|
|||||||
bool OneIsHot() const;
|
bool OneIsHot() const;
|
||||||
|
|
||||||
// Haste
|
// Haste
|
||||||
float m_fHasteRate; // [-1,+1]; 0 = normal speed
|
float m_fHasteRate; // [-1,+1]; 0 = normal speed
|
||||||
float m_fLastHasteUpdateMusicSeconds;
|
float m_fLastHasteUpdateMusicSeconds;
|
||||||
float m_fAccumulatedHasteSeconds;
|
float m_fAccumulatedHasteSeconds;
|
||||||
|
|
||||||
// Random Attacks & Attack Mines
|
// Random Attacks & Attack Mines
|
||||||
vector<RString> m_RandomAttacks;
|
vector<RString> m_RandomAttacks;
|
||||||
|
|||||||
@@ -1327,6 +1327,7 @@ void MusicWheel::SetOpenSection( RString group )
|
|||||||
{
|
{
|
||||||
//LOG->Trace( "SetOpenSection %s", group.c_str() );
|
//LOG->Trace( "SetOpenSection %s", group.c_str() );
|
||||||
m_sExpandedSectionName = group;
|
m_sExpandedSectionName = group;
|
||||||
|
GAMESTATE->sExpandedSectionName = group;
|
||||||
|
|
||||||
// wheel positions = num song groups
|
// wheel positions = num song groups
|
||||||
if ( REMIND_WHEEL_POSITIONS && HIDE_INACTIVE_SECTIONS )
|
if ( REMIND_WHEEL_POSITIONS && HIDE_INACTIVE_SECTIONS )
|
||||||
|
|||||||
@@ -222,13 +222,8 @@ void MusicWheelItem::LoadFromWheelItemData( const WheelItemBaseData *pData, int
|
|||||||
case TYPE_SECTION:
|
case TYPE_SECTION:
|
||||||
{
|
{
|
||||||
sDisplayName = SONGMAN->ShortenGroupName(pWID->m_sText);
|
sDisplayName = SONGMAN->ShortenGroupName(pWID->m_sText);
|
||||||
RString sExpandedSectionName;
|
|
||||||
|
|
||||||
// TODO: Move the expanded section name into GameState?
|
if( GAMESTATE->sExpandedSectionName == pWID->m_sText )
|
||||||
ScreenSelectMusic *pScreen = dynamic_cast<ScreenSelectMusic*>(SCREENMAN->GetTopScreen() );
|
|
||||||
if( pScreen )
|
|
||||||
sExpandedSectionName = pScreen->GetMusicWheel()->GetExpandedSectionName();
|
|
||||||
if( sExpandedSectionName == pWID->m_sText )
|
|
||||||
type = MusicWheelItemType_SectionExpanded;
|
type = MusicWheelItemType_SectionExpanded;
|
||||||
else
|
else
|
||||||
type = MusicWheelItemType_SectionCollapsed;
|
type = MusicWheelItemType_SectionCollapsed;
|
||||||
|
|||||||
Reference in New Issue
Block a user