[Scummvm-git-logs] scummvm master -> 3469c0ab9ae6ed4f3a5be151dda4fac3fe98876a
dreammaster
noreply at scummvm.org
Tue Aug 4 12:08:24 UTC 2026
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
fba8de799b MADS: NEBULAR: Properly set matte_guard_depth_0 in anim_load_background
a880b93c73 MADS: NEBULAR: In progress animview fixes
715fa88ed4 MADS: NEBULAR: Ship animation now showing in intro cutscene
3469c0ab9a MADS: NEBULAR: Work around invalid sprite number
Commit: fba8de799b341d8517f3568a8b1fdb1192cba9a3
https://github.com/scummvm/scummvm/commit/fba8de799b341d8517f3568a8b1fdb1192cba9a3
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-08-04T21:19:24+10:00
Commit Message:
MADS: NEBULAR: Properly set matte_guard_depth_0 in anim_load_background
Changed paths:
engines/mads/core/anim.cpp
engines/mads/core/matte.cpp
diff --git a/engines/mads/core/anim.cpp b/engines/mads/core/anim.cpp
index 90d4bf3661b..cc537e7ae7b 100644
--- a/engines/mads/core/anim.cpp
+++ b/engines/mads/core/anim.cpp
@@ -126,6 +126,8 @@ int anim_load_background(AnimFile *anim_in, Buffer *this_orig,
if (my_room == NULL) {
error_flag = true;
} else {
+ matte_guard_depth_0 = my_room->format == 2 ? 1 : 0;
+
if (cycle_list != NULL) {
memcpy(cycle_list, &my_room->cycle_list, sizeof(CycleList));
}
diff --git a/engines/mads/core/matte.cpp b/engines/mads/core/matte.cpp
index a7c62a03c4c..83481d5fd89 100644
--- a/engines/mads/core/matte.cpp
+++ b/engines/mads/core/matte.cpp
@@ -175,7 +175,6 @@ int matte_load_series(const char *name, int load_flags, int bonus_series_number)
}
if (!found) {
-
series = sprite_series_load(name, load_flags);
if (series == NULL) {
goto done;
@@ -662,7 +661,18 @@ void matte_frame(int special_effect, int full_screen) {
y -= (sprite->ys - 1);
}
- if ((image->depth <= 1) && !matte_guard_depth_0) {
+ if (g_engine->getGameID() == GType_RexNebular) {
+ if (image->depth <= 1)
+ sprite_draw(series_list[image->series_id], image->sprite_id,
+ &scr_orig, x, y);
+ else if (!matte_guard_depth_0)
+ sprite_draw_3d_x16(series_list[image->series_id],
+ image->sprite_id, &scr_orig, &scr_depth, x, y, image->depth);
+ else
+ sprite_draw_3d_big(series_list[image->series_id], image->sprite_id,
+ &scr_orig, &scr_depth, x, y, image->depth, 0, 0);
+
+ } else if ((image->depth <= 1) && !matte_guard_depth_0) {
sprite_draw(series_list[image->series_id], image->sprite_id,
&scr_orig,
x - picture_map.pan_base_x,
Commit: a880b93c73ffa291c36fc1137bd9babb0feef86a
https://github.com/scummvm/scummvm/commit/a880b93c73ffa291c36fc1137bd9babb0feef86a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-08-04T21:19:24+10:00
Commit Message:
MADS: NEBULAR: In progress animview fixes
Changed paths:
engines/mads/animview/animview.cpp
diff --git a/engines/mads/animview/animview.cpp b/engines/mads/animview/animview.cpp
index b0114558212..b18ac206f49 100644
--- a/engines/mads/animview/animview.cpp
+++ b/engines/mads/animview/animview.cpp
@@ -250,7 +250,7 @@ static void run_animation(int animIndex) {
bool flag1 = false;
if (!seriesFlag1) {
- if ((largeBufferEnd - largeBuffer2) <= pageMemNeeded) {
+ if ((largeBufferEnd - largeBuffer2) >= pageMemNeeded) {
flag1 = true;
} else {
seriesFlag1 = true;
@@ -258,7 +258,7 @@ static void run_animation(int animIndex) {
}
}
if (seriesFlag1) {
- if ((largeBuffer2 - largeBuffer1) <= pageMemNeeded)
+ if ((largeBuffer2 - largeBuffer1) > pageMemNeeded)
flag1 = true;
}
@@ -530,6 +530,7 @@ static void animate() {
}
}
+ // Handling for sprite series that have individually packed frames
if (current_anim->misc_any_packed) {
largeBufferSize = 0xfffff; // Aribitrarily large value
largeBuffer = (byte *)mem_get(largeBufferSize);
@@ -557,7 +558,7 @@ static void animate() {
Image &img = current_anim->image[imageIndex];
imageFrame1 = imageFrame2 = img.flags;
seriesMinFrame = img.flags - 1;
- seriesMaxFrame = img.flags + img.sprite_id - 1;
+ seriesMaxFrame = img.flags + animSeries->num_sprites - 1;
}
}
Commit: 715fa88ed4927c9914f36a4a42deb4aa6f800aa6
https://github.com/scummvm/scummvm/commit/715fa88ed4927c9914f36a4a42deb4aa6f800aa6
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-08-04T21:19:24+10:00
Commit Message:
MADS: NEBULAR: Ship animation now showing in intro cutscene
Changed paths:
engines/mads/animview/anim_timer.cpp
diff --git a/engines/mads/animview/anim_timer.cpp b/engines/mads/animview/anim_timer.cpp
index 25572223947..5bd7cdf2793 100644
--- a/engines/mads/animview/anim_timer.cpp
+++ b/engines/mads/animview/anim_timer.cpp
@@ -45,7 +45,7 @@ static int palIndex1, palIndex2;
static int matteId;
static int normalTimer1, imageCount;
static int messageCount;
-static int16 panOffsetX, panOffsetY;
+static int16 panningX, panningY;
void anim_timer_init() {
paletteHandle = 0;
@@ -53,7 +53,7 @@ void anim_timer_init() {
matteId = 0;
normalTimer1 = messageCount = 0;
currentViewX = currentViewY = 0;
- panOffsetX = panOffsetY = 0;
+ panningX = panningY = 0;
normalTimer1 = imageCount = 0;
}
@@ -159,21 +159,23 @@ block1:
}
block2:
- panOffsetX = current_anim->frame[currentFrame].view_x;
- panOffsetY = current_anim->frame[currentFrame].view_y;
+ panningX = current_anim->frame[currentFrame].view_x;
+ panningY = current_anim->frame[currentFrame].view_y;
- if (panOffsetX != currentViewX || panOffsetY != currentViewY) {
- currentViewX = panOffsetX;
- currentViewY = panOffsetY;
+ if (panningX != currentViewX || panningY != currentViewY) {
+ currentViewX = panningX;
+ currentViewY = panningY;
if (g_engine->getGameID() != GType_RexNebular && !picture_map.one_to_one) {
// Handle panning the background, which also sets the pan_offset_x/y
- tile_pan(&picture_map, panOffsetX, panOffsetY);
- tile_pan(&depth_map, panOffsetX, panOffsetY);
+ tile_pan(&picture_map, panningX, panningY);
+ tile_pan(&depth_map, panningX, panningY);
} else if (g_engine->getGameID() == GType_RexNebular) {
- // Set the panning offset for the background
- picture_map.pan_offset_x = panOffsetX;
- picture_map.pan_offset_y = panOffsetY;
+ // Set the panning position
+ picture_map.pan_x = panningX;
+ picture_map.pan_y = panningY;
+ picture_map.pan_offset_x = panningX;
+ picture_map.pan_offset_y = panningY;
for (count = 0; count < image_marker; ++count) {
Image &img = image_list[count];
Commit: 3469c0ab9ae6ed4f3a5be151dda4fac3fe98876a
https://github.com/scummvm/scummvm/commit/3469c0ab9ae6ed4f3a5be151dda4fac3fe98876a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-08-04T22:08:06+10:00
Commit Message:
MADS: NEBULAR: Work around invalid sprite number
Changed paths:
engines/mads/core/matte.cpp
diff --git a/engines/mads/core/matte.cpp b/engines/mads/core/matte.cpp
index 83481d5fd89..3dc6104a2fc 100644
--- a/engines/mads/core/matte.cpp
+++ b/engines/mads/core/matte.cpp
@@ -815,6 +815,12 @@ void matte_frame(int special_effect, int full_screen) {
if (image_list[id2].series_id == (byte)-1)
continue;
+ // WORKAROUND: Only allow sprites within limits, avoiding crash in Dragonsphere
+ // Hightower cutscene when attacking monster, and Rex intro
+ const SeriesPtr s = series_list[image_list[id2].series_id];
+ if (image_list[id2].sprite_id > s->num_sprites)
+ continue;
+
// Draw the sprite into the work buffer at the appropriate depth
if (image_list[id2].scale >= 100) {
if (image_list[id2].scale == IMAGE_UNSCALED) {
@@ -826,13 +832,9 @@ 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) {
- // 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);
+ 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