From 3a64d35dfd9126d7912c4d4496030f7ed120d660 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Thu, 4 Jun 2009 01:05:47 +0000 Subject: Add 16bit color support for later HE games. svn-id: r41153 --- engines/scumm/gfx.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/scumm/gfx.h') diff --git a/engines/scumm/gfx.h b/engines/scumm/gfx.h index e4c1054450..88852c8388 100644 --- a/engines/scumm/gfx.h +++ b/engines/scumm/gfx.h @@ -155,11 +155,11 @@ struct VirtScreen : Graphics::Surface { } byte *getPixels(int x, int y) const { - return (byte *)pixels + xstart + y * pitch + x; + return (byte *)pixels + y * pitch + (xstart * 2 + x) * bytesPerPixel; } byte *getBackPixels(int x, int y) const { - return (byte *)backBuf + xstart + y * pitch + x; + return (byte *)backBuf + y * pitch + (xstart * 2 + x) * bytesPerPixel; } }; -- cgit v1.2.3 From ccee18a489ece14c499c4e0c43aeb7fc216451fb Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Fri, 5 Jun 2009 10:13:19 +0000 Subject: Cleanup. svn-id: r41195 --- engines/scumm/gfx.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'engines/scumm/gfx.h') diff --git a/engines/scumm/gfx.h b/engines/scumm/gfx.h index 88852c8388..c0f2c2c083 100644 --- a/engines/scumm/gfx.h +++ b/engines/scumm/gfx.h @@ -215,6 +215,7 @@ protected: void drawStrip3DO(byte *dst, int dstPitch, const byte *src, int height, const bool transpCheck) const; void drawStripHE(byte *dst, int dstPitch, const byte *src, int width, int height, const bool transpCheck) const; + virtual void writeRoomColor(byte *dst, byte color) const; /* Mask decompressors */ void decompressTMSK(byte *dst, const byte *tmsk, const byte *src, int height) const; @@ -361,6 +362,13 @@ public: virtual void roomChanged(byte *roomptr); }; +class Gdi16Bit : public Gdi { +protected: + virtual void writeRoomColor(byte *dst, byte color) const; +public: + Gdi16Bit(ScummEngine *vm); +}; + } // End of namespace Scumm #endif -- cgit v1.2.3 From b8a9823f4e868a98ae85862eb457b6d4e7cffe1c Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Thu, 18 Jun 2009 06:10:13 +0000 Subject: Fix regression in scrolling rooms. svn-id: r41624 --- engines/scumm/gfx.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/scumm/gfx.h') diff --git a/engines/scumm/gfx.h b/engines/scumm/gfx.h index c0f2c2c083..0910d9bc59 100644 --- a/engines/scumm/gfx.h +++ b/engines/scumm/gfx.h @@ -155,11 +155,11 @@ struct VirtScreen : Graphics::Surface { } byte *getPixels(int x, int y) const { - return (byte *)pixels + y * pitch + (xstart * 2 + x) * bytesPerPixel; + return (byte *)pixels + y * pitch + (xstart + x) * bytesPerPixel; } byte *getBackPixels(int x, int y) const { - return (byte *)backBuf + y * pitch + (xstart * 2 + x) * bytesPerPixel; + return (byte *)backBuf + y * pitch + (xstart + x) * bytesPerPixel; } }; -- cgit v1.2.3