clean up some sign mismatches
This commit is contained in:
@@ -40,7 +40,7 @@ void Course::LoadFromCRSFile( CString sPath, CArray<Song*,Song*> &apSongs )
|
||||
if( !arrayPossibleBanners.empty() )
|
||||
m_sBannerPath = arrayPossibleBanners[0];
|
||||
|
||||
for( int i=0; i<msd.m_iNumValues; i++ )
|
||||
for( unsigned i=0; i<msd.m_iNumValues; i++ )
|
||||
{
|
||||
CString sValueName = msd.m_sParams[i][0];
|
||||
CString* sParams = msd.m_sParams[i];
|
||||
|
||||
@@ -130,11 +130,11 @@ bool MsdFile::ReadFile( CString sNewPath )
|
||||
}
|
||||
}
|
||||
|
||||
for( i=0; i<m_iNumValues; i++ )
|
||||
for( unsigned x=0; x<m_iNumValues; x++ )
|
||||
{
|
||||
for( int j=0; j<m_iNumParams[i]; j++ )
|
||||
for( unsigned y=0; y<m_iNumParams[x]; y++ )
|
||||
{
|
||||
m_sParams[i][j] = szParams[i][j];
|
||||
m_sParams[x][y] = szParams[x][y];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
*/
|
||||
|
||||
|
||||
const int MAX_VALUES = 200;
|
||||
const int MAX_PARAMS_PER_VALUE = 10;
|
||||
const unsigned MAX_VALUES = 200;
|
||||
const unsigned MAX_PARAMS_PER_VALUE = 10;
|
||||
|
||||
class MsdFile
|
||||
{
|
||||
@@ -28,6 +28,6 @@ public:
|
||||
|
||||
CString m_sParams[MAX_VALUES][MAX_PARAMS_PER_VALUE];
|
||||
|
||||
int m_iNumValues; // tells how many values are valid
|
||||
int m_iNumParams[MAX_VALUES]; // tells how many params this value has
|
||||
unsigned m_iNumValues; // tells how many values are valid
|
||||
unsigned m_iNumParams[MAX_VALUES]; // tells how many params this value has
|
||||
};
|
||||
|
||||
@@ -171,8 +171,8 @@ void NoteField::DrawPrimitives()
|
||||
//
|
||||
// Draw measure bars
|
||||
//
|
||||
int iFirstMeasureToDraw = int(fFirstBeatToDraw)/BEATS_PER_MEASURE;
|
||||
int iLastMeasureToDraw = (int(fLastBeatToDraw)/BEATS_PER_MEASURE)+1;
|
||||
unsigned iFirstMeasureToDraw = int(fFirstBeatToDraw)/BEATS_PER_MEASURE;
|
||||
unsigned iLastMeasureToDraw = (int(fLastBeatToDraw)/BEATS_PER_MEASURE)+1;
|
||||
for( i=iFirstMeasureToDraw; i<=iLastMeasureToDraw; i++ )
|
||||
DrawMeasureBar( i );
|
||||
|
||||
|
||||
@@ -252,7 +252,7 @@ bool DWILoader::LoadFromDWIFile( CString sPath, Song &out )
|
||||
if( !bResult )
|
||||
throw RageException( "Error opening file '%s' for reading.", sPath.GetString() );
|
||||
|
||||
for( int i=0; i<msd.m_iNumValues; i++ )
|
||||
for( unsigned i=0; i<msd.m_iNumValues; i++ )
|
||||
{
|
||||
int iNumParams = msd.m_iNumParams[i];
|
||||
CString* sParams = msd.m_sParams[i];
|
||||
|
||||
@@ -21,7 +21,7 @@ bool KSFLoader::LoadFromKSFFile( const CString &sPath, Notes &out )
|
||||
int iTickCount = -1; // this is the value we read for TICKCOUNT
|
||||
CString iStep; // this is the value we read for STEP
|
||||
|
||||
for( int i=0; i<msd.m_iNumValues; i++ )
|
||||
for( unsigned i=0; i<msd.m_iNumValues; i++ )
|
||||
{
|
||||
CString* sParams = msd.m_sParams[i];
|
||||
CString sValueName = sParams[0];
|
||||
@@ -169,8 +169,7 @@ bool KSFLoader::LoadFromDir( CString sDir, Song &out )
|
||||
if( !bResult )
|
||||
throw RageException( "Error opening file '%s'.", sPath.GetString() );
|
||||
|
||||
// XXX msd::iNumValues should be unsigned
|
||||
for( i=0; i<unsigned(msd.m_iNumValues); i++ )
|
||||
for( i=0; i < msd.m_iNumValues; i++ )
|
||||
{
|
||||
CString* sParams = msd.m_sParams[i];
|
||||
CString sValueName = sParams[0];
|
||||
|
||||
@@ -54,14 +54,12 @@ bool SMLoader::LoadFromSMFile( CString sPath, Song &out )
|
||||
out.m_BPMSegments.clear();
|
||||
out.m_StopSegments.clear();
|
||||
|
||||
int i;
|
||||
|
||||
MsdFile msd;
|
||||
bool bResult = msd.ReadFile( sPath );
|
||||
if( !bResult )
|
||||
throw RageException( "Error opening file '%s'.", sPath.GetString() );
|
||||
|
||||
for( i=0; i<msd.m_iNumValues; i++ )
|
||||
for( unsigned i=0; i<msd.m_iNumValues; i++ )
|
||||
{
|
||||
int iNumParams = msd.m_iNumParams[i];
|
||||
CString* sParams = msd.m_sParams[i];
|
||||
|
||||
@@ -224,7 +224,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
|
||||
const unsigned iSongsToShow = GAMESTATE->m_apSongsPlayed.size();
|
||||
ASSERT( iSongsToShow > 0 );
|
||||
|
||||
for( int i=0; i<iSongsToShow; i++ )
|
||||
for( unsigned i=0; i<iSongsToShow; i++ )
|
||||
{
|
||||
m_BannerWithFrame[i].LoadFromSong( GAMESTATE->m_apSongsPlayed[i] );
|
||||
float fBannerOffset = i - (iSongsToShow-1)/2.0f;
|
||||
|
||||
@@ -132,7 +132,7 @@ void ScreenOptions::Init( InputMode im, OptionRowData OptionRowData[], int iNumO
|
||||
|
||||
m_framePage.AddChild( &m_textOptionLineTitles[i] );
|
||||
|
||||
for( int j=0; j<m_OptionRowData[i].iNumOptions; j++ )
|
||||
for( unsigned j=0; j<m_OptionRowData[i].iNumOptions; j++ )
|
||||
m_framePage.AddChild( &m_textOptions[i][j] ); // this array has to be big enough to hold all of the options
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ void ScreenOptions::InitOptionsText()
|
||||
|
||||
// init all text in this line and count the width of the line
|
||||
float fX = ITEMS_START_X; // indent 70 pixels
|
||||
for( int j=0; j<optline.iNumOptions; j++ ) // for each option on this line
|
||||
for( unsigned j=0; j<optline.iNumOptions; j++ ) // for each option on this line
|
||||
{
|
||||
BitmapText &option = m_textOptions[i][j];
|
||||
|
||||
@@ -260,7 +260,7 @@ void ScreenOptions::DimOption(int line, int option, bool dim)
|
||||
|
||||
bool ScreenOptions::RowCompletelyDimmed(int line) const
|
||||
{
|
||||
for(int i = 0; i < m_OptionRowData[line].iNumOptions; ++i)
|
||||
for(unsigned i = 0; i < m_OptionRowData[line].iNumOptions; ++i)
|
||||
if(!m_OptionDim[line][i]) return false;
|
||||
return true;
|
||||
}
|
||||
@@ -368,7 +368,7 @@ void ScreenOptions::UpdateEnabledDisabled()
|
||||
|
||||
m_textOptionLineTitles[i].SetDiffuse( bThisRowIsSelected ? colorSelected : colorNotSelected );
|
||||
|
||||
for( int j=0; j<m_OptionRowData[i].iNumOptions; j++ )
|
||||
for( unsigned j=0; j<m_OptionRowData[i].iNumOptions; j++ )
|
||||
m_textOptions[i][j].SetDiffuse( bThisRowIsSelected ? colorSelected : colorNotSelected );
|
||||
}
|
||||
|
||||
|
||||
@@ -22,14 +22,14 @@
|
||||
#include "OptionIcon.h"
|
||||
|
||||
|
||||
const int MAX_OPTION_LINES = 20;
|
||||
const int MAX_OPTIONS_PER_LINE = 20;
|
||||
const unsigned MAX_OPTION_LINES = 20;
|
||||
const unsigned MAX_OPTIONS_PER_LINE = 20;
|
||||
|
||||
|
||||
// used to pass menu info into this class
|
||||
struct OptionRowData {
|
||||
char szTitle[30];
|
||||
int iNumOptions;
|
||||
unsigned iNumOptions;
|
||||
char szOptionsText[MAX_OPTIONS_PER_LINE][60];
|
||||
char szExplanation[2048];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user