From 2502038e73e19dd5cf819834369fffa6e86caa7d Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Tue, 25 May 2010 12:53:35 +0000 Subject: SCI: sci1.1 uses hardcoded white for picture cel data instead of the value specified in header - fixes pixel glitches in island of dr. brain title, sq4 title and qfg3 room during intro svn-id: r49213 --- engines/sci/graphics/picture.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'engines/sci/graphics/picture.h') diff --git a/engines/sci/graphics/picture.h b/engines/sci/graphics/picture.h index 3374c33b52..ba6052b059 100644 --- a/engines/sci/graphics/picture.h +++ b/engines/sci/graphics/picture.h @@ -32,6 +32,12 @@ namespace Sci { #define SCI_PATTERN_CODE_USE_TEXTURE 0x20 #define SCI_PATTERN_CODE_PENSIZE 0x07 +enum { + SCI_PICTURE_CELTYPE_REGULAR = 0, + SCI_PICTURE_CELTYPE_SCI11 = 1, + SCI_PICTURE_CELTYPE_SCI32 = 2 +}; + class GfxPorts; class GfxScreen; class GfxPalette; @@ -57,7 +63,7 @@ private: void initData(GuiResourceId resourceId); void reset(); void drawSci11Vga(); - void drawCelData(byte *inbuffer, int size, int headerPos, int rlePos, int literalPos, int16 callerX, int16 callerY, bool hasSci32Header); + void drawCelData(byte *inbuffer, int size, int headerPos, int rlePos, int literalPos, int16 callerX, int16 callerY, int celType); void drawVectorData(byte *data, int size); bool vectorIsNonOpcode(byte pixel); void vectorGetAbsCoords(byte *data, int &curPos, int16 &x, int16 &y); -- cgit v1.2.3 From aa8c6377a5cb8c51717f6bcf1ffc950c6c837021 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Tue, 25 May 2010 18:45:25 +0000 Subject: SCI: error out on pattern opcodes inside vector data when drawing pictures in sci1.1+, also adding workaround for garbage data inside picture 381 in sq4 svn-id: r49216 --- engines/sci/graphics/picture.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'engines/sci/graphics/picture.h') diff --git a/engines/sci/graphics/picture.h b/engines/sci/graphics/picture.h index ba6052b059..5a86539b37 100644 --- a/engines/sci/graphics/picture.h +++ b/engines/sci/graphics/picture.h @@ -33,9 +33,9 @@ namespace Sci { #define SCI_PATTERN_CODE_PENSIZE 0x07 enum { - SCI_PICTURE_CELTYPE_REGULAR = 0, - SCI_PICTURE_CELTYPE_SCI11 = 1, - SCI_PICTURE_CELTYPE_SCI32 = 2 + SCI_PICTURE_TYPE_REGULAR = 0, + SCI_PICTURE_TYPE_SCI11 = 1, + SCI_PICTURE_TYPE_SCI32 = 2 }; class GfxPorts; @@ -63,7 +63,7 @@ private: void initData(GuiResourceId resourceId); void reset(); void drawSci11Vga(); - void drawCelData(byte *inbuffer, int size, int headerPos, int rlePos, int literalPos, int16 callerX, int16 callerY, int celType); + void drawCelData(byte *inbuffer, int size, int headerPos, int rlePos, int literalPos, int16 callerX, int16 callerY); void drawVectorData(byte *data, int size); bool vectorIsNonOpcode(byte pixel); void vectorGetAbsCoords(byte *data, int &curPos, int16 &x, int16 &y); @@ -86,6 +86,7 @@ private: int16 _resourceId; Resource *_resource; + int _resourceType; int16 _animationNr; bool _mirroredFlag; -- cgit v1.2.3