fix compiler warnings

This commit is contained in:
Steve Checkoway
2003-07-31 20:34:01 +00:00
parent f46d947b70
commit f83b837d76
8 changed files with 18 additions and 17 deletions
+2 -2
View File
@@ -65,7 +65,7 @@ void BGAnimation::LoadFromAniDir( CString sAniDir )
IniFile ini(sPathToIni);
ini.ReadFile();
unsigned i;
int i;
for( i=0; i<MAX_LAYERS; i++ )
{
CString sLayer = ssprintf("Layer%d",i+1);
@@ -80,7 +80,7 @@ void BGAnimation::LoadFromAniDir( CString sAniDir )
if( !ini.GetValueF( "BGAnimation", "LengthSeconds", m_fLengthSeconds ) )
{
m_fLengthSeconds = 0;
for( i=0; i < m_Layers.size(); i++ )
for( i=0; (unsigned)i < m_Layers.size(); i++ )
m_fLengthSeconds = max(m_fLengthSeconds, m_Layers[i]->GetMaxTweenTimeLeft());
}
}
+5 -5
View File
@@ -128,7 +128,7 @@ void GameState::Update( float fDelta )
m_bActiveAttackEndedThisUpdate[p] = false;
for( unsigned s=0; s<NUM_INVENTORY_SLOTS; s++ )
for( int s=0; s<NUM_INVENTORY_SLOTS; s++ )
{
if( m_ActiveAttacks[p][s].fSecsRemaining > 0 )
{
@@ -510,7 +510,7 @@ void GameState::LaunchAttack( PlayerNumber target, Attack a )
LOG->Trace( "Launch attack '%s' against P%d", a.sModifier.c_str(), target+1 );
// search for an open slot
for( unsigned s=0; s<NUM_INVENTORY_SLOTS; s++ )
for( int s=0; s<NUM_INVENTORY_SLOTS; s++ )
if( m_ActiveAttacks[target][s].fSecsRemaining <= 0 )
{
m_ActiveAttacks[target][s] = a;
@@ -521,7 +521,7 @@ void GameState::LaunchAttack( PlayerNumber target, Attack a )
void GameState::RemoveActiveAttacksForPlayer( PlayerNumber pn )
{
for( unsigned s=0; s<NUM_INVENTORY_SLOTS; s++ )
for( int s=0; s<NUM_INVENTORY_SLOTS; s++ )
{
m_ActiveAttacks[pn][s].fSecsRemaining = 0;
m_ActiveAttacks[pn][s].sModifier = "";
@@ -532,7 +532,7 @@ void GameState::RemoveActiveAttacksForPlayer( PlayerNumber pn )
void GameState::RemoveAllInventory()
{
for( int p=0; p<NUM_PLAYERS; p++ )
for( unsigned s=0; s<NUM_INVENTORY_SLOTS; s++ )
for( int s=0; s<NUM_INVENTORY_SLOTS; s++ )
{
m_Inventory[p][s].fSecsRemaining = 0;
m_Inventory[p][s].sModifier = "";
@@ -552,7 +552,7 @@ int GameState::GetSumOfActiveAttackLevels( PlayerNumber pn )
{
int iSum = 0;
for( unsigned s=0; s<NUM_INVENTORY_SLOTS; s++ )
for( int s=0; s<NUM_INVENTORY_SLOTS; s++ )
if( m_ActiveAttacks[pn][s].fSecsRemaining > 0 )
iSum += m_ActiveAttacks[pn][s].level;
+1 -1
View File
@@ -161,7 +161,7 @@ void GroupList::SetSelection( unsigned sel )
m_iSelection=sel;
if( m_asLabels.size() <= MAX_GROUPS_ONSCREEN ||
if( (int)m_asLabels.size() <= MAX_GROUPS_ONSCREEN ||
sel <= MAX_GROUPS_ONSCREEN/2 )
m_iTop = 0;
else if ( sel >= m_asLabels.size() - MAX_GROUPS_ONSCREEN/2 )
+1 -1
View File
@@ -186,7 +186,7 @@ void InputMapper::AutoMapJoysticksForCurrentGame()
{
InputDevice device = vDevices[i];
CString sDescription = vDescriptions[i];
for( unsigned j=0; j<NUM_AUTO_JOY_MAPPINGS; j++ )
for( int j=0; j<NUM_AUTO_JOY_MAPPINGS; j++ )
{
const AutoJoyMapping& mapping = g_AutoJoyMappings[j];
+1 -1
View File
@@ -170,7 +170,7 @@ ScreenCredits::ScreenCredits() : Screen("ScreenCredits")
{
LOG->Trace( "ScreenCredits::ScreenCredits()" );
unsigned i;
int i;
GAMESTATE->Reset(); // so that credits message for both players will show
+2 -1
View File
@@ -150,6 +150,7 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) : Screen(sCl
break;
case stage:
case course:
LOG->Trace("We made it to stage");
stageStats = GAMESTATE->m_CurStageStats;
break;
default:
@@ -752,7 +753,7 @@ void ScreenEvaluation::TweenOffScreen()
}
// small banner area
for( unsigned i=0; i<MAX_SONGS_TO_SHOW; i++ )
for( int i=0; i<MAX_SONGS_TO_SHOW; i++ )
{
UtilOffCommand( m_SmallBanner[i], "ScreenEvaluation" );
UtilOffCommand( m_sprSmallBannerFrame[i], "ScreenEvaluation" );
+3 -3
View File
@@ -75,7 +75,7 @@ ScreenUnlock::ScreenUnlock() : ScreenAttract("ScreenUnlock")
CString SongTitle = DISPLAYED_SONG(i);
if (USE_UNLOCKS_DAT == 1)
{
if (i <= GAMESTATE->m_pUnlockingSys->m_SongEntries.size() )
if ((unsigned)i <= GAMESTATE->m_pUnlockingSys->m_SongEntries.size() )
SongTitle = GAMESTATE->m_pUnlockingSys->m_SongEntries[i-1].m_sSongName;
}
@@ -127,7 +127,7 @@ ScreenUnlock::ScreenUnlock() : ScreenAttract("ScreenUnlock")
CString DisplayedSong = DISPLAYED_SONG(i);
if (USE_UNLOCKS_DAT == 1)
{
if (i <= GAMESTATE->m_pUnlockingSys->m_SongEntries.size() )
if ((unsigned)i <= GAMESTATE->m_pUnlockingSys->m_SongEntries.size() )
DisplayedSong = GAMESTATE->m_pUnlockingSys->m_SongEntries[i-1].m_sSongName;
}
@@ -249,7 +249,7 @@ ScreenUnlock::ScreenUnlock() : ScreenAttract("ScreenUnlock")
if (i > (int) LastUnlocks.size())
continue;
int NextIcon = LastUnlocks[LastUnlocks.size() - i];
unsigned NextIcon = LastUnlocks[LastUnlocks.size() - i];
Sprite* NewIcon = new Sprite;
BitmapText* NewText = new BitmapText;
+3 -3
View File
@@ -281,7 +281,7 @@ void SongManager::ReadNoteScoresFromFile( CString fn, int c )
Difficulty dc;
getline(f, line);
if( sscanf(line.c_str(), "%d %d", &nt, &dc) != 2 )
if( sscanf(line.c_str(), "%d %d", (int *)&nt, (int *)&dc) != 2 )
break;
CString sDescription;
@@ -301,7 +301,7 @@ void SongManager::ReadNoteScoresFromFile( CString fn, int c )
int iNumTimesPlayed;
Grade grade;
int iScore;
if( sscanf(line.c_str(), "%d %d %i\n", &iNumTimesPlayed, &grade, &iScore) != 3 )
if( sscanf(line.c_str(), "%d %d %i\n", &iNumTimesPlayed, (int *)&grade, &iScore) != 3 )
break;
if( pNotes )
{
@@ -530,7 +530,7 @@ void SongManager::SaveNoteScoresToFile( CString fn, int c )
fprintf(fp, "%s\n%u\n",
pSong->GetSongDir().c_str(),
vNotes.size() );
(unsigned)vNotes.size() );
for( unsigned i=0; i<vNotes.size(); i++ )
{