[Scummvm-git-logs] scummvm master -> 9ad98d324e4ad77300ec4fef00f2a05e43cdd23e
sluicebox
noreply at scummvm.org
Sat Mar 18 21:04:30 UTC 2023
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
5617184e31 SCI: Fix leak on error in MidiPlayer_AmigaMac1
34201e3c31 SCI: Remove dead code from GfxPicture
75ee16011d SCI: Remove redundant check from kPlatform
9ad98d324e SCI: Remove redundant check from cmdDiskDump
Commit: 5617184e318e44bb90ec17b9041bbf61701befb8
https://github.com/scummvm/scummvm/commit/5617184e318e44bb90ec17b9041bbf61701befb8
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2023-03-18T14:02:14-07:00
Commit Message:
SCI: Fix leak on error in MidiPlayer_AmigaMac1
Coverity CID 1431957
Changed paths:
engines/sci/sound/drivers/amigamac1.cpp
diff --git a/engines/sci/sound/drivers/amigamac1.cpp b/engines/sci/sound/drivers/amigamac1.cpp
index 2ce218de6ef..e5e619d4940 100644
--- a/engines/sci/sound/drivers/amigamac1.cpp
+++ b/engines/sci/sound/drivers/amigamac1.cpp
@@ -388,8 +388,12 @@ bool MidiPlayer_AmigaMac1::loadInstruments(Common::SeekableReadStream &patch, bo
noteRange.startNote = patch.readUint16BE();
- if (patch.err() || patch.eos())
+ if (patch.err() || patch.eos()) {
+ if (_instruments[patchIdx] != instrument) {
+ delete instrument;
+ }
return false;
+ }
if (noteRange.startNote == -1)
break;
Commit: 34201e3c311db2eebc057852d8276040f8b07420
https://github.com/scummvm/scummvm/commit/34201e3c311db2eebc057852d8276040f8b07420
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2023-03-18T14:03:16-07:00
Commit Message:
SCI: Remove dead code from GfxPicture
This code handled SCI32 pictures before SCI32 was separated
Coverity CID 1373259
Changed paths:
engines/sci/graphics/picture.cpp
diff --git a/engines/sci/graphics/picture.cpp b/engines/sci/graphics/picture.cpp
index acfc267bbcc..e58bc317d13 100644
--- a/engines/sci/graphics/picture.cpp
+++ b/engines/sci/graphics/picture.cpp
@@ -147,7 +147,6 @@ void GfxPicture::drawCelData(const SciSpan<const byte> &inbuffer, int headerPos,
//int16 displaceX, displaceY;
byte priority = _priority;
byte clearColor;
- bool compression = true;
byte curByte;
int16 y, lastY, x, leftX, rightX;
int pixelCount;
@@ -176,12 +175,7 @@ void GfxPicture::drawCelData(const SciSpan<const byte> &inbuffer, int headerPos,
pixelCount = width * height;
Common::SpanOwner<SciSpan<byte> > celBitmap;
celBitmap->allocate(pixelCount, _resource->name());
-
- if (compression) {
- unpackCelData(inbuffer, *celBitmap, clearColor, rlePos, literalPos, _resMan->getViewType(), width, false);
- } else
- // No compression (some SCI32 pictures)
- memcpy(celBitmap->getUnsafeDataAt(0, pixelCount), rlePtr.getUnsafeDataAt(0, pixelCount), pixelCount);
+ unpackCelData(inbuffer, *celBitmap, clearColor, rlePos, literalPos, _resMan->getViewType(), width, false);
Common::Rect displayArea = _coordAdjuster->pictureGetDisplayArea();
Commit: 75ee16011dc73a78225fbdcdcc908653089f2488
https://github.com/scummvm/scummvm/commit/75ee16011dc73a78225fbdcdcc908653089f2488
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2023-03-18T14:03:16-07:00
Commit Message:
SCI: Remove redundant check from kPlatform
Coverity CID 1361761
Changed paths:
engines/sci/engine/kmisc.cpp
diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp
index 20249ef5d87..2ba9fb195d0 100644
--- a/engines/sci/engine/kmisc.cpp
+++ b/engines/sci/engine/kmisc.cpp
@@ -789,8 +789,7 @@ reg_t kPlatform(EngineState *s, int argc, reg_t *argv) {
bool isWindows = (g_sci->getPlatform() == Common::kPlatformWindows) ||
(g_sci->getPlatform() == Common::kPlatformDOS && g_sci->forceHiresGraphics());
- uint16 operation = (argc == 0) ? 0 : argv[0].toUint16();
-
+ uint16 operation = argv[0].toUint16();
switch (operation) {
case kPlatformUnknown:
// For Mac versions, kPlatform(0) with other args has more functionality. Otherwise, fall through.
Commit: 9ad98d324e4ad77300ec4fef00f2a05e43cdd23e
https://github.com/scummvm/scummvm/commit/9ad98d324e4ad77300ec4fef00f2a05e43cdd23e
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2023-03-18T14:03:16-07:00
Commit Message:
SCI: Remove redundant check from cmdDiskDump
Coverity CID 1291563
Changed paths:
engines/sci/console.cpp
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index f18525f2b23..85bd113d03c 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -758,11 +758,6 @@ bool Console::cmdDiskDump(int argc, const char **argv) {
}
}
- if (resourceType == kResourceTypeInvalid) {
- debugPrintf("Resource type '%s' is not valid\n", argv[1]);
- return true;
- }
-
if (resourceAll) {
// "*" used, dump everything of that type
Common::List<ResourceId> resources = _engine->getResMan()->listResources(resourceType, -1);
More information about the Scummvm-git-logs
mailing list