diff options
author | Johannes Schickel | 2010-08-01 01:00:30 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-08-01 01:00:30 +0000 |
commit | 8851c2016fea54d564d3c5717c35633a3517ef25 (patch) | |
tree | 9d5f7463659d4edfa2019f84267aa9ebe23f04da | |
parent | 57ad0408461b5551ae16962940e7f8e57fa43522 (diff) | |
download | scummvm-rg350-8851c2016fea54d564d3c5717c35633a3517ef25.tar.gz scummvm-rg350-8851c2016fea54d564d3c5717c35633a3517ef25.tar.bz2 scummvm-rg350-8851c2016fea54d564d3c5717c35633a3517ef25.zip |
SCI: Fix uninitialized variable warning in g++.
Thanks to clone2727 for suggestion to initialize the default new plane
priority to 0xFFFF, which means that the plane should be invisible. I added a
FIXME there though. So please re check this change. In case that is fine just
remove the FIXME, in case some other default value should be chosen, please
change the value and also remove the FIXME.
svn-id: r51561
-rw-r--r-- | engines/sci/graphics/frameout.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index 06dce6d111..3db0017dfa 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -68,6 +68,9 @@ void GfxFrameout::kernelAddPlane(reg_t object) { newPlane.object = object; newPlane.pictureId = 0xFFFF; + // TODO/FIXME: Check whether we should really default initialize the + // priority to 0xFFFF here. + newPlane.priority = 0xFFFF; newPlane.lastPriority = 0xFFFF; // hidden _planes.push_back(newPlane); @@ -125,6 +128,7 @@ void GfxFrameout::addPlanePicture(reg_t object, GuiResourceId pictureId, uint16 newPicture.pictureId = pictureId; newPicture.picture = new GfxPicture(_resMan, _coordAdjuster, 0, _screen, _palette, pictureId, false); newPicture.startX = startX; + newPicture.pictureCels = 0; _planePictures.push_back(newPicture); } |