[Scummvm-git-logs] scummvm master -> 18a34fc9be4d5fb5db9fcdc6e65e0393340dc94b
somaen
noreply at scummvm.org
Sat Oct 1 23:09:31 UTC 2022
This automated email contains information about 7 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
3518c370bb GRIM: Flip order of width/height in surface-creation.
8e6ff75013 GRIM: Initialize SmushPlayer::_currentVideoIsTheora
ae8c19f894 GRIM: free() malloc-ed data in iMuse-callback.
9647b9e707 GRIM: Initialize Model::_radius
109dbdb5b7 GRIM: Initialize Costume::_components in Costume::load
068fd722e0 GRIM: Initialize GfxBase::_globalScaleW/_globalScaleH
18a34fc9be GRIM: Check that Bitmap-loading succeeded.
Commit: 3518c370bb96605b1a2bdce902f926392e9e833c
https://github.com/scummvm/scummvm/commit/3518c370bb96605b1a2bdce902f926392e9e833c
Author: Einar Johan Trøan SømaÌen (somaen at scummvm.org)
Date: 2022-10-02T00:16:24+02:00
Commit Message:
GRIM: Flip order of width/height in surface-creation.
This has 0 impact beyond pedantic correctness, as the
surface is square in this case, but doesn't hurt to
silence this warning properly.
Fixes COVERITY: 1433334
Changed paths:
engines/grim/gfx_opengl.cpp
diff --git a/engines/grim/gfx_opengl.cpp b/engines/grim/gfx_opengl.cpp
index 576e9e7f931..752f3380d40 100644
--- a/engines/grim/gfx_opengl.cpp
+++ b/engines/grim/gfx_opengl.cpp
@@ -1401,7 +1401,7 @@ void GfxOpenGL::createTextObject(TextObject *text) {
int width = gf->getStringWidth(text->getLines()[i]);
int height = width;
- surface.create(height, width, Graphics::PixelFormat(4, 8, 8, 8, 8, 0, 8, 16, 24));
+ surface.create(width, height, Graphics::PixelFormat(4, 8, 8, 8, 8, 0, 8, 16, 24));
gf->drawString(&surface, text->getLines()[i], 0, 0, width, 0xFFFFFFFF);
byte *bitmap = (byte *)surface.getPixels();
Commit: 8e6ff7501309a6b1874d4c66397a6f1a8e0e4676
https://github.com/scummvm/scummvm/commit/8e6ff7501309a6b1874d4c66397a6f1a8e0e4676
Author: Einar Johan Trøan SømaÌen (somaen at scummvm.org)
Date: 2022-10-02T00:25:58+02:00
Commit Message:
GRIM: Initialize SmushPlayer::_currentVideoIsTheora
Not likely to be a problem, as it is guaranteed to be
fully set once loadFile() has been called. But nevertheless
all fields should have a defined value after the constructor
has been run.
Fixes COVERITY: 1433423
Changed paths:
engines/grim/movie/smush.h
diff --git a/engines/grim/movie/smush.h b/engines/grim/movie/smush.h
index 42464e67278..604177f1726 100644
--- a/engines/grim/movie/smush.h
+++ b/engines/grim/movie/smush.h
@@ -42,7 +42,7 @@ private:
void postHandleFrame() override;
void init() override;
bool _demo;
- bool _currentVideoIsTheora;
+ bool _currentVideoIsTheora = false;
SmushDecoder *_smushDecoder;
Video::VideoDecoder *_theoraDecoder; // HACK for now, move to other class later?
};
Commit: ae8c19f894077d9d39a4c9a06f675efb15c260e3
https://github.com/scummvm/scummvm/commit/ae8c19f894077d9d39a4c9a06f675efb15c260e3
Author: Einar Johan Trøan SømaÌen (somaen at scummvm.org)
Date: 2022-10-02T00:38:12+02:00
Commit Message:
GRIM: free() malloc-ed data in iMuse-callback.
The data-buffer is allocated using malloc(), and
should thus be free()-ed, not delete[]-ed.
Fixes COVERITY: 1433506
Changed paths:
engines/grim/imuse/imuse.cpp
diff --git a/engines/grim/imuse/imuse.cpp b/engines/grim/imuse/imuse.cpp
index 6de967771b1..6d174741ac7 100644
--- a/engines/grim/imuse/imuse.cpp
+++ b/engines/grim/imuse/imuse.cpp
@@ -302,7 +302,7 @@ void Imuse::callback() {
track->stream->queueBuffer(data, result, DisposeAfterUse::YES, makeMixerFlags(track->mixerFlags));
track->regionOffset += result;
} else
- delete[] data;
+ free(data);
if (_sound->isEndOfRegion(track->soundDesc, track->curRegion)) {
switchToNextRegion(track);
Commit: 9647b9e7072f83aba2f861f8874ed14be633a723
https://github.com/scummvm/scummvm/commit/9647b9e7072f83aba2f861f8874ed14be633a723
Author: Einar Johan Trøan SømaÌen (somaen at scummvm.org)
Date: 2022-10-02T00:41:40+02:00
Commit Message:
GRIM: Initialize Model::_radius
It was left uninitialized if loadBinary was run,
presumably it was only used in use cases where that
was the loader that was run.
Fixes COVERITY: 1470688
Changed paths:
engines/grim/model.h
diff --git a/engines/grim/model.h b/engines/grim/model.h
index bdc5e408b41..289ececf900 100644
--- a/engines/grim/model.h
+++ b/engines/grim/model.h
@@ -82,7 +82,7 @@ public:
Math::Vector3d _insertOffset;
int _numGeosets;
Geoset *_geosets;
- float _radius;
+ float _radius = 0.0f;
int _numHierNodes;
ModelNode *_rootHierNode;
Math::Vector3d _bboxPos;
Commit: 109dbdb5b74327a1d6b868068397873e7187f6c4
https://github.com/scummvm/scummvm/commit/109dbdb5b74327a1d6b868068397873e7187f6c4
Author: Einar Johan Trøan SømaÌen (somaen at scummvm.org)
Date: 2022-10-02T00:50:42+02:00
Commit Message:
GRIM: Initialize Costume::_components in Costume::load
Presumably the indata always defines the parents before
the children, but nevertheless doesn't hurt to fix this,
if nothing else to make tools like Coverity happy.
Fixes COVERITY: 1470594
Changed paths:
engines/grim/costume.cpp
diff --git a/engines/grim/costume.cpp b/engines/grim/costume.cpp
index ac544ce394a..2660f4b49f0 100644
--- a/engines/grim/costume.cpp
+++ b/engines/grim/costume.cpp
@@ -130,7 +130,7 @@ void Costume::load(Common::SeekableReadStream *data) {
ts.expectString("section components");
ts.scanString(" numcomponents %d", 1, &_numComponents);
- _components = new Component *[_numComponents];
+ _components = new Component *[_numComponents]{};
for (int i = 0; i < _numComponents; i++) {
int id, tagID, hash, parentID, namePos;
const char *line = ts.getCurrentLine();
Commit: 068fd722e01ac5623de3520d265de6db23676212
https://github.com/scummvm/scummvm/commit/068fd722e01ac5623de3520d265de6db23676212
Author: Einar Johan Trøan SømaÌen (somaen at scummvm.org)
Date: 2022-10-02T00:57:59+02:00
Commit Message:
GRIM: Initialize GfxBase::_globalScaleW/_globalScaleH
This is a field in GfxBase that is only used (and initialized)
in GfxOpenGL, hence it will be left uninitialized in the other
renderers.
Fixes COVERITY: 1009909
Changed paths:
engines/grim/gfx_base.h
diff --git a/engines/grim/gfx_base.h b/engines/grim/gfx_base.h
index d3650a1895b..7287c8d6532 100644
--- a/engines/grim/gfx_base.h
+++ b/engines/grim/gfx_base.h
@@ -281,7 +281,7 @@ protected:
static const int _globalHeight = 1080;
static const int _globalWidth = 1920;
float _scaleW, _scaleH;
- float _globalScaleW, _globalScaleH;
+ float _globalScaleW = 1.0f, _globalScaleH = 1.0f;
int _screenWidth, _screenHeight;
Shadow *_currentShadowArray;
unsigned char _shadowColorR;
Commit: 18a34fc9be4d5fb5db9fcdc6e65e0393340dc94b
https://github.com/scummvm/scummvm/commit/18a34fc9be4d5fb5db9fcdc6e65e0393340dc94b
Author: Einar Johan Trøan SømaÌen (somaen at scummvm.org)
Date: 2022-10-02T01:06:12+02:00
Commit Message:
GRIM: Check that Bitmap-loading succeeded.
Fixes COVERIY: 1230890
Changed paths:
engines/grim/bitmap.cpp
diff --git a/engines/grim/bitmap.cpp b/engines/grim/bitmap.cpp
index 6ad922a3cc7..b0470785004 100644
--- a/engines/grim/bitmap.cpp
+++ b/engines/grim/bitmap.cpp
@@ -88,6 +88,8 @@ void BitmapData::load() {
return;
}
Common::SeekableReadStream *data = g_resourceloader->openNewStreamFile(_fname.c_str());
+ if (!data)
+ error("Couldn't open %s", _fname.c_str());
uint32 tag = data->readUint32BE();
switch(tag) {
More information about the Scummvm-git-logs
mailing list