Quickly variables! Into the magic mirror!

This commit is contained in:
Jason Felds
2011-03-14 03:32:07 -04:00
parent e9df4832f6
commit 81ccc7daba
22 changed files with 80 additions and 87 deletions
+2 -2
View File
@@ -80,11 +80,11 @@ void AutoKeysounds::LoadAutoplaySoundsInto( RageSoundReader_Chain *pChain )
bool bSoundIsGlobal = true; bool bSoundIsGlobal = true;
{ {
PlayerNumber pn = GetNextEnabledPlayer((PlayerNumber)-1); PlayerNumber pn = GetNextEnabledPlayer((PlayerNumber)-1);
const TapNote &t = tn[pn]; const TapNote &tap = tn[pn];
pn = GetNextEnabledPlayer(pn); pn = GetNextEnabledPlayer(pn);
while( pn != PLAYER_INVALID ) while( pn != PLAYER_INVALID )
{ {
if( tn[pn].type != TapNote::autoKeysound || tn[pn].iKeysoundIndex != t.iKeysoundIndex ) if( tn[pn].type != TapNote::autoKeysound || tn[pn].iKeysoundIndex != tap.iKeysoundIndex )
bSoundIsGlobal = false; bSoundIsGlobal = false;
pn = GetNextEnabledPlayer(pn); pn = GetNextEnabledPlayer(pn);
} }
+2
View File
@@ -250,9 +250,11 @@ void BeginnerHelper::DrawPrimitives()
m_sStepCircle[scd][scde].Draw(); m_sStepCircle[scd][scde].Draw();
if( DrawCelShaded ) if( DrawCelShaded )
{
FOREACH_PlayerNumber( pn ) // Draw each dancer FOREACH_PlayerNumber( pn ) // Draw each dancer
if( GAMESTATE->IsHumanPlayer(pn) ) if( GAMESTATE->IsHumanPlayer(pn) )
m_pDancer[pn]->DrawCelShaded(); m_pDancer[pn]->DrawCelShaded();
}
else else
{ {
DISPLAY->SetLighting( true ); DISPLAY->SetLighting( true );
+2 -2
View File
@@ -930,8 +930,8 @@ const CourseEntry *Course::FindFixedSong( const Song *pSong ) const
FOREACH_CONST( CourseEntry, m_vEntries, e ) FOREACH_CONST( CourseEntry, m_vEntries, e )
{ {
const CourseEntry &entry = *e; const CourseEntry &entry = *e;
Song *pSong = entry.songID.ToSong(); Song *lSong = entry.songID.ToSong();
if( pSong == pSong ) if( pSong == lSong )
return &entry; return &entry;
} }
+6 -6
View File
@@ -311,15 +311,15 @@ const glyph &Font::GetGlyph( wchar_t c ) const
bool Font::FontCompleteForString( const wstring &str ) const bool Font::FontCompleteForString( const wstring &str ) const
{ {
map<wchar_t,glyph*>::const_iterator m_pDefault = m_iCharToGlyph.find( FONT_DEFAULT_GLYPH ); map<wchar_t,glyph*>::const_iterator mapDefault = m_iCharToGlyph.find( FONT_DEFAULT_GLYPH );
if( m_pDefault == m_iCharToGlyph.end() ) if( mapDefault == m_iCharToGlyph.end() )
RageException::Throw( "The default glyph is missing from the font \"%s\".", path.c_str() ); RageException::Throw( "The default glyph is missing from the font \"%s\".", path.c_str() );
for( unsigned i = 0; i < str.size(); ++i ) for( unsigned i = 0; i < str.size(); ++i )
{ {
// If the glyph for this character is the default glyph, we're incomplete. // If the glyph for this character is the default glyph, we're incomplete.
const glyph &g = GetGlyph( str[i] ); const glyph &g = GetGlyph( str[i] );
if( &g == m_pDefault->second ) if( &g == mapDefault->second )
return false; return false;
} }
return true; return true;
@@ -718,8 +718,8 @@ void Font::Load( const RString &sIniPath, RString sChars )
for(unsigned i = 0; i < ImportList.size(); ++i) for(unsigned i = 0; i < ImportList.size(); ++i)
{ {
RString path = THEME->GetPathF( "", ImportList[i], true ); RString fPath = THEME->GetPathF( "", ImportList[i], true );
if( path == "" ) if( fPath == "" )
{ {
RString s = ssprintf( "Font \"%s\" imports a font \"%s\" that doesn't exist", sIniPath.c_str(), ImportList[i].c_str() ); RString s = ssprintf( "Font \"%s\" imports a font \"%s\" that doesn't exist", sIniPath.c_str(), ImportList[i].c_str() );
Dialog::OK( s ); Dialog::OK( s );
@@ -727,7 +727,7 @@ void Font::Load( const RString &sIniPath, RString sChars )
} }
Font subfont; Font subfont;
subfont.Load(path,""); subfont.Load(fPath,"");
MergeFont(subfont); MergeFont(subfont);
//FONT->UnloadFont(subfont); //FONT->UnloadFont(subfont);
} }
+2 -2
View File
@@ -93,8 +93,8 @@ bool GameCommand::DescribesCurrentMode( PlayerNumber pn ) const
if( m_pSteps == NULL && m_dc != Difficulty_Invalid ) if( m_pSteps == NULL && m_dc != Difficulty_Invalid )
{ {
// Why is this checking for all players? // Why is this checking for all players?
FOREACH_HumanPlayer( pn ) FOREACH_HumanPlayer( human )
if( GAMESTATE->m_PreferredDifficulty[pn] != m_dc ) if( GAMESTATE->m_PreferredDifficulty[human] != m_dc )
return false; return false;
} }
+2 -2
View File
@@ -2361,9 +2361,9 @@ public:
return 1; return 1;
} }
static int GetCurrentStepsCredits( T* p, lua_State *L ) static int GetCurrentStepsCredits( T* t, lua_State *L )
{ {
const Song* pSong = p->m_pCurSong; const Song* pSong = t->m_pCurSong;
if( pSong == NULL ) if( pSong == NULL )
return 0; return 0;
+7 -7
View File
@@ -282,22 +282,22 @@ try_again:
const NoteSkinData &data = iter->second; const NoteSkinData &data = iter->second;
RString sPath; // fill this in below RString sPath; // fill this in below
FOREACH_CONST( RString, data.vsDirSearchOrder, iter ) FOREACH_CONST( RString, data.vsDirSearchOrder, lIter )
{ {
if( sButtonName.empty() ) if( sButtonName.empty() )
sPath = GetPathFromDirAndFile( *iter, sElement ); sPath = GetPathFromDirAndFile( *lIter, sElement );
else else
sPath = GetPathFromDirAndFile( *iter, sButtonName+" "+sElement ); sPath = GetPathFromDirAndFile( *lIter, sButtonName+" "+sElement );
if( !sPath.empty() ) if( !sPath.empty() )
break; // done searching break; // done searching
} }
if( sPath.empty() ) if( sPath.empty() )
{ {
FOREACH_CONST( RString, data.vsDirSearchOrder, iter ) FOREACH_CONST( RString, data.vsDirSearchOrder, lIter )
{ {
if( !sButtonName.empty() ) if( !sButtonName.empty() )
sPath = GetPathFromDirAndFile( *iter, "Fallback "+sElement ); sPath = GetPathFromDirAndFile( *lIter, "Fallback "+sElement );
if( !sPath.empty() ) if( !sPath.empty() )
break; // done searching break; // done searching
} }
@@ -340,9 +340,9 @@ try_again:
GetFileContents( sPath, sNewFileName, true ); GetFileContents( sPath, sNewFileName, true );
RString sRealPath; RString sRealPath;
FOREACH_CONST( RString, data.vsDirSearchOrder, iter ) FOREACH_CONST( RString, data.vsDirSearchOrder, lIter )
{ {
sRealPath = GetPathFromDirAndFile( *iter, sNewFileName ); sRealPath = GetPathFromDirAndFile( *lIter, sNewFileName );
if( !sRealPath.empty() ) if( !sRealPath.empty() )
break; // done searching break; // done searching
} }
+7 -7
View File
@@ -149,15 +149,15 @@ public:
{ {
// Parse the basic configuration metric. // Parse the basic configuration metric.
Commands cmds = ParseCommands( ENTRY(sParam) ); Commands lCmds = ParseCommands( ENTRY(sParam) );
if( cmds.v.size() < 1 ) if( lCmds.v.size() < 1 )
RageException::Throw( "Parse error in \"ScreenOptionsMaster::%s\".", sParam.c_str() ); RageException::Throw( "Parse error in \"ScreenOptionsMaster::%s\".", sParam.c_str() );
m_Def.m_bOneChoiceForAllPlayers = false; m_Def.m_bOneChoiceForAllPlayers = false;
const int NumCols = atoi( cmds.v[0].m_vsArgs[0] ); const int NumCols = atoi( lCmds.v[0].m_vsArgs[0] );
for( unsigned i=1; i<cmds.v.size(); i++ ) for( unsigned i=1; i<lCmds.v.size(); i++ )
{ {
const Command &cmd = cmds.v[i]; const Command &cmd = lCmds.v[i];
RString sName = cmd.GetName(); RString sName = cmd.GetName();
if( sName == "together" ) m_Def.m_bOneChoiceForAllPlayers = true; if( sName == "together" ) m_Def.m_bOneChoiceForAllPlayers = true;
@@ -188,8 +188,8 @@ public:
} }
else if( sName == "broadcastonexport" ) else if( sName == "broadcastonexport" )
{ {
for( unsigned i=1; i<cmd.m_vsArgs.size(); i++ ) for( unsigned j=1; j<cmd.m_vsArgs.size(); j++ )
m_vsBroadcastOnExport.push_back( cmd.m_vsArgs[i] ); m_vsBroadcastOnExport.push_back( cmd.m_vsArgs[j] );
} }
else else
{ {
+2 -2
View File
@@ -138,8 +138,8 @@ void OptionListRow::SetUnderlines( const vector<bool> &aSelections, const Option
if( pTarget->m_Def.m_selectType == SELECT_ONE ) if( pTarget->m_Def.m_selectType == SELECT_ONE )
{ {
int iSelection = m_pOptions->GetOneSelection(sDest); int iSelection = m_pOptions->GetOneSelection(sDest);
const OptionRowHandler *pHandler = m_pOptions->m_Rows.find(sDest)->second; const OptionRowHandler *lHandler = m_pOptions->m_Rows.find(sDest)->second;
int iDefault = pHandler->GetDefaultOption(); int iDefault = lHandler->GetDefaultOption();
if( iDefault != -1 && iSelection != iDefault ) if( iDefault != -1 && iSelection != iDefault )
bSelected |= true; bSelected |= true;
} }
+7 -7
View File
@@ -363,8 +363,8 @@ float Profile::GetSongsActual( StepsType st, Difficulty dc ) const
FOREACHM_CONST( StepsID, HighScoresForASteps, hsfas.m_StepsHighScores, j ) FOREACHM_CONST( StepsID, HighScoresForASteps, hsfas.m_StepsHighScores, j )
{ {
const StepsID &id = j->first; const StepsID &sid = j->first;
Steps* pSteps = id.ToSteps( pSong, true ); Steps* pSteps = sid.ToSteps( pSong, true );
CHECKPOINT_M( ssprintf("Profile::GetSongsActual: song %p, steps %p", pSong, pSteps) ); CHECKPOINT_M( ssprintf("Profile::GetSongsActual: song %p, steps %p", pSong, pSteps) );
// If the Steps isn't loaded on the current machine, then we can't // If the Steps isn't loaded on the current machine, then we can't
@@ -375,7 +375,7 @@ float Profile::GetSongsActual( StepsType st, Difficulty dc ) const
if( pSteps->m_StepsType != st ) if( pSteps->m_StepsType != st )
continue; continue;
CHECKPOINT_M( ssprintf("Profile::GetSongsActual: n %s = %p", id.ToString().c_str(), pSteps) ); CHECKPOINT_M( ssprintf("Profile::GetSongsActual: n %s = %p", sid.ToString().c_str(), pSteps) );
if( pSteps->GetDifficulty() != dc ) if( pSteps->GetDifficulty() != dc )
continue; // skip continue; // skip
CHECKPOINT; CHECKPOINT;
@@ -1303,13 +1303,13 @@ void Profile::LoadGeneralDataFromNode( const XNode* pNode )
if( style->GetName() != "Style" ) if( style->GetName() != "Style" )
continue; continue;
StyleID s; StyleID sID;
s.LoadFromNode( style ); sID.LoadFromNode( style );
if( !s.IsValid() ) if( !sID.IsValid() )
WARN_AND_CONTINUE; WARN_AND_CONTINUE;
style->GetTextValue( m_iNumSongsPlayedByStyle[s] ); style->GetTextValue( m_iNumSongsPlayedByStyle[sID] );
} }
} }
} }
+3 -3
View File
@@ -489,10 +489,10 @@ bool ProfileManager::DeleteLocalProfile( RString sProfileID )
g_vLocalProfile.erase( i ); g_vLocalProfile.erase( i );
// Delete all references to this profileID // Delete all references to this profileID
FOREACH_CONST( Preference<RString>*, m_sDefaultLocalProfileID.m_v, i ) FOREACH_CONST( Preference<RString>*, m_sDefaultLocalProfileID.m_v, j )
{ {
if( (*i)->Get() == sProfileID ) if( (*j)->Get() == sProfileID )
(*i)->Set( "" ); (*j)->Set( "" );
} }
return true; return true;
} }
+3 -3
View File
@@ -245,14 +245,14 @@ int RageFileObjDeflate::WriteInternal( const void *pBuffer, size_t iBytes )
if( m_pDeflate->avail_out < sizeof(buf) ) if( m_pDeflate->avail_out < sizeof(buf) )
{ {
int iBytes = sizeof(buf)-m_pDeflate->avail_out; int lBytes = sizeof(buf)-m_pDeflate->avail_out;
int iRet = m_pFile->Write( buf, iBytes ); int iRet = m_pFile->Write( buf, lBytes );
if( iRet == -1 ) if( iRet == -1 )
{ {
SetError( m_pFile->GetError() ); SetError( m_pFile->GetError() );
return -1; return -1;
} }
if( iRet < iBytes ) if( iRet < lBytes )
{ {
SetError( "Partial write" ); SetError( "Partial write" );
return -1; return -1;
-3
View File
@@ -33,7 +33,6 @@ RageSoundReader_Chain::~RageSoundReader_Chain()
while( !m_apActiveSounds.empty() ) while( !m_apActiveSounds.empty() )
ReleaseSound( m_apActiveSounds.front() ); ReleaseSound( m_apActiveSounds.front() );
map<RString, RageSoundReader *>::iterator it;
FOREACH( RageSoundReader *, m_apLoadedSounds, it ) FOREACH( RageSoundReader *, m_apLoadedSounds, it )
delete *it; delete *it;
} }
@@ -103,7 +102,6 @@ int RageSoundReader_Chain::GetSampleRateInternal() const
if( m_apLoadedSounds.empty() ) if( m_apLoadedSounds.empty() )
return m_iPreferredSampleRate; return m_iPreferredSampleRate;
map<RString, RageSoundReader *>::const_iterator it;
int iRate = -1; int iRate = -1;
FOREACH_CONST( RageSoundReader *, m_apLoadedSounds, it ) FOREACH_CONST( RageSoundReader *, m_apLoadedSounds, it )
{ {
@@ -120,7 +118,6 @@ void RageSoundReader_Chain::Finish()
/* Figure out how many channels we have. All sounds must either have 1 or 2 channels, /* Figure out how many channels we have. All sounds must either have 1 or 2 channels,
* which will be converted as needed, or have the same number of channels. */ * which will be converted as needed, or have the same number of channels. */
m_iChannels = 1; m_iChannels = 1;
map<RString, RageSoundReader *>::iterator it;
FOREACH( RageSoundReader *, m_apLoadedSounds, it ) FOREACH( RageSoundReader *, m_apLoadedSounds, it )
m_iChannels = max( m_iChannels, (*it)->GetNumChannels() ); m_iChannels = max( m_iChannels, (*it)->GetNumChannels() );
+1 -1
View File
@@ -426,7 +426,7 @@ int RageSoundReader_MP3::do_mad_frame_decode( bool headers_only )
return -1; return -1;
} }
int ret = fill_buffer(); ret = fill_buffer();
if( ret <= 0 ) if( ret <= 0 )
return ret; return ret;
bytes_read += ret; bytes_read += ret;
-1
View File
@@ -18,7 +18,6 @@ RageSoundReader_Merge::RageSoundReader_Merge()
RageSoundReader_Merge::~RageSoundReader_Merge() RageSoundReader_Merge::~RageSoundReader_Merge()
{ {
map<RString, RageSoundReader *>::iterator it;
FOREACH( RageSoundReader *, m_aSounds, it ) FOREACH( RageSoundReader *, m_aSounds, it )
delete *it; delete *it;
} }
+2 -2
View File
@@ -585,8 +585,8 @@ static bool blit_rgba_to_rgba( const RageSurface *src_surf, const RageSurface *d
unsigned int opixel = 0; unsigned int opixel = 0;
for( int c = 0; c < 4; ++c ) for( int c = 0; c < 4; ++c )
{ {
int src = (pixel & src_masks[c]) >> src_shifts[c]; int lSrc = (pixel & src_masks[c]) >> src_shifts[c];
opixel |= lookup[c][src] << dst_shifts[c]; opixel |= lookup[c][lSrc] << dst_shifts[c];
} }
// Store it. // Store it.
+6 -6
View File
@@ -454,7 +454,7 @@ static acolorhist_item *mediancut( acolorhist_item *achv, int colors, int sum, i
#ifdef REP_AVERAGE_PIXELS #ifdef REP_AVERAGE_PIXELS
int indx = bv[bi].ind; int indx = bv[bi].ind;
int clrs = bv[bi].colors; int clrs = bv[bi].colors;
long r = 0, g = 0, b = 0, a = 0, sum = 0; long r = 0, g = 0, b = 0, a = 0, lSum = 0;
for ( int i = 0; i < clrs; ++i ) for ( int i = 0; i < clrs; ++i )
{ {
@@ -462,15 +462,15 @@ static acolorhist_item *mediancut( acolorhist_item *achv, int colors, int sum, i
g += PAM_GETG( achv[indx + i].acolor ) * achv[indx + i].value; g += PAM_GETG( achv[indx + i].acolor ) * achv[indx + i].value;
b += PAM_GETB( achv[indx + i].acolor ) * achv[indx + i].value; b += PAM_GETB( achv[indx + i].acolor ) * achv[indx + i].value;
a += PAM_GETA( achv[indx + i].acolor ) * achv[indx + i].value; a += PAM_GETA( achv[indx + i].acolor ) * achv[indx + i].value;
sum += achv[indx + i].value; lSum += achv[indx + i].value;
} }
r = r / sum; r = r / lSum;
r = min( r, (long) maxval ); r = min( r, (long) maxval );
g = g / sum; g = g / lSum;
g = min( g, (long) maxval ); g = min( g, (long) maxval );
b = b / sum; b = b / lSum;
b = min( b, (long) maxval ); b = min( b, (long) maxval );
a = a / sum; a = a / lSum;
a = min( a, (long) maxval ); a = min( a, (long) maxval );
PAM_ASSIGN( acolormap[bi].acolor, (uint8_t)r, (uint8_t)g, (uint8_t)b, (uint8_t)a ); PAM_ASSIGN( acolormap[bi].acolor, (uint8_t)r, (uint8_t)g, (uint8_t)b, (uint8_t)a );
#endif // REP_AVERAGE_PIXELS #endif // REP_AVERAGE_PIXELS
+19 -19
View File
@@ -273,30 +273,30 @@ void ScreenDebugOverlay::Init()
FOREACH_CONST( IDebugLine*, *g_pvpSubscribers, p ) FOREACH_CONST( IDebugLine*, *g_pvpSubscribers, p )
{ {
{ {
BitmapText *p = new BitmapText; BitmapText *bt = new BitmapText;
p->SetName( "ButtonText" ); bt->SetName( "ButtonText" );
p->LoadFromFont( THEME->GetPathF("ScreenDebugOverlay", "line") ); bt->LoadFromFont( THEME->GetPathF("ScreenDebugOverlay", "line") );
p->SetHorizAlign( align_right ); bt->SetHorizAlign( align_right );
p->SetText( "blah" ); bt->SetText( "blah" );
//p->SetShadowLength( 2 ); //p->SetShadowLength( 2 );
LOAD_ALL_COMMANDS( *p ); LOAD_ALL_COMMANDS( *bt );
// xxx: I shouldn't have to do this: // xxx: I shouldn't have to do this:
ON_COMMAND( p ); ON_COMMAND( bt );
m_vptextButton.push_back( p ); m_vptextButton.push_back( bt );
this->AddChild( p ); this->AddChild( bt );
} }
{ {
BitmapText *p = new BitmapText; BitmapText *bt = new BitmapText;
p->SetName( "FunctionText" ); bt->SetName( "FunctionText" );
p->LoadFromFont( THEME->GetPathF("ScreenDebugOverlay", "line") ); bt->LoadFromFont( THEME->GetPathF("ScreenDebugOverlay", "line") );
p->SetHorizAlign( align_left ); bt->SetHorizAlign( align_left );
p->SetText( "blah" ); bt->SetText( "blah" );
//p->SetShadowLength( 2 ); //p->SetShadowLength( 2 );
LOAD_ALL_COMMANDS( *p ); LOAD_ALL_COMMANDS( *bt );
// xxx: I shouldn't have to do this: // xxx: I shouldn't have to do this:
ON_COMMAND( p ); ON_COMMAND( bt );
m_vptextFunction.push_back( p ); m_vptextFunction.push_back( bt );
this->AddChild( p ); this->AddChild( bt );
} }
} }
@@ -498,7 +498,7 @@ bool ScreenDebugOverlay::OverlayInput( const InputEventPlus &input )
bt.FinishTweening(); bt.FinishTweening();
// blink 5 times instead of 8 // blink 5 times instead of 8
// TODO: make this all metrics instead -aj // TODO: make this all metrics instead -aj
for( int i=0; i<5; i++ ) for( i=0; i<5; i++ )
{ {
bt.SetGlow( RageColor(1,0,0,1) ); bt.SetGlow( RageColor(1,0,0,1) );
bt.Sleep(0.1f); bt.Sleep(0.1f);
-4
View File
@@ -1270,8 +1270,6 @@ void ScreenGameplay::LoadLights()
{ {
if( asDifficulties[0].CompareNoCase("selected") == 0 ) if( asDifficulties[0].CompareNoCase("selected") == 0 )
{ {
PlayerInfo pi;
// Base lights off current difficulty of active player // Base lights off current difficulty of active player
// Can be either P1 or P2 if they're individual or P1 if both are active // Can be either P1 or P2 if they're individual or P1 if both are active
FOREACH_EnabledPlayerNumberInfo( m_vPlayerInfo, pi ) FOREACH_EnabledPlayerNumberInfo( m_vPlayerInfo, pi )
@@ -1305,8 +1303,6 @@ void ScreenGameplay::LoadLights()
// We've also specified for Player 2 to be based off current difficulty // We've also specified for Player 2 to be based off current difficulty
if( asDifficulties[1].CompareNoCase("selected") == 0 && GAMESTATE->GetNumPlayersEnabled() > 1 ) if( asDifficulties[1].CompareNoCase("selected") == 0 && GAMESTATE->GetNumPlayersEnabled() > 1 )
{ {
PlayerInfo pi;
// Base lights off current difficulty of active player // Base lights off current difficulty of active player
// Only do this for P2 in a two-player situation, since P1 is taken care of above // Only do this for P2 in a two-player situation, since P1 is taken care of above
FOREACH_EnabledPlayerNumberInfo( m_vPlayerInfo, pi ) FOREACH_EnabledPlayerNumberInfo( m_vPlayerInfo, pi )
+5 -5
View File
@@ -236,15 +236,15 @@ void ColorBitmapText::SetText( const RString& _sText, const RString& _sAlternate
RString FirstThree = m_sText.substr( i, 3 ); RString FirstThree = m_sText.substr( i, 3 );
if( FirstThree.CompareNoCase("|c0") == 0 && iCharsLeft > 8 ) if( FirstThree.CompareNoCase("|c0") == 0 && iCharsLeft > 8 )
{ {
ColorChange change; ColorChange cChange;
unsigned int r, g, b; unsigned int r, g, b;
sscanf( m_sText.substr( i, 9 ).c_str(), "|%*c0%2x%2x%2x", &r, &g, &b ); sscanf( m_sText.substr( i, 9 ).c_str(), "|%*c0%2x%2x%2x", &r, &g, &b );
change.c = RageColor( r/255.f, g/255.f, b/255.f, 1.f ); cChange.c = RageColor( r/255.f, g/255.f, b/255.f, 1.f );
change.l = iGlyphsSoFar; cChange.l = iGlyphsSoFar;
if( iGlyphsSoFar == 0 ) if( iGlyphsSoFar == 0 )
m_vColors[0] = change; m_vColors[0] = cChange;
else else
m_vColors.push_back( change ); m_vColors.push_back( cChange );
i+=8; i+=8;
continue; continue;
} }
-1
View File
@@ -38,7 +38,6 @@ class InputList: public BitmapText
// Update input texts // Update input texts
vector<RString> asInputs; vector<RString> asInputs;
DeviceInput di;
vector<DeviceInput> DeviceInputs; vector<DeviceInput> DeviceInputs;
INPUTFILTER->GetPressedButtons( DeviceInputs ); INPUTFILTER->GetPressedButtons( DeviceInputs );
FOREACH( DeviceInput, DeviceInputs, di ) FOREACH( DeviceInput, DeviceInputs, di )
+2 -2
View File
@@ -396,11 +396,11 @@ public:
return 1; return 1;
} }
static int GetBestFinalGrade( T* p, lua_State *L ) static int GetBestFinalGrade( T* t, lua_State *L )
{ {
Grade top_grade = Grade_Failed; Grade top_grade = Grade_Failed;
StageStats stats; StageStats stats;
p->GetFinalEvalStageStats( stats ); t->GetFinalEvalStageStats( stats );
FOREACH_HumanPlayer( p ) FOREACH_HumanPlayer( p )
{ {
// If this player failed any stage, then their final grade is an F. // If this player failed any stage, then their final grade is an F.