[Scummvm-git-logs] scummvm master -> 96d0d298e4598fbd3472ee29594894de8de9230e
dreammaster
noreply at scummvm.org
Thu Oct 8 10:56:00 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:
96d0d298e4 MADS: FOREST: Fix for attribute depth sprite drawing.
Commit: 96d0d298e4598fbd3472ee29594894de8de9230e
https://github.com/scummvm/scummvm/commit/96d0d298e4598fbd3472ee29594894de8de9230e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-10-08T21:55:02+11:00
Commit Message:
MADS: FOREST: Fix for attribute depth sprite drawing.
Fixes bug #17283. Based on possible cause provided by Tropp.
Assisted-By: Claude Code:Sonnet 5.5
Changed paths:
engines/mads/core/sprite_0.cpp
diff --git a/engines/mads/core/sprite_0.cpp b/engines/mads/core/sprite_0.cpp
index 31c92f461d1..387cf7cf75d 100644
--- a/engines/mads/core/sprite_0.cpp
+++ b/engines/mads/core/sprite_0.cpp
@@ -504,13 +504,13 @@ ys = sprite->ys;
if (mirror == 1) {
int rem = attr_col & 1;
byte_off = attr_col / 2;
- bit_off = (-(rem)+attr_start);
+ bit_off = rem + attr_start;
if (bit_off > 1) {
byte_off++; bit_off &= 1;
}
} else {
byte_off = -(attr_col / 2);
- bit_off = attr_col + attr_start; /* Note: attr_start set at row start for mirror */
+ bit_off = attr_start - (attr_col & 1);
if (bit_off < 0) {
byte_off--; bit_off += 2;
}
@@ -677,13 +677,13 @@ pixel_RLE:
if (mirror == 1) {
int rem = attr_col & 1;
byte_off = attr_col / 2;
- bit_off = (-rem) + attr_start;
+ bit_off = rem + attr_start;
if (bit_off > 1) {
byte_off++; bit_off &= 1;
}
} else {
byte_off = -(attr_col / 2);
- bit_off = attr_col + attr_start;
+ bit_off = attr_start - (attr_col & 1);
if (bit_off < 0) {
byte_off--; bit_off += 2;
}
@@ -848,13 +848,13 @@ pixel_IRLE:
if (mirror == 1) {
int rem = attr_col & 1;
byte_off = attr_col / 2;
- bit_off = (-rem) + attr_start;
+ bit_off = rem + attr_start;
if (bit_off > 1) {
byte_off++; bit_off &= 1;
}
} else {
byte_off = -(attr_col / 2);
- bit_off = attr_col + attr_start;
+ bit_off = attr_start - (attr_col & 1);
if (bit_off < 0) {
byte_off--; bit_off += 2;
}
@@ -989,13 +989,13 @@ pixel_IRLE_run_next:
if (mirror == 1) {
int rem = attr_col & 1;
byte_off = attr_col / 2;
- bit_off = (-rem) + attr_start;
+ bit_off = rem + attr_start;
if (bit_off > 1) {
byte_off++; bit_off &= 1;
}
} else {
byte_off = -(attr_col / 2);
- bit_off = attr_col + attr_start;
+ bit_off = attr_start - (attr_col & 1);
if (bit_off < 0) {
byte_off--; bit_off += 2;
}
More information about the Scummvm-git-logs
mailing list