[Scummvm-tracker] [ScummVM :: Bugs] #11923: AGI Splatter patterns appear to be incorrect
ScummVM :: Bugs
trac at scummvm.org
Wed Oct 28 06:46:24 UTC 2020
#11923: AGI Splatter patterns appear to be incorrect
--------------------+-------------------------
Reporter: rwtodd | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: Engine: AGI
Keywords: agi pic | Game:
--------------------+-------------------------
When I take, for example, Space Quest 2 room 16 or room 22, and compare
the ScummVM image to the game running in DosBox, I can see that the
splatter patterns are all wrong in the trees in the background.
I think way back in github commmit 0d279e8de07fc5 when the AGI splatter
plotting was redone, the texture_number variable accidentally got hard-
coded to 0. In fact, the texture number should start as the pattern
number pulled in plotBrush() (notice: the code at present does nothing
with _patNum, which is a clue something isn't right).
I think maybe the resulting plot errors were why a subsequent commit
changed the ditherCond from 2 to 1. I believe that was incorrect and
should be reverted.
To make the games I have look like the original, I believe the following
changes are needed:
1) make plotBrush() store the raw byte it reads in _patNum (forget the >>1
and &0x7f part... that's left over from an older table-based approach to
splatter).
2) in plotPattern(), initialize `t` to (_patNum | 0x01) and forget the
zero texture_num.
3) in plotPattern(), change ditherCond back to 2 like it was originally.
I don't have an exhaustive list of games to test this with, but the few
AGI games I have which use splatter plots look more accurate to me after
these changes. If people agree it's an improvement, I can offer a pull
request on github, or I'm just as happy if one of the usual devs makes the
fix.
As further evidence, I believe nagi's pic_render.c agrees with the changes
I'm suggesting.
(https://github.com/sonneveld/nagi/blob/master/src/picture/pic_render.c).
It sets texture_num in plot_with_pen(), and I think in the translation to
scummvm, texture_num got converted to a local var and always set to zero.
--
Ticket URL: <https://bugs.scummvm.org/ticket/11923>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list