Skip to content

Commit

Permalink
varied cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Dec 31, 2016
1 parent 303cf14 commit 04afbb7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 20 deletions.
18 changes: 2 additions & 16 deletions src/MusicWheelItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,23 +396,9 @@ void MusicWheelItem::RefreshGrades()

void MusicWheelItem::HandleMessage( const Message &msg )
{
if( msg == Message_CurrentStepsP1Changed ||
msg == Message_CurrentStepsP2Changed ||
msg == Message_CurrentTrailP1Changed ||
msg == Message_CurrentTrailP2Changed ||
msg == Message_PreferredDifficultyP1Changed ||
msg == Message_PreferredDifficultyP2Changed )
{
static const bool iskyzagoodprogrammer = false;
if(iskyzagoodprogrammer)
RefreshGrades();
}

/* Perhaps one day I can use this without it broadcasting 10 times every time you pick a new song - Mina
if (msg == Message_CurrentStepsP1Changed) {
Message msg("ChartInfo");
msg.SetParam("ChartKey", GAMESTATE->m_pCurSteps[PLAYER_1]->ChartKey);
MESSAGEMAN->Broadcast(msg);
}
*/

WheelItemBase::HandleMessage( msg );
}
Expand Down
2 changes: 1 addition & 1 deletion src/Profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2095,7 +2095,7 @@ void Profile::CalcPlayerRating(float& prating, float* pskillsets) const {
const vector<HighScore>& hsv = zz.hsl.vHighScores;
for (size_t i = 0; i < hsv.size(); i++) {
FOREACH_ENUM(Skillset, ss)
demskillas[static_cast<int>(ss)].emplace_back(hsv[i].GetSkillsetSSR(ss));
demskillas[ss].emplace_back(hsv[i].GetSkillsetSSR(ss));
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/ScreenSelectMusic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ bool ScreenSelectMusic::Input( const InputEventPlus &input )
Profile *pProfile = PROFILEMAN->GetProfile(PLAYER_1);
unfav_me_biatch->SetFavorited(false);
pProfile->RemoveFromFavorites(GAMESTATE->m_pCurSteps[PLAYER_1]->GetChartKey());
AfterMusicChange();
m_MusicWheel.ChangeMusic(0);
return true;
}
}
Expand All @@ -491,7 +491,7 @@ bool ScreenSelectMusic::Input( const InputEventPlus &input )
Profile *pProfile = PROFILEMAN->GetProfile(PLAYER_1);
fav_me_biatch->SetFavorited(true);
pProfile->AddToFavorites(GAMESTATE->m_pCurSteps[PLAYER_1]->GetChartKey());
AfterMusicChange();
m_MusicWheel.ChangeMusic(0);
return true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/WheelBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ void WheelBase::RebuildWheelItems( int iDist )
pDisplay->SetExpanded( pData->m_Type == WheelItemDataType_Section && pData->m_sText == m_sExpandedSectionName );
}

for( int i=0; i<(int)items.size(); i++ )
for( size_t i=0; i < items.size(); i++ )
{
int iIndex = iFirstVisibleIndex + i;
wrap( iIndex, data.size() );
Expand Down

0 comments on commit 04afbb7

Please sign in to comment.