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