aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sword1/menu.cpp5
-rw-r--r--sword1/sword1.cpp5
-rw-r--r--sword2/driver/d_sound.cpp5
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;