more cleanups (lint lint lint)

This commit is contained in:
Glenn Maynard
2002-11-16 09:12:55 +00:00
parent 551f5adb16
commit 23254cdd4a
16 changed files with 46 additions and 41 deletions
+3 -2
View File
@@ -216,7 +216,8 @@ void NoteField::DrawPrimitives()
/////////////////////////////////
// Draw all HoldNotes in this column (so that they appear under the tap notes)
/////////////////////////////////
for( int i=0; i < GetNumHoldNotes(); i++ )
int i;
for( i=0; i < GetNumHoldNotes(); i++ )
{
const HoldNote &hn = GetHoldNote(i);
HoldNoteScore &hns = m_HoldNoteScores[i];
@@ -281,4 +282,4 @@ void NoteField::FadeToFail()
{
m_fPercentFadeToFail = max( 0.0f, m_fPercentFadeToFail ); // this will slowly increase every Update()
// don't fade all over again if this is called twice
}
}
+1 -1
View File
@@ -30,4 +30,4 @@ public:
bool Loadable( CString sPath );
};
#endif
#endif
+2 -1
View File
@@ -259,7 +259,8 @@ bool BMSLoader::LoadFromDir( CString sDir, Song &out )
throw RageException( "Couldn't find any BMS files in '%s'", sDir.GetString() );
// load the Notes from the rest of the BMS files
for( unsigned i=0; i<arrayBMSFileNames.size(); i++ )
unsigned i;
for( i=0; i<arrayBMSFileNames.size(); i++ )
{
Notes* pNewNotes = new Notes;
+2 -1
View File
@@ -162,7 +162,8 @@ bool KSFLoader::LoadFromDir( CString sDir, Song &out )
throw RageException( "Couldn't find any KSF files in '%s'", sDir.GetString() );
// load the Notes from the rest of the KSF files
for( unsigned i=0; i<arrayKSFFileNames.size(); i++ )
unsigned i;
for( i=0; i<arrayKSFFileNames.size(); i++ )
{
Notes* pNewNotes = new Notes;
LoadFromKSFFile( out.m_sSongDir + arrayKSFFileNames[i], *pNewNotes );
+22 -22
View File
@@ -11,28 +11,28 @@ char NotesWriterDWI::NotesToDWIChar( bool bCol1, bool bCol2, bool bCol3, bool bC
char c;
bool bCol[6];
} const lookup[] = {
{ '0', 0, 0, 0, 0, 0, 0 },
{ '1', 1, 0, 1, 0, 0, 0 },
{ '2', 0, 0, 1, 0, 0, 0 },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, 0, 1, 1, 0 } },
{ 'L', { 0, 0, 0, 0, 1, 1 } },
{ 'M', { 0, 1, 0, 0, 1, 0 } },
};
const int iNumLookups = sizeof(lookup) / sizeof(*lookup);
+1 -1
View File
@@ -30,4 +30,4 @@ protected:
Sprite m_spr;
};
#endif
#endif
+3 -3
View File
@@ -23,7 +23,7 @@
OptionIconRow::OptionIconRow()
{
for( int i=0; i<NUM_OPTION_COLS; i++ )
for( unsigned i=0; i<NUM_OPTION_COLS; i++ )
{
m_OptionIcon[i].SetXY( i*SPACING_X, i*SPACING_Y );
this->AddChild( &m_OptionIcon[i] );
@@ -107,7 +107,7 @@ void OptionIconRow::Refresh( PlayerNumber pn )
continue; // skip
// search for a vacant spot
for( int i=iPerferredCol; i<NUM_OPTION_COLS-1; i++ )
for( unsigned i=iPerferredCol; i<NUM_OPTION_COLS-1; i++ )
{
if( asTabs[i] != "" )
continue;
@@ -126,4 +126,4 @@ void OptionIconRow::Refresh( PlayerNumber pn )
void OptionIconRow::DrawPrimitives()
{
ActorFrame::DrawPrimitives();
}
}
+1 -1
View File
@@ -33,4 +33,4 @@ protected:
OptionIcon m_OptionIcon[NUM_OPTION_COLS];
};
#endif
#endif
+2 -3
View File
@@ -178,7 +178,8 @@ void Player::Load( PlayerNumber pn, NoteData* pNoteData, LifeMeter* pLM, ScoreDi
m_Combo.SetY( GAMESTATE->m_PlayerOptions[pn].m_bReverseScroll ? -COMBO_Y_OFFSET : COMBO_Y_OFFSET );
m_Judgement.SetY( GAMESTATE->m_PlayerOptions[pn].m_bReverseScroll ? -JUDGEMENT_Y_OFFSET : JUDGEMENT_Y_OFFSET );
for( int c=0; c<pStyleDef->m_iColsPerPlayer; c++ )
int c;
for( c=0; c<pStyleDef->m_iColsPerPlayer; c++ )
m_HoldJudgement[c].SetY( GAMESTATE->m_PlayerOptions[pn].m_bReverseScroll ? SCREEN_HEIGHT - HOLD_JUDGEMENT_Y : HOLD_JUDGEMENT_Y );
for( c=0; c<pStyleDef->m_iColsPerPlayer; c++ )
m_HoldJudgement[c].SetX( (float)pStyleDef->m_ColumnInfo[pn][c].fXOffset );
@@ -295,8 +296,6 @@ void Player::DrawPrimitives()
{
m_frameCombo.Draw(); // draw this below everything else
RageMatrix matOldProj;
if( GAMESTATE->m_PlayerOptions[m_PlayerNumber].m_bEffects[PlayerOptions::EFFECT_SPACE] )
{
DISPLAY->PushMatrix();
+1 -1
View File
@@ -173,4 +173,4 @@ void PlayerOptions::FromString( CString sOptions )
else if( sBit == "nofreeze" ) m_bHoldNotes = false;
else if( sBit == "dark" ) m_bDark = true;
}
}
}
+1 -1
View File
@@ -40,7 +40,7 @@ RageException::RageException( HRESULT hr, const char *fmt, ...)
#endif
}
const char* RageException::what() const
const char* RageException::what() const throw ()
{
return m_sError;
}
+3
View File
@@ -38,7 +38,10 @@ RageLog::RageLog()
SYSTEMTIME st;
GetLocalTime( &st );
#if defined(_MSC_VER)
this->Trace( "Last compiled on %s.", __TIMESTAMP__ );
#endif
this->Trace( "Log starting %.4d-%.2d-%.2d %.2d:%.2d:%.2d",
st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond );
this->Trace( "\n" );
+1 -1
View File
@@ -16,7 +16,7 @@
//-----------------------------------------------------------------------------
#include "RageTextureManager.h"
#include "RageBitmapTexture.h"
#include "RageMovieTexture.h"
//#include "RageMovieTexture.h"
#include "RageUtil.h"
#include "RageLog.h"
#include "RageException.h"
+1 -1
View File
@@ -413,7 +413,7 @@ const DirCache::CacheEntry *DirCache::SearchDirCache( const CString &sPath )
bool GetExtDirListing( const CString &sPath, CStringArray &AddTo, bool bOnlyDirs, bool bReturnPathToo, ... )
{
const char *masks[32];
int nmasks = 0;
unsigned nmasks = 0;
va_list va;
va_start(va, bReturnPathToo);
+1 -1
View File
@@ -22,7 +22,7 @@ const float SCORE_TWEEN_TIME = 0.5f;
ScoreDisplayRolling::ScoreDisplayRolling()
{
LOG->WriteLine( "ScoreDisplayRolling::ScoreDisplayRolling()" );
LOG->Trace( "ScoreDisplayRolling::ScoreDisplayRolling()" );
// init the text
Load( THEME->GetPathTo(FONT_SCORE_NUMBERS) );
+1 -1
View File
@@ -15,7 +15,7 @@
#include "Song.h"
#include "ActorFrame.h"
#include "BitmapText.h"
#include "PlayerOptions.h"
const int NUM_SCORE_DIGITS = 9;