[Scummvm-git-logs] scummvm master -> a35c01edcbd3a3ef0e10286bd7016242536e8150
sev-
sev at scummvm.org
Wed Feb 26 20:17:04 UTC 2020
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:
1dc515a9bf MACVENTURE: Fix crash related to off-screen rendering
92d207ba0f DIRECTOR: Added sanity checks to func_cursor()
65160f233e iDIRECTOR: Improved debug output
a35c01edcb DIRECTOR: Fixed loading bitmap cast in D4+
Commit: 1dc515a9bfd039e7d09260fbba4e087aa9b91cd8
https://github.com/scummvm/scummvm/commit/1dc515a9bfd039e7d09260fbba4e087aa9b91cd8
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-02-26T20:28:48+01:00
Commit Message:
MACVENTURE: Fix crash related to off-screen rendering
Changed paths:
engines/macventure/gui.h
diff --git a/engines/macventure/gui.h b/engines/macventure/gui.h
index fa27e16f1e..ed2f50cf4c 100644
--- a/engines/macventure/gui.h
+++ b/engines/macventure/gui.h
@@ -338,6 +338,10 @@ public:
uint y = target->h - font->getFontHeight();
for (uint i = _scrollPos; i != 0; i--) {
font->drawString(target, _lines[i], textOffset, y, font->getStringWidth(_lines[i]), kColorBlack);
+
+ if (y < font->getFontHeight()) // Do not draw off-screen
+ break;
+
y -= font->getFontHeight();
}
Commit: 92d207ba0f83d513894e23c99bcb8fa5c0aec653
https://github.com/scummvm/scummvm/commit/92d207ba0f83d513894e23c99bcb8fa5c0aec653
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-02-26T20:35:02+01:00
Commit Message:
DIRECTOR: Added sanity checks to func_cursor()
Changed paths:
engines/director/lingo/lingo-funcs.cpp
diff --git a/engines/director/lingo/lingo-funcs.cpp b/engines/director/lingo/lingo-funcs.cpp
index 26e11b7970..581e6b5e99 100644
--- a/engines/director/lingo/lingo-funcs.cpp
+++ b/engines/director/lingo/lingo-funcs.cpp
@@ -345,6 +345,15 @@ void Lingo::func_cursor(int c, int m) {
return;
}
+ if (score->_loadedCast->getVal(c)->_surface == nullptr) {
+ warning("cursor: empty sprite %d surface", c);
+ return;
+ }
+ if (score->_loadedCast->getVal(m)->_surface == nullptr) {
+ warning("cursor: empty sprite %d surface", m);
+ return;
+ }
+
byte *assembly = (byte *)malloc(16 * 16);
byte *dst = assembly;
Commit: 65160f233eb288ac6ede1e72d4f11b2b32f798ca
https://github.com/scummvm/scummvm/commit/65160f233eb288ac6ede1e72d4f11b2b32f798ca
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-02-26T21:08:41+01:00
Commit Message:
iDIRECTOR: Improved debug output
Changed paths:
engines/director/score.cpp
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index 1a18f4e8db..c205232f3d 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -735,63 +735,68 @@ void Score::loadCastData(Common::SeekableSubReadStreamEndian &stream, uint16 id,
switch (castType) {
case kCastBitmap:
+ debugC(3, kDebugLoading, "Score::loadCastData(): loading kCastBitmap (%d children)", res->children.size());
_loadedCast->setVal(id, new BitmapCast(castStream, res->tag, _vm->getVersion()));
- debugC(3, kDebugLoading, "Score::loadCastData(): loaded kCastBitmap (%d)", res->children.size());
break;
case kCastText:
+ debugC(3, kDebugLoading, "Score::loadCastData(): loading kCastText (%d children)", res->children.size());
_loadedCast->setVal(id, new TextCast(castStream, _vm->getVersion()));
- debugC(3, kDebugLoading, "Score::loadCastData(): loaded kCastText (%d)", res->children.size());
break;
case kCastShape:
+ debugC(3, kDebugLoading, "Score::loadCastData(): loading kCastShape (%d children)", res->children.size());
_loadedCast->setVal(id, new ShapeCast(castStream, _vm->getVersion()));
- debugC(3, kDebugLoading, "Score::loadCastData(): loaded kCastShape (%d)", res->children.size());
break;
case kCastButton:
+ debugC(3, kDebugLoading, "Score::loadCastData(): loading kCastButton (%d children)", res->children.size());
_loadedCast->setVal(id, new ButtonCast(castStream, _vm->getVersion()));
- debugC(3, kDebugLoading, "Score::loadCastData(): loaded kCastButton (%d)", res->children.size());
break;
case kCastLingoScript:
+ debugC(3, kDebugLoading, "Score::loadCastData(): loading kCastLingoScript");
_loadedCast->setVal(id, new ScriptCast(castStream, _vm->getVersion()));
- debugC(3, kDebugLoading, "Score::loadCastData(): loaded kCastLingoScript");
break;
case kCastRTE:
+ debugC(3, kDebugLoading, "Score::loadCastData(): loading kCastRTE (%d children)", res->children.size());
_loadedCast->setVal(id, new RTECast(castStream, _vm->getVersion()));
- debugC(3, kDebugLoading, "Score::loadCastData(): loaded kCastRTE (%d)", res->children.size());
break;
case kCastFilmLoop:
- warning("STUB: Score::loadCastData(): kCastFilmLoop (%d)", res->children.size());
+ warning("STUB: Score::loadCastData(): kCastFilmLoop (%d children)", res->children.size());
size2 = 0;
break;
case kCastPalette:
- warning("STUB: Score::loadCastData(): kCastPalette (%d)", res->children.size());
+ warning("STUB: Score::loadCastData(): kCastPalette (%d children)", res->children.size());
size2 = 0;
break;
case kCastPicture:
- warning("STUB: Score::loadCastData(): kCastPicture (%d)", res->children.size());
+ warning("STUB: Score::loadCastData(): kCastPicture (%d children)", res->children.size());
size2 = 0;
break;
case kCastSound:
- warning("STUB: Score::loadCastData(): kCastSound (%d)", res->children.size());
+ warning("STUB: Score::loadCastData(): kCastSound (%d children)", res->children.size());
size2 = 0;
break;
case kCastMovie:
- warning("STUB: Score::loadCastData(): kCastMovie (%d)", res->children.size());
+ warning("STUB: Score::loadCastData(): kCastMovie (%d children)", res->children.size());
size2 = 0;
break;
case kCastDigitalVideo:
- warning("STUB: Score::loadCastData(): kCastDigitalVideo (%d)", res->children.size());
+ warning("STUB: Score::loadCastData(): kCastDigitalVideo (%d children)", res->children.size());
size2 = 0;
break;
default:
- warning("Score::loadCastData(): Unhandled cast type: %d [%s]", castType, tag2str(castType));
+ warning("Score::loadCastData(): Unhandled cast type: %d [%s] (%d children)", castType, tag2str(castType), res->children.size());
// also don't try and read the strings... we don't know what this item is.
size2 = 0;
break;
}
- if (_loadedCast->contains(id)) // Skip unhandled casts
- for (uint child = 0; child < res->children.size(); child++)
+ if (_loadedCast->contains(id)) { // Skip unhandled casts
+ debugCN(3, kDebugLoading, "Children: ");
+ for (uint child = 0; child < res->children.size(); child++) {
+ debugCN(3, kDebugLoading, "%d ", res->children[child].index);
_loadedCast->getVal(id)->_children.push_back(res->children[child]);
+ }
+ debugCN(3, kDebugLoading, "\n");
+ }
free(data);
Commit: a35c01edcbd3a3ef0e10286bd7016242536e8150
https://github.com/scummvm/scummvm/commit/a35c01edcbd3a3ef0e10286bd7016242536e8150
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-02-26T21:16:18+01:00
Commit Message:
DIRECTOR: Fixed loading bitmap cast in D4+
Changed paths:
engines/director/score.cpp
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index c205232f3d..220f461b4d 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -310,20 +310,23 @@ void Score::loadSpriteImages(bool isSharedCast) {
uint16 imgId = c->_key;
uint16 realId;
+ Image::ImageDecoder *img = NULL;
+ Common::SeekableReadStream *pic = NULL;
+
if (_vm->getVersion() >= 4 && bitmapCast->_children.size() > 0) {
imgId = bitmapCast->_children[0].index;
tag = bitmapCast->_children[0].tag;
- }
- Image::ImageDecoder *img = NULL;
- Common::SeekableReadStream *pic = NULL;
-
- if (_loadedCast->contains(imgId)) {
- bitmapCast->_tag = tag = ((BitmapCast *)_loadedCast->getVal(imgId))->_tag;
- realId = imgId + _castIDoffset;
- pic = _movieArchive->getResource(tag, realId);
- } else if (sharedScore) {
- if (sharedScore->_loadedCast && sharedScore->_loadedCast->contains(imgId)) {
+ if (_movieArchive->hasResource(tag, imgId))
+ pic = _movieArchive->getResource(tag, imgId);
+ else if (sharedScore && sharedScore->getArchive()->hasResource(tag, imgId))
+ pic = sharedScore->getArchive()->getResource(tag, imgId);
+ } else {
+ if (_loadedCast->contains(imgId)) {
+ bitmapCast->_tag = tag = ((BitmapCast *)_loadedCast->getVal(imgId))->_tag;
+ realId = imgId + _castIDoffset;
+ pic = _movieArchive->getResource(tag, realId);
+ } else if (sharedScore && sharedScore->_loadedCast && sharedScore->_loadedCast->contains(imgId)) {
bitmapCast->_tag = tag = ((BitmapCast *)sharedScore->_loadedCast->getVal(imgId))->_tag;
realId = imgId + sharedScore->_castIDoffset;
pic = sharedScore->getArchive()->getResource(tag, realId);
More information about the Scummvm-git-logs
mailing list