[Scummvm-git-logs] scummvm master -> 1c7ad58f386b0a9b2b054249c69a3e862728298b
dreammaster
noreply at scummvm.org
Sun May 31 07:06:12 UTC 2026
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
1c7ad58f38 MADS: DRAGONSPHERE: Overrun workaround in Hightower beast attack cutscene
Commit: 1c7ad58f386b0a9b2b054249c69a3e862728298b
https://github.com/scummvm/scummvm/commit/1c7ad58f386b0a9b2b054249c69a3e862728298b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-05-31T17:05:50+10:00
Commit Message:
MADS: DRAGONSPHERE: Overrun workaround in Hightower beast attack cutscene
Changed paths:
engines/mads/madsv2/core/conv.cpp
engines/mads/madsv2/core/matte.cpp
diff --git a/engines/mads/madsv2/core/conv.cpp b/engines/mads/madsv2/core/conv.cpp
index b15f60d864d..f4801ebfd76 100644
--- a/engines/mads/madsv2/core/conv.cpp
+++ b/engines/mads/madsv2/core/conv.cpp
@@ -118,10 +118,9 @@ void ConvVariable::load(Common::SeekableReadStream *src) {
type = src->readSint16LE();
if (flag == 0xffff) {
- // Original shouldn't have pointer variables by default, except for
- // some placeholder entries in the Manager's Office, which have
- // matching segment & offset values. So are obviously not used
- assert(val == type);
+ // Originals can have placeholder entries for pointers. Such as for Phantom in Manager's Office,
+ // and in Dragonsphere at the Hightower entrance. For ScummVM we simply reset them to be
+ // standard immediate values until such time as a proper pointer is set
val = type = 0;
} else if (isPtr) {
diff --git a/engines/mads/madsv2/core/matte.cpp b/engines/mads/madsv2/core/matte.cpp
index 2bbd16c705b..e6aa7f8c0b6 100644
--- a/engines/mads/madsv2/core/matte.cpp
+++ b/engines/mads/madsv2/core/matte.cpp
@@ -903,9 +903,13 @@ void matte_frame(int special_effect, int full_screen) {
y = image_list[id2].y - picture_map.pan_y - (sprite->ys - 1);
}
if ((image_list[id2].depth <= 1) && !matte_guard_depth_0) {
- sprite_draw(series_list[image_list[id2].series_id],
- image_list[id2].sprite_id,
- &scr_work, x, y);
+ // WORKAROUND: Only allow sprites within limits, avoiding crash in Dragonsphere
+ // Hightower cutscene when attacking monster
+ SeriesPtr s = series_list[image_list[id2].series_id];
+ if (image_list[id2].sprite_id <= s->num_sprites)
+ sprite_draw(series_list[image_list[id2].series_id],
+ image_list[id2].sprite_id,
+ &scr_work, x, y);
} else {
sprite_draw_3d_big(series_list[image_list[id2].series_id],
image_list[id2].sprite_id,
More information about the Scummvm-git-logs
mailing list