Decouple <cstddef>
This commit is contained in:
+12
-11
@@ -7,10 +7,11 @@
|
||||
#include "StepsDisplay.h"
|
||||
#include "StepsUtil.h"
|
||||
#include "CommonMetrics.h"
|
||||
|
||||
#include "SongUtil.h"
|
||||
#include "XmlFile.h"
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
/** @brief Specifies the max number of charts available for a song.
|
||||
*
|
||||
* This includes autogenned charts. */
|
||||
@@ -213,13 +214,13 @@ void StepsDisplayList::UpdatePositions()
|
||||
|
||||
void StepsDisplayList::PositionItems()
|
||||
{
|
||||
for( size_t i = 0; i < MAX_METERS; ++i )
|
||||
for( std::size_t i = 0; i < MAX_METERS; ++i )
|
||||
{
|
||||
bool bUnused = ( i >= m_Rows.size() );
|
||||
m_Lines[i].m_Meter.SetVisible( !bUnused );
|
||||
}
|
||||
|
||||
for( size_t m = 0; m < m_Rows.size(); ++m )
|
||||
for( std::size_t m = 0; m < m_Rows.size(); ++m )
|
||||
{
|
||||
Row &row = m_Rows[m];
|
||||
bool bHidden = row.m_bHidden;
|
||||
@@ -237,7 +238,7 @@ void StepsDisplayList::PositionItems()
|
||||
m_Lines[m].m_Meter.SetY( row.m_fY );
|
||||
}
|
||||
|
||||
for( size_t m=0; m < MAX_METERS; ++m )
|
||||
for( std::size_t m=0; m < MAX_METERS; ++m )
|
||||
{
|
||||
bool bHidden = true;
|
||||
if( m_bShown && m < m_Rows.size() )
|
||||
@@ -270,7 +271,7 @@ void StepsDisplayList::SetFromGameState()
|
||||
if( pSong == nullptr )
|
||||
{
|
||||
// FIXME: This clamps to between the min and the max difficulty, but
|
||||
// it really should round to the nearest difficulty that's in
|
||||
// it really should round to the nearest difficulty that's in
|
||||
// DIFFICULTIES_TO_SHOW.
|
||||
const std::vector<Difficulty>& difficulties = CommonMetrics::DIFFICULTIES_TO_SHOW.GetValue();
|
||||
m_Rows.resize( difficulties.size() );
|
||||
@@ -303,7 +304,7 @@ void StepsDisplayList::SetFromGameState()
|
||||
UpdatePositions();
|
||||
PositionItems();
|
||||
|
||||
for( size_t m = 0; m < MAX_METERS; ++m )
|
||||
for( std::size_t m = 0; m < MAX_METERS; ++m )
|
||||
m_Lines[m].m_Meter.FinishTweening();
|
||||
}
|
||||
|
||||
@@ -323,7 +324,7 @@ void StepsDisplayList::TweenOnScreen()
|
||||
FOREACH_HumanPlayer( pn )
|
||||
ON_COMMAND( m_Cursors[pn] );
|
||||
|
||||
for( size_t m = 0; m < MAX_METERS; ++m )
|
||||
for( std::size_t m = 0; m < MAX_METERS; ++m )
|
||||
ON_COMMAND( m_Lines[m].m_Meter );
|
||||
|
||||
this->SetHibernate( 0.5f );
|
||||
@@ -374,7 +375,7 @@ void StepsDisplayList::HandleMessage( const Message &msg )
|
||||
FOREACH_ENUM( PlayerNumber, pn )
|
||||
{
|
||||
if( msg.GetName() == MessageIDToString((MessageID)(Message_CurrentStepsP1Changed+Enum::to_integral(pn))) ||
|
||||
msg.GetName() == MessageIDToString((MessageID)(Message_CurrentTrailP1Changed+Enum::to_integral(pn))) )
|
||||
msg.GetName() == MessageIDToString((MessageID)(Message_CurrentTrailP1Changed+Enum::to_integral(pn))) )
|
||||
SetFromGameState();
|
||||
}
|
||||
|
||||
@@ -385,7 +386,7 @@ void StepsDisplayList::HandleMessage( const Message &msg )
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
/** @brief Allow Lua to have access to the StepsDisplayList. */
|
||||
/** @brief Allow Lua to have access to the StepsDisplayList. */
|
||||
class LunaStepsDisplayList: public Luna<StepsDisplayList>
|
||||
{
|
||||
public:
|
||||
@@ -403,7 +404,7 @@ LUA_REGISTER_DERIVED_CLASS( StepsDisplayList, ActorFrame )
|
||||
/*
|
||||
* (c) 2003-2004 Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -413,7 +414,7 @@ LUA_REGISTER_DERIVED_CLASS( StepsDisplayList, ActorFrame )
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
Reference in New Issue
Block a user