[Scummvm-cvs-logs] scummvm master -> 95f890c3508543f3172ba4450211f1e9dba79f23
sev-
sev at scummvm.org
Thu Nov 3 00:05:45 CET 2011
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
0e1affcc97 AGOS: Fix warnings
95f890c350 CINE: Fix warnings
Commit: 0e1affcc97a856d5c4d6cdd76eaf7d26f8ab4c9c
https://github.com/scummvm/scummvm/commit/0e1affcc97a856d5c4d6cdd76eaf7d26f8ab4c9c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2011-11-02T15:55:58-07:00
Commit Message:
AGOS: Fix warnings
Changed paths:
engines/agos/draw.cpp
engines/agos/midi.cpp
engines/agos/res_snd.cpp
engines/agos/sound.cpp
engines/agos/subroutine.cpp
diff --git a/engines/agos/draw.cpp b/engines/agos/draw.cpp
index 9fc5ced..cf3a12c 100644
--- a/engines/agos/draw.cpp
+++ b/engines/agos/draw.cpp
@@ -776,7 +776,7 @@ void AGOSEngine::setMoveRect(uint16 x, uint16 y, uint16 width, uint16 height) {
void AGOSEngine::displayScreen() {
if (_fastFadeInFlag == 0 && _paletteFlag == 1) {
_paletteFlag = 0;
- if (memcmp(_displayPalette, _currentPalette, sizeof(_currentPalette))) {
+ if (memcmp(_displayPalette, _currentPalette, sizeof(_currentPalette)) != 0) {
memcpy(_currentPalette, _displayPalette, sizeof(_displayPalette));
_system->getPaletteManager()->setPalette(_displayPalette, 0, 256);
}
diff --git a/engines/agos/midi.cpp b/engines/agos/midi.cpp
index 431f080..b3ade91 100644
--- a/engines/agos/midi.cpp
+++ b/engines/agos/midi.cpp
@@ -478,7 +478,7 @@ void MidiPlayer::loadMultipleSMF(Common::File *in, bool sfx) {
// Make sure there's a MThd
in->read(buf, 4);
- if (memcmp(buf, "MThd", 4)) {
+ if (memcmp(buf, "MThd", 4) != 0) {
warning("Expected MThd but found '%c%c%c%c' instead", buf[0], buf[1], buf[2], buf[3]);
return;
}
@@ -487,7 +487,7 @@ void MidiPlayer::loadMultipleSMF(Common::File *in, bool sfx) {
// Now skip all the MTrk blocks
while (true) {
in->read(buf, 4);
- if (memcmp(buf, "MTrk", 4))
+ if (memcmp(buf, "MTrk", 4) != 0)
break;
in->seek(in->readUint32BE(), SEEK_CUR);
}
@@ -524,7 +524,7 @@ void MidiPlayer::loadXMIDI(Common::File *in, bool sfx) {
memcpy(buf, &buf[2], 2);
in->read(&buf[2], 2);
}
- if (memcmp(buf, "CAT ", 4)) {
+ if (memcmp(buf, "CAT ", 4) != 0) {
error("Could not find 'CAT ' tag to determine resource size");
}
size += 4 + in->readUint32BE();
diff --git a/engines/agos/res_snd.cpp b/engines/agos/res_snd.cpp
index b5612d7..e9a7ea4 100644
--- a/engines/agos/res_snd.cpp
+++ b/engines/agos/res_snd.cpp
@@ -495,7 +495,7 @@ void AGOSEngine::loadSound(uint16 sound, int16 pan, int16 vol, uint16 type) {
}
if (getPlatform() == Common::kPlatformAmiga)
- sprintf(filename, "sfx%d.wav", file);
+ sprintf(filename, "sfx%u.wav", file);
else
sprintf(filename, "effects.wav");
@@ -606,7 +606,7 @@ void AGOSEngine::loadVoice(uint speechId) {
}
if (getPlatform() == Common::kPlatformAmiga)
- sprintf(filename, "sp%d.wav", file);
+ sprintf(filename, "sp%u.wav", file);
else
sprintf(filename, "speech.wav");
diff --git a/engines/agos/sound.cpp b/engines/agos/sound.cpp
index 11a1cd7..dd3cc74 100644
--- a/engines/agos/sound.cpp
+++ b/engines/agos/sound.cpp
@@ -799,12 +799,12 @@ void Sound::switchVoiceFile(const GameSpecificSettings *gss, uint disc) {
Common::File *file = new Common::File();
if (!_hasVoiceFile) {
- sprintf(filename, "%s%d", gss->speech_filename, disc);
+ sprintf(filename, "%s%u", gss->speech_filename, disc);
_voice = makeCompressedSound(_mixer, file, filename);
_hasVoiceFile = (_voice != 0);
}
if (!_hasVoiceFile) {
- sprintf(filename, "%s%d.wav", gss->speech_filename, disc);
+ sprintf(filename, "%s%u.wav", gss->speech_filename, disc);
file->open(filename);
if (file->isOpen() == false) {
error("switchVoiceFile: Can't load voice file %s", filename);
diff --git a/engines/agos/subroutine.cpp b/engines/agos/subroutine.cpp
index 10c1c1a..45cb370 100644
--- a/engines/agos/subroutine.cpp
+++ b/engines/agos/subroutine.cpp
@@ -558,7 +558,6 @@ restart:
while ((byte *)sl != (byte *)sub) {
_currentLine = sl;
if (checkIfToRunSubroutineLine(sl, sub)) {
- result = 0;
_codePtr = (byte *)sl;
if (sub->id)
_codePtr += 2;
Commit: 95f890c3508543f3172ba4450211f1e9dba79f23
https://github.com/scummvm/scummvm/commit/95f890c3508543f3172ba4450211f1e9dba79f23
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2011-11-02T16:04:49-07:00
Commit Message:
CINE: Fix warnings
Changed paths:
engines/cine/saveload.cpp
engines/cine/sound.cpp
diff --git a/engines/cine/saveload.cpp b/engines/cine/saveload.cpp
index 0ea1a23..223099a 100644
--- a/engines/cine/saveload.cpp
+++ b/engines/cine/saveload.cpp
@@ -1034,7 +1034,7 @@ void loadResourcesFromSave(Common::SeekableReadStream &fHandle, enum CineSaveGam
}
// Alright, the animation entry looks to be valid so let's start handling it...
- if (strcmp(currentPartName, name)) {
+ if (strcmp(currentPartName, name) != 0) {
closePart();
loadPart(name);
}
diff --git a/engines/cine/sound.cpp b/engines/cine/sound.cpp
index 0c3541f..48c5e3d 100644
--- a/engines/cine/sound.cpp
+++ b/engines/cine/sound.cpp
@@ -602,7 +602,7 @@ bool PCSoundFxPlayer::load(const char *song) {
memcpy(instrument, _sfxData + 20 + i * 30, 12);
instrument[63] = '\0';
- if (strlen(instrument) != 0) {
+ if (instrument[0] != '\0') {
char *dot = strrchr(instrument, '.');
if (dot) {
*dot = '\0';
More information about the Scummvm-git-logs
mailing list