[Scummvm-cvs-logs] scummvm master -> be8bc5f030ec98e470cdda8aa1e0564e16f28ff3
bluegr
bluegr at gmail.com
Thu Oct 31 03:24:03 CET 2013
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
2ed7d7ab4d ZVISION: Throw a warning when a WAV file can't be opened
1c8b4d31d0 ZVISION: Silence some false positive warnings in MSVC
be8bc5f030 ZVISION: Error out when an unknown sound file identifier is encountered
Commit: 2ed7d7ab4d4c3de6d13bc87f024ca3ac03603b86
https://github.com/scummvm/scummvm/commit/2ed7d7ab4d4c3de6d13bc87f024ca3ac03603b86
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-10-30T19:00:16-07:00
Commit Message:
ZVISION: Throw a warning when a WAV file can't be opened
Changed paths:
engines/zvision/actions.cpp
diff --git a/engines/zvision/actions.cpp b/engines/zvision/actions.cpp
index eae4ec2..1fa9fcf 100644
--- a/engines/zvision/actions.cpp
+++ b/engines/zvision/actions.cpp
@@ -185,6 +185,9 @@ bool ActionMusic::execute(ZVision *engine) {
Common::File *file = new Common::File();
if (file->open(_fileName)) {
audioStream = Audio::makeWAVStream(file, DisposeAfterUse::YES);
+ } else {
+ warning("Unable to open %s", _fileName.c_str());
+ return false;
}
} else {
audioStream = makeRawZorkStream(_fileName, engine);
Commit: 1c8b4d31d0e2076b67c21a566f977345edc44253
https://github.com/scummvm/scummvm/commit/1c8b4d31d0e2076b67c21a566f977345edc44253
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-10-30T19:00:43-07:00
Commit Message:
ZVISION: Silence some false positive warnings in MSVC
Changed paths:
engines/zvision/lever_control.cpp
engines/zvision/video.cpp
diff --git a/engines/zvision/lever_control.cpp b/engines/zvision/lever_control.cpp
index 79049b8..557dec0 100644
--- a/engines/zvision/lever_control.cpp
+++ b/engines/zvision/lever_control.cpp
@@ -377,11 +377,11 @@ void LeverControl::renderFrame(uint frameNumber) {
_lastRenderedFrame = frameNumber;
}
- const uint16 *frameData;
+ const uint16 *frameData = 0;
int x = _animationCoords.left;
int y = _animationCoords.top;
- int width;
- int height;
+ int width = 0;
+ int height = 0;
if (_fileType == RLF) {
// getFrameData() will automatically optimize to getNextFrame() / getPreviousFrame() if it can
diff --git a/engines/zvision/video.cpp b/engines/zvision/video.cpp
index cd11618..894ae3a 100644
--- a/engines/zvision/video.cpp
+++ b/engines/zvision/video.cpp
@@ -107,7 +107,7 @@ void ZVision::playVideo(Video::VideoDecoder &videoDecoder, const Common::Rect &d
uint16 finalWidth = origWidth * scale;
uint16 finalHeight = origHeight * scale;
- byte *scaledVideoFrameBuffer;
+ byte *scaledVideoFrameBuffer = 0;
if (scale != 1) {
scaledVideoFrameBuffer = new byte[finalWidth * finalHeight * bytesPerPixel];
}
Commit: be8bc5f030ec98e470cdda8aa1e0564e16f28ff3
https://github.com/scummvm/scummvm/commit/be8bc5f030ec98e470cdda8aa1e0564e16f28ff3
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-10-30T19:16:56-07:00
Commit Message:
ZVISION: Error out when an unknown sound file identifier is encountered
Changed paths:
engines/zvision/zork_raw.cpp
diff --git a/engines/zvision/zork_raw.cpp b/engines/zvision/zork_raw.cpp
index 21613d9..e64feca 100644
--- a/engines/zvision/zork_raw.cpp
+++ b/engines/zvision/zork_raw.cpp
@@ -180,21 +180,29 @@ Audio::RewindableAudioStream *makeRawZorkStream(const Common::String &filePath,
Common::String fileName = getFileName(filePath);
fileName.toLowercase();
- SoundParams soundParams;
+ SoundParams soundParams = { ' ', 0, false, false };
+ bool foundParams = false;
+ char fileIdentifier = (engine->getGameId() == GID_NEMESIS) ? fileName[6] : fileName[7];
if (engine->getGameId() == GID_NEMESIS) {
for (int i = 0; i < 6; ++i) {
- if (RawZorkStream::_zNemSoundParamLookupTable[i].identifier == (fileName[6]))
+ if (RawZorkStream::_zNemSoundParamLookupTable[i].identifier == fileIdentifier) {
soundParams = RawZorkStream::_zNemSoundParamLookupTable[i];
+ foundParams = true;
+ }
}
- }
- else if (engine->getGameId() == GID_GRANDINQUISITOR) {
+ } else if (engine->getGameId() == GID_GRANDINQUISITOR) {
for (int i = 0; i < 6; ++i) {
- if (RawZorkStream::_zgiSoundParamLookupTable[i].identifier == (fileName[7]))
+ if (RawZorkStream::_zgiSoundParamLookupTable[i].identifier == fileIdentifier) {
soundParams = RawZorkStream::_zgiSoundParamLookupTable[i];
+ foundParams = true;
+ }
}
}
+ if (!foundParams)
+ error("Unable to find sound params for file '%s'. File identifier is '%c'", filePath.c_str(), fileIdentifier);
+
if (soundParams.packed) {
return makeRawZorkStream(wrapBufferedSeekableReadStream(file, 2048, DisposeAfterUse::YES), soundParams.rate, soundParams.stereo, DisposeAfterUse::YES);
} else {
More information about the Scummvm-git-logs
mailing list