[Scummvm-git-logs] scummvm master -> 466795d84c2b02a8470741b75574381a64b2c5c8
dreammaster
noreply at scummvm.org
Mon Aug 3 09:04:11 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:
466795d84c MADS: NEBULAR: Fix background panning in intro
Commit: 466795d84c2b02a8470741b75574381a64b2c5c8
https://github.com/scummvm/scummvm/commit/466795d84c2b02a8470741b75574381a64b2c5c8
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-08-03T19:04:03+10:00
Commit Message:
MADS: NEBULAR: Fix background panning in intro
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 867693a9e13..25572223947 100644
--- a/engines/mads/animview/anim_timer.cpp
+++ b/engines/mads/animview/anim_timer.cpp
@@ -45,15 +45,15 @@ static int palIndex1, palIndex2;
static int matteId;
static int normalTimer1, imageCount;
static int messageCount;
-static int frameViewX, frameViewY;
+static int16 panOffsetX, panOffsetY;
void anim_timer_init() {
paletteHandle = 0;
palIndex1 = palIndex2 = 0;
matteId = 0;
normalTimer1 = messageCount = 0;
- frameViewX = frameViewY = 0;
currentViewX = currentViewY = 0;
+ panOffsetX = panOffsetY = 0;
normalTimer1 = imageCount = 0;
}
@@ -159,20 +159,33 @@ block1:
}
block2:
- frameViewX = current_anim->frame[currentFrame].view_x;
- frameViewY = current_anim->frame[currentFrame].view_y;
+ panOffsetX = current_anim->frame[currentFrame].view_x;
+ panOffsetY = current_anim->frame[currentFrame].view_y;
+
+ if (panOffsetX != currentViewX || panOffsetY != currentViewY) {
+ currentViewX = panOffsetX;
+ currentViewY = panOffsetY;
- if (frameViewX != currentViewX || frameViewY != currentViewY) {
if (g_engine->getGameID() != GType_RexNebular && !picture_map.one_to_one) {
- tile_pan(&picture_map, frameViewX, frameViewY);
- tile_pan(&depth_map, frameViewX, frameViewY);
+ // Handle panning the background, which also sets the pan_offset_x/y
+ tile_pan(&picture_map, panOffsetX, panOffsetY);
+ tile_pan(&depth_map, panOffsetX, panOffsetY);
+ } 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;
+
+ for (count = 0; count < image_marker; ++count) {
+ Image &img = image_list[count];
+ if (img.flags != IMAGE_REFRESH)
+ img.flags = IMAGE_ERASE;
+ }
}
image_marker = 1;
image_list[0].flags = IMAGE_REFRESH;
image_list[0].segment_id = 0xff;
- currentViewX = frameViewX;
- currentViewY = frameViewY;
+
} else {
for (count = 0; count < image_marker; ++count) {
if (image_list[count].flags != IMAGE_REFRESH)
More information about the Scummvm-git-logs
mailing list