Author Topic: The Plot [Pen Style] Thickens  (Read 916 times)

0 Members and 2 Guests are viewing this topic.

Offline AGKorson

The Plot [Pen Style] Thickens
« on: March 25, 2026, 03:18:30 AM »
I'm almost ready to release the Beta version of WinAGI 3.0. Just a bit more code clean up and a few more tweaks on the Help file.

As part of working on the Help file, I've gone back to the decompiled code to make sure I have the most accurate information possible on AGI's resources, commands, and functions. I've discovered quite a few more bugs (mostly only noticeable in specific edge cases). But the one that really surprised me the most was the evolution of the Plot Styles.

It's well documented that the Plot command (0xFA) for pictures was added in version 2.411. In that initial version, the Plot Style command (0xF9) was ignored; using it in that version did nothing, and all plot commands drew as a single pixel.

In version 2.425, Sierra added support for the Plot Style command. But it came with three bugs:
  • The pen was not reset before drawing a picture; this meant that if another picture was drawn later, the starting pen would be the last value from the previous picture, not the default of solid circle of size zero.
  • The algorithm to calculate the brush placement had an error which resulted in the larger brushes being off-center.
  • The mask data for brush size 1 was missing the bottom row of data, so circle brush size 1 was not drawn correctly.





In version 2.426 the pen reset bug was fixed, and the circle masks were refactored, but the circle 1 brush was still missing data. This affected the shape of circle 1.


In version 2.435, the brush placement error was fixed, but the circle 1 bug remained.




The circle 1 bug was fixed in version 2.439. The rest of the version 2 AGI releases all used the correct brush size and shape.


In version 3.002.086, the circle 1 brush data was changed again, but it was done incorrectly, resulting in the brush shape once again being incorrect.

The incorrect circle 1 brush remained the same for all version 3 releases.

It was a big surprise for me when I discovered all this- I had always assumed there was just one version of the plot brushes. But since most fan games probably are only ever run on modern interpreters (or are using the more common late v2 interpreters when using DOSBox) I guess it's not too surprising that this has not been noticed before.

I am now very curious to know if there are any older Sierra games that used the plot commands in the versions with different brushes; are there some that are being drawn incorrectly in modern interpreters when compared to their original release? I'm guessing there aren't that many Sierra games released that used the affected plot commands often enough for the error to be noticed.

Regardless, I do plan on adding the option to use the version-correct brush sizes when drawing and displaying pictures in WinAGI. It'll give a true representation of what pictures would look like if they are used in the original Sierra AGI version they are targeting.



Offline Kawa

Re: The Plot [Pen Style] Thickens
« Reply #1 on: March 25, 2026, 08:56:43 AM »
That's quite a find. Congratulations!

Offline lskovlun

Re: The Plot [Pen Style] Thickens
« Reply #2 on: March 25, 2026, 08:48:23 PM »
I think there would be more than one table in ScummVM if this had a practical impact (sluicebox does lurk here, he sent me fan mail once). So no worries, is my take.

Offline Kawa

Re: The Plot [Pen Style] Thickens
« Reply #3 on: March 26, 2026, 04:48:09 AM »
One week later, there are multiple pen tables in ScummVM. Mark my words.

*My beleaguered manservant Mark hands me my dictionary*

Offline lskovlun

Re: The Plot [Pen Style] Thickens
« Reply #4 on: April 02, 2026, 06:25:38 PM »
The date came and went.

Offline Kawa

Re: The Plot [Pen Style] Thickens
« Reply #5 on: April 03, 2026, 03:23:57 AM »
Well, I guess I gotta eat my words now.



*nom*


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.104 seconds with 21 queries.