diff --git a/stepmania/src/ArrowEffects.cpp b/stepmania/src/ArrowEffects.cpp index 8ae8f6a529..59da396246 100644 --- a/stepmania/src/ArrowEffects.cpp +++ b/stepmania/src/ArrowEffects.cpp @@ -572,7 +572,7 @@ float ArrowEffects::GetZoom( const PlayerState* pPlayerState ) { float fZoom = 1.0f; // FIXME: Move the zoom values into Style - if( GAMESTATE->m_pCurStyle->m_bNeedsZoomOutWith2Players && + if( GAMESTATE->GetCurrentStyle()->m_bNeedsZoomOutWith2Players && (GAMESTATE->GetNumSidesJoined()==2 || GAMESTATE->AnyPlayersAreCpu()) ) fZoom *= 0.6f; diff --git a/stepmania/src/BeginnerHelper.cpp b/stepmania/src/BeginnerHelper.cpp index dd454d5e03..338e740e35 100644 --- a/stepmania/src/BeginnerHelper.cpp +++ b/stepmania/src/BeginnerHelper.cpp @@ -117,7 +117,7 @@ bool BeginnerHelper::CanUse() if( !DoesFileExist(GetAnimPath((Animation)i)) ) return false; - return GAMESTATE->m_pCurStyle->m_bCanUseBeginnerHelper; + return GAMESTATE->GetCurrentStyle()->m_bCanUseBeginnerHelper; } bool BeginnerHelper::Initialize( int iDancePadType ) diff --git a/stepmania/src/GameCommand.cpp b/stepmania/src/GameCommand.cpp index 5d035136ab..5100c66ec4 100644 --- a/stepmania/src/GameCommand.cpp +++ b/stepmania/src/GameCommand.cpp @@ -79,7 +79,7 @@ bool GameCommand::DescribesCurrentMode( PlayerNumber pn ) const { if( m_pm != PlayMode_Invalid && GAMESTATE->m_PlayMode != m_pm ) return false; - if( m_pStyle && GAMESTATE->m_pCurStyle.Get() != m_pStyle ) + if( m_pStyle && GAMESTATE->GetCurrentStyle() != m_pStyle ) return false; // HACK: don't compare m_dc if m_pSteps is set. This causes problems // in ScreenSelectOptionsMaster::ImportOptions if m_PreferredDifficulty @@ -255,7 +255,7 @@ void GameCommand::LoadOne( const Command& cmd ) if( !m_bInvalid ) { Song *pSong = (m_pSong != NULL)? m_pSong:GAMESTATE->m_pCurSong; - const Style *pStyle = m_pStyle ? m_pStyle : GAMESTATE->m_pCurStyle; + const Style *pStyle = m_pStyle ? m_pStyle : GAMESTATE->GetCurrentStyle(); if( pSong == NULL || pStyle == NULL ) RageException::Throw( "Must set Song and Style to set Steps." ); @@ -290,7 +290,7 @@ void GameCommand::LoadOne( const Command& cmd ) if( !m_bInvalid ) { Course *pCourse = (m_pCourse != NULL)? m_pCourse:GAMESTATE->m_pCurCourse; - const Style *pStyle = m_pStyle ? m_pStyle : GAMESTATE->m_pCurStyle; + const Style *pStyle = m_pStyle ? m_pStyle : GAMESTATE->GetCurrentStyle(); if( pCourse == NULL || pStyle == NULL ) RageException::Throw( "Must set Course and Style to set Steps." ); @@ -511,7 +511,7 @@ bool GameCommand::IsPlayable( RString *why ) const if( m_pm != PlayMode_Invalid || m_pStyle != NULL ) { const PlayMode pm = (m_pm != PlayMode_Invalid) ? m_pm : GAMESTATE->m_PlayMode; - const Style *style = (m_pStyle != NULL)? m_pStyle: GAMESTATE->m_pCurStyle; + const Style *style = (m_pStyle != NULL)? m_pStyle: GAMESTATE->GetCurrentStyle(); if( !AreStyleAndPlayModeCompatible( style, pm ) ) { if( why ) diff --git a/stepmania/src/ModeSwitcher.cpp b/stepmania/src/ModeSwitcher.cpp index a4fb463754..ef6e0ab788 100644 --- a/stepmania/src/ModeSwitcher.cpp +++ b/stepmania/src/ModeSwitcher.cpp @@ -63,7 +63,7 @@ RString ModeSwitcher::GetStyleName() RString sStyleName; RString sDiff[NUM_PLAYERS]; - sStyleName = GAMESTATE->m_pCurStyle->m_szName; + sStyleName = GAMESTATE->GetCurrentStyle()->m_szName; sStyleName.MakeUpper(); FOREACH_PlayerNumber(i) @@ -131,7 +131,7 @@ RString ModeSwitcher::GetNextStyleName() { if(GAMESTATE->m_PreferredDifficulty[i] != DIFFICULTY_CHALLENGE) { - sStyleName[i] = GAMESTATE->m_pCurStyle->m_szName; + sStyleName[i] = GAMESTATE->GetCurrentStyle()->m_szName; sStyleName[i].MakeUpper(); switch(GAMESTATE->m_PreferredDifficulty[i]) @@ -176,7 +176,7 @@ RString ModeSwitcher::GetNextStyleName() } else { - sStyleName[i] = GAMESTATE->m_pCurStyle->m_szName; + sStyleName[i] = GAMESTATE->GetCurrentStyle()->m_szName; sStyleName[i].MakeUpper(); sDiff[i] = "Beginner\n"; @@ -204,7 +204,7 @@ RString ModeSwitcher::GetPrevStyleName() { if(GAMESTATE->m_PreferredDifficulty[i] != DIFFICULTY_BEGINNER) { - sStyleName[i] = GAMESTATE->m_pCurStyle->m_szName; + sStyleName[i] = GAMESTATE->GetCurrentStyle()->m_szName; sStyleName[i].MakeUpper(); switch(GAMESTATE->m_PreferredDifficulty[i]) @@ -249,7 +249,7 @@ RString ModeSwitcher::GetPrevStyleName() } else { - sStyleName[i] = GAMESTATE->m_pCurStyle->m_szName; + sStyleName[i] = GAMESTATE->GetCurrentStyle()->m_szName; sStyleName[i].MakeUpper(); sDiff[i] = "Challenge\n"; @@ -301,7 +301,7 @@ void ModeSwitcher::ChangeMode(PlayerNumber pn, int dir) ASSERT( !vPossibleStyles.empty() ); int index = 0; - vector::const_iterator iter = find(vPossibleStyles.begin(), vPossibleStyles.end(), GAMESTATE->m_pCurStyle ); + vector::const_iterator iter = find(vPossibleStyles.begin(), vPossibleStyles.end(), GAMESTATE->GetCurrentStyle() ); if( iter != vPossibleStyles.end() ) { index = iter - vPossibleStyles.begin(); diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index a91051b578..ffa91a185d 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -874,7 +874,7 @@ void ScreenEdit::Update( float fDeltaTime ) { for( int t=0; tGetCurrentStyle()->m_iColsPerPlayer; t++ ) // for each track { - GameInput GameI = GAMESTATE->m_pCurStyle->StyleInputToGameInput( t, PLAYER_1 ); + GameInput GameI = GAMESTATE->GetCurrentStyle()->StyleInputToGameInput( t, PLAYER_1 ); float fSecsHeld = INPUTMAPPER->GetSecsHeld( GameI ); fSecsHeld = min( fSecsHeld, m_RemoveNoteButtonLastChanged.Ago() ); if( fSecsHeld == 0 ) @@ -922,7 +922,7 @@ void ScreenEdit::Update( float fDeltaTime ) bool bButtonIsBeingPressed = false; for( int t=0; tGetCurrentStyle()->m_iColsPerPlayer; t++ ) // for each track { - GameInput GameI = GAMESTATE->m_pCurStyle->StyleInputToGameInput( t, PLAYER_1 ); + GameInput GameI = GAMESTATE->GetCurrentStyle()->StyleInputToGameInput( t, PLAYER_1 ); if( INPUTMAPPER->IsBeingPressed(GameI) ) bButtonIsBeingPressed = true; } @@ -1910,7 +1910,7 @@ void ScreenEdit::InputRecord( const InputEventPlus &input, EditButton EditB ) if( input.pn != PLAYER_1 ) return; // ignore - const int iCol = GAMESTATE->m_pCurStyle->GameInputToColumn( input.GameI ); + const int iCol = GAMESTATE->GetCurrentStyle()->GameInputToColumn( input.GameI ); switch( input.type ) { @@ -2064,7 +2064,7 @@ void ScreenEdit::InputPlay( const InputEventPlus &input, EditButton EditB ) return; } - const int iCol = GAMESTATE->m_pCurStyle->GameInputToColumn( input.GameI ); + const int iCol = GAMESTATE->GetCurrentStyle()->GameInputToColumn( input.GameI ); if( PREFSMAN->m_AutoPlay != PC_HUMAN || iCol == -1 ) return; diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index c1d94edefd..f50652370d 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -399,7 +399,7 @@ void ScreenGameplay::Init( bool bUseSongBackgroundAndForeground ) PROFILEMAN->IncrementCoursePlayCount( GAMESTATE->m_pCurCourse, GAMESTATE->m_pCurTrail[p], p ); STATSMAN->m_CurStageStats.playMode = GAMESTATE->m_PlayMode; - STATSMAN->m_CurStageStats.pStyle = GAMESTATE->m_pCurStyle; + STATSMAN->m_CurStageStats.pStyle = GAMESTATE->GetCurrentStyle(); /* Record combo rollover. */ FOREACH_EnabledPlayerInfoNotDummy( m_vPlayerInfo, pi ) @@ -2110,7 +2110,7 @@ void ScreenGameplay::Input( const InputEventPlus &input ) * However, if this is also a style button, don't do this. (pump center = start) */ bool bHoldingGiveUp = false; - if( GAMESTATE->m_pCurStyle->GameInputToColumn(input.GameI) == Column_INVALID ) + if( GAMESTATE->GetCurrentStyle()->GameInputToColumn(input.GameI) == Column_INVALID ) { bHoldingGiveUp |= ( START_GIVES_UP && input.MenuI == MENU_BUTTON_START ); bHoldingGiveUp |= ( BACK_GIVES_UP && input.MenuI == MENU_BUTTON_BACK ); @@ -2169,7 +2169,7 @@ void ScreenGameplay::Input( const InputEventPlus &input ) } bool bRelease = input.type == IET_RELEASE; - const int iCol = GAMESTATE->m_pCurStyle->GameInputToColumn( input.GameI ); + const int iCol = GAMESTATE->GetCurrentStyle()->GameInputToColumn( input.GameI ); if( GAMESTATE->m_bMultiplayer ) { diff --git a/stepmania/src/ScreenGameplayLesson.cpp b/stepmania/src/ScreenGameplayLesson.cpp index 5564389e26..cc3a69371e 100644 --- a/stepmania/src/ScreenGameplayLesson.cpp +++ b/stepmania/src/ScreenGameplayLesson.cpp @@ -15,7 +15,7 @@ ScreenGameplayLesson::ScreenGameplayLesson() void ScreenGameplayLesson::Init() { - ASSERT( GAMESTATE->m_pCurStyle ); + ASSERT( GAMESTATE->GetCurrentStyle() ); ASSERT( GAMESTATE->m_pCurSong ); /* Now that we've set up, init the base class. */ diff --git a/stepmania/src/ScreenJukebox.cpp b/stepmania/src/ScreenJukebox.cpp index 8cac7fa946..081109b673 100644 --- a/stepmania/src/ScreenJukebox.cpp +++ b/stepmania/src/ScreenJukebox.cpp @@ -182,7 +182,7 @@ ScreenJukebox::ScreenJukebox() void ScreenJukebox::Init() { // ScreeJukeboxMenu must set this - ASSERT( GAMESTATE->m_pCurStyle ); + ASSERT( GAMESTATE->GetCurrentStyle() ); GAMESTATE->m_PlayMode.Set( PLAY_MODE_REGULAR ); SetSong(); diff --git a/stepmania/src/ScreenNameEntry.cpp b/stepmania/src/ScreenNameEntry.cpp index 771a87cdbe..3a269ada08 100644 --- a/stepmania/src/ScreenNameEntry.cpp +++ b/stepmania/src/ScreenNameEntry.cpp @@ -345,7 +345,7 @@ void ScreenNameEntry::Input( const InputEventPlus &input ) if( input.type != IET_FIRST_PRESS ) return; // ignore - const int iCol = GAMESTATE->m_pCurStyle->GameInputToColumn( input.GameI ); + const int iCol = GAMESTATE->GetCurrentStyle()->GameInputToColumn( input.GameI ); if( iCol != Column_INVALID && m_bStillEnteringName[input.pn] ) { int iStringIndex = m_ColToStringIndex[input.pn][iCol]; diff --git a/stepmania/src/ScreenNameEntryTraditional.cpp b/stepmania/src/ScreenNameEntryTraditional.cpp index 91e1102745..0caafd0bec 100644 --- a/stepmania/src/ScreenNameEntryTraditional.cpp +++ b/stepmania/src/ScreenNameEntryTraditional.cpp @@ -146,7 +146,7 @@ ScreenNameEntryTraditional::ScreenNameEntryTraditional() { ss.vpPlayedSongs.push_back( SONGMAN->GetRandomSong() ); ss.vpPossibleSongs = ss.vpPlayedSongs; - ss.pStyle = GAMESTATE->m_pCurStyle; + ss.pStyle = GAMESTATE->GetCurrentStyle(); ss.playMode = GAMESTATE->m_PlayMode; ASSERT( ss.vpPlayedSongs[0]->GetAllSteps().size() ); StepsType st = GAMESTATE->GetCurrentStyle()->m_StepsType; diff --git a/stepmania/src/ScreenSelectMusic.cpp b/stepmania/src/ScreenSelectMusic.cpp index bdecb13d2a..a57eaca16e 100644 --- a/stepmania/src/ScreenSelectMusic.cpp +++ b/stepmania/src/ScreenSelectMusic.cpp @@ -99,7 +99,7 @@ void ScreenSelectMusic::Init() m_TexturePreload.Load( Banner::SongBannerTexture(THEME->GetPathG("Banner","mode")) ); } - if( GAMESTATE->m_pCurStyle == NULL ) + if( GAMESTATE->GetCurrentStyle() == NULL ) RageException::Throw( "The Style has not been set. A theme must set the Style before loading ScreenSelectMusic." ); if( GAMESTATE->m_PlayMode == PlayMode_Invalid ) diff --git a/stepmania/src/ScreenWithMenuElements.cpp b/stepmania/src/ScreenWithMenuElements.cpp index 62d604c859..4b2bc1b5e4 100644 --- a/stepmania/src/ScreenWithMenuElements.cpp +++ b/stepmania/src/ScreenWithMenuElements.cpp @@ -47,7 +47,7 @@ void ScreenWithMenuElements::Init() SET_XY( m_autoHeader ); this->AddChild( m_autoHeader ); - if( STYLE_ICON && GAMESTATE->m_pCurStyle ) + if( STYLE_ICON && GAMESTATE->GetCurrentStyle() ) { m_sprStyleIcon.SetName( "StyleIcon" ); m_sprStyleIcon.Load( THEME->GetPathG("MenuElements",RString("icon ")+GAMESTATE->GetCurrentStyle()->m_szName) ); @@ -57,7 +57,7 @@ void ScreenWithMenuElements::Init() this->AddChild( &m_sprStyleIcon ); } - if( SHOW_STAGE && GAMESTATE->m_pCurStyle ) + if( SHOW_STAGE && GAMESTATE->GetCurrentStyle() ) { m_sprStage.Load( THEME->GetPathG(m_sName,"stage") ); m_sprStage->SetName( "Stage" );