[Scummvm-git-logs] scummvm master -> 2e309f685e2e333d2dda782c2fa205601ed31934

dreammaster noreply at scummvm.org
Sun Apr 26 06:42:01 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:
2e309f685e MADS: PHANTOM: Fix sprites paritally overwriting conversation dialogs


Commit: 2e309f685e2e333d2dda782c2fa205601ed31934
    https://github.com/scummvm/scummvm/commit/2e309f685e2e333d2dda782c2fa205601ed31934
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-04-26T16:41:53+10:00

Commit Message:
MADS: PHANTOM: Fix sprites paritally overwriting conversation dialogs

Changed paths:
    engines/mads/madsv2/core/sprite_0.cpp


diff --git a/engines/mads/madsv2/core/sprite_0.cpp b/engines/mads/madsv2/core/sprite_0.cpp
index fca49d5ec02..fb6a3505140 100644
--- a/engines/mads/madsv2/core/sprite_0.cpp
+++ b/engines/mads/madsv2/core/sprite_0.cpp
@@ -527,9 +527,9 @@ ys = sprite->ys;
 
 #ifdef attribute
 								{
-									byte sprite_depth_bits = depth_code;
+									byte sprite_depth_bits = draw_depth;  /* write target depth, not current depth */
 									byte stored_depth = draw_depth;
-									if (stored_depth > bit_off)  /* reusing bit_off as shift here per asm */
+									if (stored_depth > shift)  /* original asm compared against shift (0 or 4), not bit_off (which can be -1) */
 										goto pixel_DUMP_no_attr;
 									full_attr_byte = (full_attr_byte & 0xf0) | sprite_depth_bits;
 									/* ror full_attr_byte, shift */
@@ -691,8 +691,8 @@ pixel_RLE:
 #ifdef attribute
 									{
 										byte full_ab = attr_byte;
-										byte sprite_d = attr_byte & 0x0f;
-										if (draw_depth > bit_off)  goto pixel_RLE_no_attr;
+										byte sprite_d = draw_depth;  /* write target depth, not current depth */
+										if (draw_depth > shift)  goto pixel_RLE_no_attr;  /* original asm compared against shift (0 or 4), not bit_off */
 										full_ab = (full_ab & 0xf0) | sprite_d;
 										full_ab = (byte)((full_ab >> shift) | (full_ab << (8 - shift)));
 										attr_row[byte_off] = full_ab;
@@ -863,8 +863,8 @@ pixel_IRLE:
 #ifdef attribute
 									{
 										byte full_ab = attr_byte;
-										byte sprite_d = attr_byte & 0x0f;
-										if (draw_depth > bit_off)  goto pixel_IRLE_run_no_attr;
+										byte sprite_d = draw_depth;  /* write target depth, not current depth */
+										if (draw_depth > shift)  goto pixel_IRLE_run_no_attr;  /* original asm compared against shift (0 or 4), not bit_off */
 										full_ab = (full_ab & 0xf0) | sprite_d;
 										full_ab = (byte)((full_ab >> shift) | (full_ab << (8 - shift)));
 										attr_row[byte_off] = full_ab;
@@ -1005,8 +1005,8 @@ pixel_IRLE_run_next:
 #ifdef attribute
 								{
 									byte full_ab = attr_byte;
-									byte sprite_d = attr_byte & 0x0f;
-									if (draw_depth > bit_off)  goto pixel_IRLE_image_no_attr;
+									byte sprite_d = draw_depth;  /* write target depth, not current depth */
+									if (draw_depth > shift)  goto pixel_IRLE_image_no_attr;  /* original asm compared against shift (0 or 4), not bit_off */
 									full_ab = (full_ab & 0xf0) | sprite_d;
 									full_ab = (byte)((full_ab >> shift) | (full_ab << (8 - shift)));
 									attr_row[byte_off] = full_ab;




More information about the Scummvm-git-logs mailing list