From 95c768b6e505d5ccd8fd4dd67bba4a567934b768 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 30 Sep 2006 22:25:16 +0000 Subject: [PATCH] SetCurrentStyle() --- stepmania/src/Player.cpp | 8 ++++---- stepmania/src/ScreenNameEntryTraditional.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/stepmania/src/Player.cpp b/stepmania/src/Player.cpp index 258d8d3634..e452377afc 100644 --- a/stepmania/src/Player.cpp +++ b/stepmania/src/Player.cpp @@ -540,7 +540,7 @@ void Player::Update( float fDeltaTime ) ASSERT( m_pPlayerState ); // TODO: Remove use of PlayerNumber. - GameInput GameI = GAMESTATE->m_pCurStyle->StyleInputToGameInput( col, m_pPlayerState->m_PlayerNumber ); + GameInput GameI = GAMESTATE->GetCurrentStyle()->StyleInputToGameInput( col, m_pPlayerState->m_PlayerNumber ); bool bIsHoldingButton = INPUTMAPPER->IsBeingPressed( GameI ); // TODO: Make this work for non-human-controlled players @@ -619,7 +619,7 @@ void Player::Update( float fDeltaTime ) } else { - GameInput GameI = GAMESTATE->m_pCurStyle->StyleInputToGameInput( iTrack, pn ); + GameInput GameI = GAMESTATE->GetCurrentStyle()->StyleInputToGameInput( iTrack, pn ); bIsHoldingButton = INPUTMAPPER->IsBeingPressed( GameI, m_pPlayerState->m_mp ); } @@ -1006,7 +1006,7 @@ void Player::Step( int col, int row, const RageTimer &tm, bool bHeld, bool bRele int iNumTracksHeld = 0; for( int t=0; tm_pCurStyle->StyleInputToGameInput( t, pn ); + GameInput GameI = GAMESTATE->GetCurrentStyle()->StyleInputToGameInput( t, pn ); const float fSecsHeld = INPUTMAPPER->GetSecsHeld( GameI ); if( fSecsHeld > 0 && fSecsHeld < JUMP_WINDOW_SECONDS ) iNumTracksHeld++; @@ -1486,7 +1486,7 @@ void Player::CrossedMineRow( int iNoteRow, const RageTimer &now ) // TODO: Remove use of PlayerNumber. PlayerNumber pn = m_pPlayerState->m_PlayerNumber; - GameInput GameI = GAMESTATE->m_pCurStyle->StyleInputToGameInput( t, pn ); + GameInput GameI = GAMESTATE->GetCurrentStyle()->StyleInputToGameInput( t, pn ); if( PREFSMAN->m_fPadStickSeconds > 0 ) { float fSecsHeld = INPUTMAPPER->GetSecsHeld( GameI, m_pPlayerState->m_mp ); diff --git a/stepmania/src/ScreenNameEntryTraditional.cpp b/stepmania/src/ScreenNameEntryTraditional.cpp index 0caafd0bec..137a509254 100644 --- a/stepmania/src/ScreenNameEntryTraditional.cpp +++ b/stepmania/src/ScreenNameEntryTraditional.cpp @@ -140,7 +140,7 @@ ScreenNameEntryTraditional::ScreenNameEntryTraditional() GAMESTATE->m_bSideIsJoined[PLAYER_2] = true; GAMESTATE->m_MasterPlayerNumber = PLAYER_1; GAMESTATE->m_PlayMode.Set( PLAY_MODE_REGULAR ); - GAMESTATE->m_pCurStyle.Set( GAMEMAN->GameAndStringToStyle( GAMEMAN->GetDefaultGame(),"versus") ); + GAMESTATE->SetCurrentStyle( GAMEMAN->GameAndStringToStyle( GAMEMAN->GetDefaultGame(),"versus") ); StageStats ss; for( int z = 0; z < 3; ++z ) {