Skip to content

Commit

Permalink
SCI: Fix incorrect values in vector texture table
Browse files Browse the repository at this point in the history
Fixes incorrect values that trace back to SCI Decoder in 1992.

These caused subtle inaccuracies when drawing EGA vector pictures
with certain texture patterns. In SQ3 there are two of these
surrounding the escape pod in picture 2 in the first room.

Thanks to @eientei95 for spotting the picture discrepancy!
  • Loading branch information
sluicebox committed Mar 2, 2022
1 parent 3f9cba9 commit 4c369d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions engines/sci/graphics/picture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,7 @@ static const bool vectorPatternTextures[32 * 8 * 2] = {
// Bit offsets into pattern_textures
static const byte vectorPatternTextureOffset[128] = {
0x00, 0x18, 0x30, 0xc4, 0xdc, 0x65, 0xeb, 0x48,
0x60, 0xbd, 0x89, 0x05, 0x0a, 0xf4, 0x7d, 0x7d,
0x60, 0xbd, 0x89, 0x04, 0x0a, 0xf4, 0x7d, 0x6d,
0x85, 0xb0, 0x8e, 0x95, 0x1f, 0x22, 0x0d, 0xdf,
0x2a, 0x78, 0xd5, 0x73, 0x1c, 0xb4, 0x40, 0xa1,
0xb9, 0x3c, 0xca, 0x58, 0x92, 0x34, 0xcc, 0xce,
Expand All @@ -1049,7 +1049,7 @@ static const byte vectorPatternTextureOffset[128] = {
0xbe, 0x05, 0xf5, 0x6e, 0x19, 0xc5, 0x66, 0x49,
0xf0, 0xd1, 0x54, 0xa9, 0x70, 0x4b, 0xa4, 0xe2,
0xe6, 0xe5, 0xab, 0xe4, 0xd2, 0xaa, 0x4c, 0xe3,
0x06, 0x6f, 0xc6, 0x4a, 0xa4, 0x75, 0x97, 0xe1
0x06, 0x6f, 0xc6, 0x4a, 0x75, 0xa3, 0x97, 0xe1
};

void GfxPicture::vectorPatternBox(Common::Rect box, byte color, byte prio, byte control) {
Expand Down

4 comments on commit 4c369d5

@sluicebox
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional thanks to @Kawa-oneechan who I've since learned was the original discoverer of these bugs. Good eye catching those wandering pixels!

@Kawa-oneechan
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guess I'm updating the blog post...

@sluicebox
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe with an SCI Studio pic too...

@Kawa-oneechan
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awww but SCI Studio suuuucks

pffft okay lol here, it's a distinctive third variant:
studio
The other two are the same as SCI Companion and ScummVM used to be.

Please sign in to comment.