From 876079be752023dcd377518f226fe3fc158b6048 Mon Sep 17 00:00:00 2001 From: Nicolas Bacca Date: Sat, 11 Dec 2004 00:37:05 +0000 Subject: Fix dumb CE compiler svn-id: r16026 --- sword1/menu.cpp | 5 +++-- sword1/sword1.cpp | 5 +++-- sword2/driver/d_sound.cpp | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/sword1/menu.cpp b/sword1/menu.cpp index 53075806ff..a5de5092b0 100644 --- a/sword1/menu.cpp +++ b/sword1/menu.cpp @@ -104,12 +104,13 @@ Menu::Menu(Screen *pScreen, Mouse *pMouse) { } Menu::~Menu(void) { + int i; // the menu may be open, so delete the icons - for (int i = 0; i < TOTAL_pockets; i++) { + for (i = 0; i < TOTAL_pockets; i++) { delete _objects[i]; _objects[i] = NULL; } - for (int i = 0; i < 16; i++) { + for (i = 0; i < 16; i++) { delete _subjects[i]; _subjects[i] = NULL; } diff --git a/sword1/sword1.cpp b/sword1/sword1.cpp index 08e58d6860..d2ccbd1f01 100644 --- a/sword1/sword1.cpp +++ b/sword1/sword1.cpp @@ -87,14 +87,15 @@ void Sword1CheckDirectory(const FSList &fslist, bool *filesFound) { } DetectedGameList Engine_SWORD1_detectGames(const FSList &fslist) { + int i; DetectedGameList detectedGames; bool filesFound[NUM_FILES_TO_CHECK]; - for (int i = 0; i < NUM_FILES_TO_CHECK; i++) + for (i = 0; i < NUM_FILES_TO_CHECK; i++) filesFound[i] = false; Sword1CheckDirectory(fslist, filesFound); bool mainFilesFound = true; - for (int i = 0; i < NUM_FILES_TO_CHECK -1; i++) + for (i = 0; i < NUM_FILES_TO_CHECK -1; i++) if (!filesFound[i]) mainFilesFound = false; diff --git a/sword2/driver/d_sound.cpp b/sword2/driver/d_sound.cpp index 5515dd7e81..546071ba51 100644 --- a/sword2/driver/d_sound.cpp +++ b/sword2/driver/d_sound.cpp @@ -511,11 +511,12 @@ Sound::~Sound() { int Sound::readBuffer(int16 *buffer, const int numSamples) { Common::StackLock lock(_mutex); + int i; if (!_soundOn || _musicPaused) return 0; - for (int i = 0; i < MAXMUS; i++) { + for (i = 0; i < MAXMUS; i++) { if (_music[i] && _music[i]->readyToRemove()) { delete _music[i]; _music[i] = NULL; @@ -536,7 +537,7 @@ int Sound::readBuffer(int16 *buffer, const int numSamples) { if (!_mixBuffer) return 0; - for (int i = 0; i < MAXMUS; i++) { + for (i = 0; i < MAXMUS; i++) { if (!_music[i]) continue; -- cgit v1.2.3